X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fexpl.c;h=992937ab064b5d9db43b2a08f332af72005d41d7;hb=35ae1e147a8fe5c9003320f4a76edf8fb4dbf096;hp=a6d8567e9f859c038145578c4f8e649a6a4400d0;hpb=f9d2fe251f3a104df656ab6ffc64821893ab9003;p=gnulib.git diff --git a/lib/expl.c b/lib/expl.c index a6d8567e9..992937ab0 100644 --- a/lib/expl.c +++ b/lib/expl.c @@ -99,9 +99,9 @@ expl (long double x) + 21844/6081075 * z^13 - 929569/638512875 * z^15 + ... - Since |z| <= log(2)/1024 < 0.0007, the relative error of the z^13 term - is < 0.0007^12 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we can truncate - the series after the z^11 term. + Since |z| <= log(2)/1024 < 0.0007, the relative contribution of the + z^13 term is < 0.0007^12 < 2^-120 <= 2^-LDBL_MANT_DIG, therefore we + can truncate the series after the z^11 term. Given the usual bounds LDBL_MAX_EXP <= 16384, LDBL_MIN_EXP >= -16381, LDBL_MANT_DIG <= 120, we can estimate x: -11440 <= x <= 11357.