about summary refs log tree commit diff
path: root/src/math
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-13 19:51:14 +0100
committernsz <nsz@port70.net>2012-03-13 19:51:14 +0100
commit9560b6b152efeb23cc4e570dbaea5ef333ac971f (patch)
tree21a80f73b9ed676889148212429ee558d54c91cd /src/math
parentdf8b3e5aef151748426b17d4fbccd508acb14207 (diff)
downloadmusl-9560b6b152efeb23cc4e570dbaea5ef333ac971f.tar.gz
musl-9560b6b152efeb23cc4e570dbaea5ef333ac971f.tar.xz
musl-9560b6b152efeb23cc4e570dbaea5ef333ac971f.zip
remove libm.h includes when math.h and float.h are enough
Diffstat (limited to 'src/math')
-rw-r--r--src/math/fdim.c2
-rw-r--r--src/math/fdimf.c2
-rw-r--r--src/math/fdiml.c3
-rw-r--r--src/math/fmax.c2
-rw-r--r--src/math/fmaxf.c2
-rw-r--r--src/math/fmaxl.c3
-rw-r--r--src/math/fmin.c2
-rw-r--r--src/math/fminf.c2
-rw-r--r--src/math/fminl.c3
-rw-r--r--src/math/ilogb.c1
-rw-r--r--src/math/ldexp.c2
-rw-r--r--src/math/ldexpf.c2
-rw-r--r--src/math/ldexpl.c2
-rw-r--r--src/math/llrintl.c4
-rw-r--r--src/math/llroundl.c4
-rw-r--r--src/math/lrintl.c4
-rw-r--r--src/math/lroundl.c4
-rw-r--r--src/math/nearbyint.c2
-rw-r--r--src/math/nearbyintf.c2
-rw-r--r--src/math/nearbyintl.c4
-rw-r--r--src/math/nexttoward.c1
-rw-r--r--src/math/nexttowardl.c2
-rw-r--r--src/math/remainderl.c3
-rw-r--r--src/math/round.c2
-rw-r--r--src/math/roundf.c2
-rw-r--r--src/math/roundl.c4
-rw-r--r--src/math/scalb.c2
-rw-r--r--src/math/scalbf.c2
-rw-r--r--src/math/scalbln.c2
-rw-r--r--src/math/scalblnf.c2
-rw-r--r--src/math/scalblnl.c3
31 files changed, 47 insertions, 30 deletions
diff --git a/src/math/fdim.c b/src/math/fdim.c
index fb25521c..95854606 100644
--- a/src/math/fdim.c
+++ b/src/math/fdim.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fdim(double x, double y)
 {
diff --git a/src/math/fdimf.c b/src/math/fdimf.c
index 5cfeac6b..543c3648 100644
--- a/src/math/fdimf.c
+++ b/src/math/fdimf.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fdimf(float x, float y)
 {
diff --git a/src/math/fdiml.c b/src/math/fdiml.c
index cda3022e..62e29b7d 100644
--- a/src/math/fdiml.c
+++ b/src/math/fdiml.c
@@ -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)
diff --git a/src/math/fmax.c b/src/math/fmax.c
index 0b6bf6f3..94f0caa1 100644
--- a/src/math/fmax.c
+++ b/src/math/fmax.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fmax(double x, double y)
 {
diff --git a/src/math/fmaxf.c b/src/math/fmaxf.c
index 7767c303..695d8179 100644
--- a/src/math/fmaxf.c
+++ b/src/math/fmaxf.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fmaxf(float x, float y)
 {
diff --git a/src/math/fmaxl.c b/src/math/fmaxl.c
index 8a1e3652..4b03158e 100644
--- a/src/math/fmaxl.c
+++ b/src/math/fmaxl.c
@@ -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)
diff --git a/src/math/fmin.c b/src/math/fmin.c
index d1f16454..08a8fd17 100644
--- a/src/math/fmin.c
+++ b/src/math/fmin.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double fmin(double x, double y)
 {
diff --git a/src/math/fminf.c b/src/math/fminf.c
index 0964cdb3..3573c7de 100644
--- a/src/math/fminf.c
+++ b/src/math/fminf.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float fminf(float x, float y)
 {
diff --git a/src/math/fminl.c b/src/math/fminl.c
index ae7159a5..69bc24a7 100644
--- a/src/math/fminl.c
+++ b/src/math/fminl.c
@@ -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)
diff --git a/src/math/ilogb.c b/src/math/ilogb.c
index c5915a0c..0a3a6a46 100644
--- a/src/math/ilogb.c
+++ b/src/math/ilogb.c
@@ -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;
 	}
diff --git a/src/math/ldexp.c b/src/math/ldexp.c
index 36835dba..f4d1cd6a 100644
--- a/src/math/ldexp.c
+++ b/src/math/ldexp.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 double ldexp(double x, int n)
 {
diff --git a/src/math/ldexpf.c b/src/math/ldexpf.c
index f0981ae4..3bad5f39 100644
--- a/src/math/ldexpf.c
+++ b/src/math/ldexpf.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 float ldexpf(float x, int n)
 {
diff --git a/src/math/ldexpl.c b/src/math/ldexpl.c
index 885ff6e9..fd145ccc 100644
--- a/src/math/ldexpl.c
+++ b/src/math/ldexpl.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 long double ldexpl(long double x, int n)
 {
diff --git a/src/math/llrintl.c b/src/math/llrintl.c
index 6b0838d4..ec2cf86b 100644
--- a/src/math/llrintl.c
+++ b/src/math/llrintl.c
@@ -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)
 {
diff --git a/src/math/llroundl.c b/src/math/llroundl.c
index 9e2cfdc7..107744a9 100644
--- a/src/math/llroundl.c
+++ b/src/math/llroundl.c
@@ -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)
 {
diff --git a/src/math/lrintl.c b/src/math/lrintl.c
index 7c09653e..c076326f 100644
--- a/src/math/lrintl.c
+++ b/src/math/lrintl.c
@@ -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)
 {
diff --git a/src/math/lroundl.c b/src/math/lroundl.c
index 1469127b..7b593f77 100644
--- a/src/math/lroundl.c
+++ b/src/math/lroundl.c
@@ -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)
 {
diff --git a/src/math/nearbyint.c b/src/math/nearbyint.c
index 781769fb..714c55ca 100644
--- a/src/math/nearbyint.c
+++ b/src/math/nearbyint.c
@@ -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)
diff --git a/src/math/nearbyintf.c b/src/math/nearbyintf.c
index e4bdb26c..07df8f54 100644
--- a/src/math/nearbyintf.c
+++ b/src/math/nearbyintf.c
@@ -1,5 +1,5 @@
 #include <fenv.h>
-#include "libm.h"
+#include <math.h>
 
 float nearbyintf(float x) {
 	fenv_t e;
diff --git a/src/math/nearbyintl.c b/src/math/nearbyintl.c
index b58527c8..2906f383 100644
--- a/src/math/nearbyintl.c
+++ b/src/math/nearbyintl.c
@@ -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)
 {
diff --git a/src/math/nexttoward.c b/src/math/nexttoward.c
index 5e12c48b..e150eaad 100644
--- a/src/math/nexttoward.c
+++ b/src/math/nexttoward.c
@@ -11,6 +11,7 @@
  */
 
 #include "libm.h"
+
 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
 double nexttoward(double x, long double y)
 {
diff --git a/src/math/nexttowardl.c b/src/math/nexttowardl.c
index c393ce97..67a63403 100644
--- a/src/math/nexttowardl.c
+++ b/src/math/nexttowardl.c
@@ -1,4 +1,4 @@
-#include "libm.h"
+#include <math.h>
 
 long double nexttowardl(long double x, long double y)
 {
diff --git a/src/math/remainderl.c b/src/math/remainderl.c
index b99f9381..2a13c1d5 100644
--- a/src/math/remainderl.c
+++ b/src/math/remainderl.c
@@ -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)
diff --git a/src/math/round.c b/src/math/round.c
index 21373847..bf0b453f 100644
--- a/src/math/round.c
+++ b/src/math/round.c
@@ -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)
 {
diff --git a/src/math/roundf.c b/src/math/roundf.c
index 3cfd8ae5..662a454b 100644
--- a/src/math/roundf.c
+++ b/src/math/roundf.c
@@ -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)
 {
diff --git a/src/math/roundl.c b/src/math/roundl.c
index ce56e8a9..99146f07 100644
--- a/src/math/roundl.c
+++ b/src/math/roundl.c
@@ -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)
 {
diff --git a/src/math/scalb.c b/src/math/scalb.c
index 7706e9cb..a54bdf2b 100644
--- a/src/math/scalb.c
+++ b/src/math/scalb.c
@@ -15,7 +15,7 @@
  * should use scalbn() instead.
  */
 
-#include "libm.h"
+#include <math.h>
 
 double scalb(double x, double fn)
 {
diff --git a/src/math/scalbf.c b/src/math/scalbf.c
index 0cc091f1..d08f2a1a 100644
--- a/src/math/scalbf.c
+++ b/src/math/scalbf.c
@@ -13,7 +13,7 @@
  * ====================================================
  */
 
-#include "libm.h"
+#include <math.h>
 
 float scalbf(float x, float fn)
 {
diff --git a/src/math/scalbln.c b/src/math/scalbln.c
index 53854fda..e6f3f195 100644
--- a/src/math/scalbln.c
+++ b/src/math/scalbln.c
@@ -1,5 +1,5 @@
 #include <limits.h>
-#include "libm.h"
+#include <math.h>
 
 double scalbln(double x, long n)
 {
diff --git a/src/math/scalblnf.c b/src/math/scalblnf.c
index 61600f18..d8e8166b 100644
--- a/src/math/scalblnf.c
+++ b/src/math/scalblnf.c
@@ -1,5 +1,5 @@
 #include <limits.h>
-#include "libm.h"
+#include <math.h>
 
 float scalblnf(float x, long n)
 {
diff --git a/src/math/scalblnl.c b/src/math/scalblnl.c
index 82ebbed0..854c51c4 100644
--- a/src/math/scalblnl.c
+++ b/src/math/scalblnl.c
@@ -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)