From fd4515030cc4fd5873998ead3d632c92f187ac35 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 3 Dec 2010 16:08:48 +0000 Subject: [PATCH] * libc/include/math.h: Missing from previous checkin. --- newlib/ChangeLog | 4 ++++ newlib/libc/include/math.h | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 574ae506f..878465e80 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2010-12-03 Craig Howland + + * libc/include/math.h: Missing from previous checkin. + 2010-12-02 Craig Howland * libm/common/s_log2.c: Change from using M_LOG2_E to M_LN2 define diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index d70f65bba..9e6041487 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -32,7 +32,7 @@ union __ldmath #endif /* Natural log of 2 */ -#define _M_LOG2_E 0.693147180559945309417 +#define _M_LN2 0.693147180559945309417 #if defined(__GNUC__) && \ ( (__GNUC__ >= 4) || \ @@ -276,7 +276,7 @@ extern double erf _PARAMS((double)); extern double erfc _PARAMS((double)); extern double log2 _PARAMS((double)); #if !defined(__cplusplus) -#define log2(x) (log (x) / _M_LOG2_E) +#define log2(x) (log (x) / _M_LN2) #endif #ifndef __math_68881 @@ -356,7 +356,7 @@ extern float erff _PARAMS((float)); extern float erfcf _PARAMS((float)); extern float log2f _PARAMS((float)); #if !defined(__cplusplus) -#define log2f(x) (logf (x) / (float) _M_LOG2_E) +#define log2f(x) (logf (x) / (float_t) _M_LN2) #endif extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ @@ -529,7 +529,7 @@ extern int matherr _PARAMS((struct exception *e)); #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 -#define M_LN2 0.69314718055994530942 +#define M_LN2 _M_LN2 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_TWOPI (M_PI * 2.0) @@ -546,7 +546,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 _M_LOG2_E +#define M_LOG2_E _M_LN2 #define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */ /* Global control over fdlibm error handling. */