summaryrefslogtreecommitdiffstats
path: root/libass/ass_drawing.c
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2016-11-04 16:27:44 +0200
committerGrigori Goronzy <greg@chown.ath.cx>2016-11-21 11:05:34 +0100
commit143f0bc50297ba91f9931063cf6023abb498dac0 (patch)
tree1739c5a064c2b9d48311fa85fdf3ba0820f8328d /libass/ass_drawing.c
parentcc34eb17a69487e4ded91189b9dbbe0eb4d17b98 (diff)
downloadlibass-143f0bc50297ba91f9931063cf6023abb498dac0.tar.bz2
libass-143f0bc50297ba91f9931063cf6023abb498dac0.tar.xz
ass_strtod: correctly convert large negative exponents
Avoid overflow in dblExp that prevents subnormal numbers from being generated (or small normal numbers if `double` supports many more negative exponents than positive): if `10**abs(exp)` would overflow and we actually want a negative exponent, switch to using precomputed negative powers of 10 rather than positive. Also avoid underflow for numbers with a large negative exponent where the exponent alone underflows but the significand has enough digits to cancel this out, e. g. in `10e-324` with IEEE 754 double.
Diffstat (limited to 'libass/ass_drawing.c')
0 files changed, 0 insertions, 0 deletions