This is the mail archive of the newlib@sourceware.org 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]

[PATCH] Remove log2 define


Since newlib now has a fast implementation of log2, remove a define which
avoids calling log2.  The define makes math code slower and less accurate,
so removing it is best.

Build OK on AArch64, OK for commit?

--
diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
index 893a5d0645148af0dd0a48f7e73504e07363a840..2d17dd13e52ae1893beba8c9a2565d7682dbbf89 100644
--- a/newlib/libc/include/math.h
+++ b/newlib/libc/include/math.h
@@ -329,9 +329,6 @@ extern double lgamma (double);
 extern double erf (double);
 extern double erfc (double);
 extern double log2 (double);
-#if !defined(__cplusplus)
-#define log2(x) (log (x) / _M_LN2)
-#endif
 
 #ifndef __math_68881
 extern double hypot (double, double);


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