remove libm.h includes when math.h and float.h are enough
authornsz <nsz@port70.net>
Tue, 13 Mar 2012 18:51:14 +0000 (19:51 +0100)
committernsz <nsz@port70.net>
Tue, 13 Mar 2012 18:51:14 +0000 (19:51 +0100)
31 files changed:
src/math/fdim.c
src/math/fdimf.c
src/math/fdiml.c
src/math/fmax.c
src/math/fmaxf.c
src/math/fmaxl.c
src/math/fmin.c
src/math/fminf.c
src/math/fminl.c
src/math/ilogb.c
src/math/ldexp.c
src/math/ldexpf.c
src/math/ldexpl.c
src/math/llrintl.c
src/math/llroundl.c
src/math/lrintl.c
src/math/lroundl.c
src/math/nearbyint.c
src/math/nearbyintf.c
src/math/nearbyintl.c
src/math/nexttoward.c
src/math/nexttowardl.c
src/math/remainderl.c
src/math/round.c
src/math/roundf.c
src/math/roundl.c
src/math/scalb.c
src/math/scalbf.c
src/math/scalbln.c
src/math/scalblnf.c
src/math/scalblnl.c

index fb25521cddc284a1c2cec662998229779467a7e7..958546064389bfa3bb5bb2fc16b728726b3ea1f6 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fdim(double x, double y)
 {
index 5cfeac6b05b1225ffe237292a77e096b07034bd3..543c3648e3ff22e861479ea011a2e2e8c2077d99 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fdimf(float x, float y)
 {
index cda3022e9b877489d37babe933b7799ead059efa..62e29b7df39e1cb25e73b844cbb98e423bf87d26 100644 (file)
@@ -1,4 +1,5 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double fdiml(long double x, long double y)
index 0b6bf6f3bf877b69566bef73449925dd114084a2..94f0caa17751b63d46e6826d37e63923dc468484 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fmax(double x, double y)
 {
index 7767c303a81177c00b957f2ae465c887b8eca67e..695d8179c6c1c314a1bcd92d0696a7cd2131707e 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fmaxf(float x, float y)
 {
index 8a1e36521939dfd478987929f14b75687ee0fd37..4b03158e06292b28576615a2a1dd36bd6bf1d34a 100644 (file)
@@ -1,4 +1,5 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double fmaxl(long double x, long double y)
index d1f1645491eae13cbe56287311be450436962fc6..08a8fd17f29e3759b972b04d123c1194aed68254 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fmin(double x, double y)
 {
index 0964cdb345566041d92c070af369d7a2579db554..3573c7de741e17b162e26985a85c914b9d708d1c 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fminf(float x, float y)
 {
index ae7159a54d26a141907a18ac981a5279b098b2aa..69bc24a79bef742518735980c2ff5919589fbb46 100644 (file)
@@ -1,4 +1,5 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double fminl(long double x, long double y)
index c5915a0ca4b306e670af772b137d6a94a38a1077..0a3a6a46352cdcf1eac8d4d7ac183e72d9fdd51a 100644 (file)
@@ -11,7 +11,6 @@ int ilogb(double x)
                if (u.bits == 0)
                        return FP_ILOGB0;
                /* subnormal x */
-               // FIXME: scale up subnormals with a *0x1p53 or find top set bit with a better method
                for (e = -0x3ff; u.bits < (uint64_t)1<<63; e--, u.bits<<=1);
                return e;
        }
index 36835dba563667b8f350ed292d8da6c61b6f77c2..f4d1cd6af5d8b815064251c9d3f062709f2d87d0 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double ldexp(double x, int n)
 {
index f0981ae4f6fa6246124a3e27cde35e0814816a33..3bad5f393f5a1f499ccb8c79c96856f760d30502 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float ldexpf(float x, int n)
 {
index 885ff6e91c7020ad5ce91e7c7be19e1fb062784b..fd145ccc5658930ecdb6bf7da9d6ed02929d1865 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 long double ldexpl(long double x, int n)
 {
index 6b0838d487e1070ce85d0e0f4685e23bb94b23ae..ec2cf86b5251969a7fcaeb0c896f521f2fe24735 100644 (file)
@@ -1,4 +1,6 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long long llrintl(long double x)
 {
index 9e2cfdc717895188b88f74e97334947216529b1e..107744a97034ab76c95f01d37ea709658cab942d 100644 (file)
@@ -1,4 +1,6 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long long llroundl(long double x)
 {
index 7c09653e7933102d3243d21a75b46bab8d3232a0..c076326f70b5cd32d779b4ec3b7e9f42f9cc49e7 100644 (file)
@@ -1,4 +1,6 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long lrintl(long double x)
 {
index 1469127b9064c2432a177783c6ef4112b06eb018..7b593f773a3742c73e57125c2916e47960eae690 100644 (file)
@@ -1,4 +1,6 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long lroundl(long double x)
 {
index 781769fba89c8850933997505bf5d943ea6fcbcd..714c55cadb68ed95a357a3bf900b00fe651b78d4 100644 (file)
@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libm.h"
+#include <math.h>
 
 /*
 rint may raise inexact (and it should not alter the fenv otherwise)
index e4bdb26c5c9be6aa5754944be2ec5546f9c4070d..07df8f540507a43580c7945d910121c026fe45ab 100644 (file)
@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libm.h"
+#include <math.h>
 
 float nearbyintf(float x) {
        fenv_t e;
index b58527c8db02ce54c8a4002b4ad40a4b0dbfc9e8..2906f38310b4d5359678da113fd62878f2cb05d9 100644 (file)
@@ -1,4 +1,6 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double nearbyintl(long double x)
 {
index 5e12c48bb9139c15225f06348a96a9a281b123aa..e150eaadeb41a8fc03ed2ff64cd3faf8edeb992c 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "libm.h"
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 double nexttoward(double x, long double y)
 {
index c393ce97572d60297653113f84d0b913e1cfc842..67a634039f606be277214ae791cccc1b0ef57788 100644 (file)
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 long double nexttowardl(long double x, long double y)
 {
index b99f93818b31c72c5f1d8045abbf9ca89e710d07..2a13c1d5af138b8b9607e82c724c3d81f4f3ddd7 100644 (file)
@@ -1,4 +1,5 @@
-#include "libm.h"
+#include <math.h>
+#include <float.h>
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double remainderl(long double x, long double y)
index 213738474edabae0ed1e261d3e5445947591085e..bf0b453fadd67e15548a42f0290a80d2d55cb0d1 100644 (file)
@@ -25,7 +25,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "libm.h"
+#include <math.h>
 
 double round(double x)
 {
index 3cfd8ae5a0793fd6cbf4d7b9cc422100be55f4e5..662a454b96d3d38ca5787b3f2820b14b44c37e0d 100644 (file)
@@ -25,7 +25,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "libm.h"
+#include <math.h>
 
 float roundf(float x)
 {
index ce56e8a93bf7bb4ccb1a3e2e48ff288b9dacc1d2..99146f07a5fbd74ad29cc2f1ad310fbc7632bbab 100644 (file)
@@ -25,7 +25,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "libm.h"
+#include <math.h>
+#include <float.h>
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double roundl(long double x)
 {
index 7706e9cb810bf0857dc84134f69cef22e18eea32..a54bdf2b0f1c77244f2617762ed0d382418e83c7 100644 (file)
@@ -15,7 +15,7 @@
  * should use scalbn() instead.
  */
 
-#include "libm.h"
+#include <math.h>
 
 double scalb(double x, double fn)
 {
index 0cc091f124347f7e4c4eb8726142a06d66890326..d08f2a1afe375d709eaf0aa70551671193c68d6f 100644 (file)
@@ -13,7 +13,7 @@
  * ====================================================
  */
 
-#include "libm.h"
+#include <math.h>
 
 float scalbf(float x, float fn)
 {
index 53854fda71cfbbc929ed9f8d04d9e790f6231f37..e6f3f195c856afcf0eafbb0071654800d7b8921c 100644 (file)
@@ -1,5 +1,5 @@
 #include <limits.h>
-#include "libm.h"
+#include <math.h>
 
 double scalbln(double x, long n)
 {
index 61600f1818f8cc457b53e60992cccf1b73bb3fcc..d8e8166b10d6ea53c6630a252498e3a4d9cc124c 100644 (file)
@@ -1,5 +1,5 @@
 #include <limits.h>
-#include "libm.h"
+#include <math.h>
 
 float scalblnf(float x, long n)
 {
index 82ebbed055d25960d19bad841328597340610d80..854c51c4cb957087179cfa478f4be60f47a45802 100644 (file)
@@ -1,5 +1,6 @@
 #include <limits.h>
-#include "libm.h"
+#include <math.h>
+#include <float.h>
 
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 long double scalblnl(long double x, long n)