aboutsummaryrefslogtreecommitdiff
path: root/winsup/mingw/mingwex
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-06-10 23:26:57 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2002-06-10 23:26:57 +0000
commitfb2156b6a89f5096eef74f126ca8545fbd0512db (patch)
tree9d332ba7c360925f29ecf6db9a7e633942967dc0 /winsup/mingw/mingwex
parenta499215e4eac78bfc096cd480fc3db9454bd6c1d (diff)
downloadnewlib-fb2156b6a89f5096eef74f126ca8545fbd0512db.zip
newlib-fb2156b6a89f5096eef74f126ca8545fbd0512db.tar.gz
newlib-fb2156b6a89f5096eef74f126ca8545fbd0512db.tar.bz2
* include/math.h (fdim, fdimf, fdiml): Add prototypes.github/mingwexmingwex
* mingwex/fdim.c: New file. * mingwex/fdimf.c: New file. * mingwex/fdiml.c: New file. * mingwex/Makefile.in (DISTFILES): Add fdim.c, fdimf.c, fdiml.c. (MATHOBJS):Add fdim.o, fdimf.o. fdiml.o.
Diffstat (limited to 'winsup/mingw/mingwex')
-rw-r--r--winsup/mingw/mingwex/Makefile.in4
-rw-r--r--winsup/mingw/mingwex/fdim.c7
-rw-r--r--winsup/mingw/mingwex/fdimf.c7
-rw-r--r--winsup/mingw/mingwex/fdiml.c7
4 files changed, 25 insertions, 0 deletions
diff --git a/winsup/mingw/mingwex/Makefile.in b/winsup/mingw/mingwex/Makefile.in
index 0cb136e..59f8e40 100644
--- a/winsup/mingw/mingwex/Makefile.in
+++ b/winsup/mingw/mingwex/Makefile.in
@@ -31,6 +31,9 @@ DISTFILES = Makefile.in configure configure.in \
atoll.c \
copysignl.S \
dirent.c \
+ fdim.c \
+ fdimf.c \
+ fdiml.c \
feclearexcept.c \
fegetenv.c \
fegetexceptflag.c \
@@ -155,6 +158,7 @@ MATH_OBJS = \
trunc.o truncf.o truncl.o \
isnan.o isnanf.o isnanl.o \
fp_consts.o \
+ fdim.o fdimf.o fdiml.o \
fmax.o fmaxf.o fmaxl.o \
fmin.o fminf.o fminl.o \
fma.o fmaf.o fmal.o \
diff --git a/winsup/mingw/mingwex/fdim.c b/winsup/mingw/mingwex/fdim.c
new file mode 100644
index 0000000..330b092
--- /dev/null
+++ b/winsup/mingw/mingwex/fdim.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+double
+fdim (double x, double y)
+{
+ return (isgreater(x, y) ? (x - y) : 0.0);
+}
diff --git a/winsup/mingw/mingwex/fdimf.c b/winsup/mingw/mingwex/fdimf.c
new file mode 100644
index 0000000..02bfc6e
--- /dev/null
+++ b/winsup/mingw/mingwex/fdimf.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+float
+fdimf (float x, float y)
+{
+ return (isgreater(x, y) ? (x - y) : 0.0F);
+}
diff --git a/winsup/mingw/mingwex/fdiml.c b/winsup/mingw/mingwex/fdiml.c
new file mode 100644
index 0000000..1c3d0aa
--- /dev/null
+++ b/winsup/mingw/mingwex/fdiml.c
@@ -0,0 +1,7 @@
+#include <math.h>
+
+long double
+fdiml (long double x, long double y)
+{
+ return (isgreater(x, y) ? (x - y) : 0.0L);
+}