use different const in __expo2
[libm] / src / math / __expo2.c
index 61ae7fd..7009306 100644 (file)
@@ -1,10 +1,10 @@
 #include "libm.h"
 
-/* k minimizes |exp(k ln2) - 2**k|, see cmath/__cexp.c */
-static const uint32_t k = 1799;
-static const double kln2 = 1246.97177782734161156;
+/* k is such that k*ln2 has minimal error */
+static const uint32_t k = 2043;
+static const double kln2 = 0x1.62066151add8bp+10;
 
-/* exp(x)/2 for large x */
+/* exp(x)/2 when x >= log(DBL_MAX) */
 double __expo2(double x)
 {
        double scale;