summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2013-11-21 01:16:49 +0000
committerSzabolcs Nagy <nsz@port70.net>2013-11-21 01:16:49 +0000
commit5d01ab4ac64b913c537e91f7c01d5c8e910151da (patch)
tree68585091ada93029345fb30960e61cb6c8c0eb42 /src
parentebbaf2180e6e32043837f570982c2ee86cf19eae (diff)
downloadmusl-5d01ab4ac64b913c537e91f7c01d5c8e910151da.tar.gz
math: add (obsolete) bsd drem and finite functions
Diffstat (limited to 'src')
-rw-r--r--src/math/finite.c7
-rw-r--r--src/math/finitef.c7
-rw-r--r--src/math/remainder.c3
-rw-r--r--src/math/remainderf.c3
4 files changed, 20 insertions, 0 deletions
diff --git a/src/math/finite.c b/src/math/finite.c
new file mode 100644
index 00000000..25a0575f
--- /dev/null
+++ b/src/math/finite.c
@@ -0,0 +1,7 @@
+#define _GNU_SOURCE
+#include <math.h>
+
+int finite(double x)
+{
+ return isfinite(x);
+}
diff --git a/src/math/finitef.c b/src/math/finitef.c
new file mode 100644
index 00000000..2c4c7714
--- /dev/null
+++ b/src/math/finitef.c
@@ -0,0 +1,7 @@
+#define _GNU_SOURCE
+#include <math.h>
+
+int finitef(float x)
+{
+ return isfinite(x);
+}
diff --git a/src/math/remainder.c b/src/math/remainder.c
index ed5c477e..6cd089c4 100644
--- a/src/math/remainder.c
+++ b/src/math/remainder.c
@@ -1,7 +1,10 @@
#include <math.h>
+#include "libc.h"
double remainder(double x, double y)
{
int q;
return remquo(x, y, &q);
}
+
+weak_alias(remainder, drem);
diff --git a/src/math/remainderf.c b/src/math/remainderf.c
index b418bbff..420d3bfc 100644
--- a/src/math/remainderf.c
+++ b/src/math/remainderf.c
@@ -1,7 +1,10 @@
#include <math.h>
+#include "libc.h"
float remainderf(float x, float y)
{
int q;
return remquof(x, y, &q);
}
+
+weak_alias(remainderf, dremf);