diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-09-07 15:30:59 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-09-07 15:30:59 +0000 |
commit | 78e66fb978b25652c87319063d984bd6e80e6f44 (patch) | |
tree | 5464e5a4055a123f36b1dde93bebe84b1897811d /newlib/libc/include/math.h | |
parent | e57c0627c395e397916c6c5157200825761326c5 (diff) | |
download | cygnal-78e66fb978b25652c87319063d984bd6e80e6f44.tar.gz cygnal-78e66fb978b25652c87319063d984bd6e80e6f44.tar.bz2 cygnal-78e66fb978b25652c87319063d984bd6e80e6f44.zip |
2007-09-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (_M_LOG2E): Replace with..
(_M_LOG2_E): New macro.
(log2, log2f, M_LOG2_E): Use _M_LOG2_E.
Diffstat (limited to 'newlib/libc/include/math.h')
-rw-r--r-- | newlib/libc/include/math.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index 2bf35515f..9f9fe1b18 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -26,9 +26,8 @@ union __ldmath _LONG_DOUBLE ld; }; -/* Log2 of e */ -#define _M_LOG2E 1.4426950408889634074 - +/* Natural log of 2 */ +#define _M_LOG2_E 0.693147180559945309417 #if defined(__GNUC__) && \ ( (__GNUC__ >= 4) || \ @@ -250,7 +249,7 @@ extern double gamma _PARAMS((double)); extern double lgamma _PARAMS((double)); extern double erf _PARAMS((double)); extern double erfc _PARAMS((double)); -#define log2(x) (log (x) / _M_LOG2E) +#define log2(x) (log (x) / _M_LOG2_E) #ifndef __math_68881 extern double hypot _PARAMS((double, double)); @@ -327,7 +326,7 @@ extern float gammaf _PARAMS((float)); extern float lgammaf _PARAMS((float)); extern float erff _PARAMS((float)); extern float erfcf _PARAMS((float)); -#define log2f(x) (logf (x) / (float) _M_LOG2E) +#define log2f(x) (logf (x) / (float) _M_LOG2_E) extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ @@ -424,7 +423,7 @@ extern int matherr _PARAMS((struct exception *e)); #define MAXFLOAT 3.40282347e+38F #define M_E 2.7182818284590452354 -#define M_LOG2E _M_LOG2E +#define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 #define M_LN2 0.69314718055994530942 #define M_LN10 2.30258509299404568402 @@ -443,7 +442,7 @@ extern int matherr _PARAMS((struct exception *e)); #define M_LN2HI 6.9314718036912381649E-1 #define M_SQRT3 1.73205080756887719000 #define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */ -#define M_LOG2_E 0.693147180559945309417 +#define M_LOG2_E _M_LOG2_E #define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */ /* Global control over fdlibm error handling. */ |