This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

math.h: numerical values in question


Perhaps some numerical values stored in math.h are not as accurate as they could be,
for example

diff -uNr a/math.h a/math.h
--- a/math.h	2014-08-07 18:26:21.000000000 +0200
+++ b/math.h	2014-08-07 19:31:51.000000000 +0200
@@ -569,14 +569,14 @@
  #ifndef __STRICT_ANSI__
  #define M_TWOPI         (M_PI * 2.0)
-#define M_3PI_4		2.3561944901923448370E0
-#define M_SQRTPI        1.77245385090551602792981
+#define M_3PI_4		2.3561944901923449288E0
+#define M_SQRTPI        1.77245385090551602729817
  #define M_LN2LO         1.9082149292705877000E-10
  #define M_LN2HI         6.9314718036912381649E-1
-#define M_SQRT3	1.73205080756887719000
+#define M_SQRT3	1.73205080756887729353
  #define M_IVLN10        0.43429448190325182765 /* 1 / log(10) */
  #define M_LOG2_E        _M_LN2
-#define M_INVLN2        1.4426950408889633870E0  /* 1 / log(2) */
+#define M_INVLN2        1.4426950408889634074E0  /* 1 / log(2) */
  /* Global control over fdlibm error handling.  */

On the other hand, if some value is not "as one would expect", please
add a comment.


Denis Excoffier.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]