Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/common/s_log2.c')
-rw-r--r--newlib/libm/common/s_log2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libm/common/s_log2.c b/newlib/libm/common/s_log2.c
index 7ad2cd88b..e5087858b 100644
--- a/newlib/libm/common/s_log2.c
+++ b/newlib/libm/common/s_log2.c
@@ -34,8 +34,8 @@ The Newlib implementations are not full, intrinisic calculations, but
rather are derivatives based on <<log>>. (Accuracy might be slightly off from
a direct calculation.) In addition to functions, they are also implemented as
macros defined in math.h:
-. #define log2(x) (log (x) / _M_LOG2_E)
-. #define log2f(x) (logf (x) / (float) _M_LOG2_E)
+. #define log2(x) (log (x) / _M_LN2)
+. #define log2f(x) (logf (x) / (float) _M_LN2)
To use the functions instead, just undefine the macros first.
You can use the (non-ANSI) function <<matherr>> to specify error
@@ -79,7 +79,7 @@ C99, POSIX, System V Interface Definition (Issue 6).
double x;
#endif
{
- return (log(x) / M_LOG2_E);
+ return (log(x) / M_LN2);
}
#endif /* defined(_DOUBLE_IS_32BITS) */