aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/math/fminl.c
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/math/fminl.c')
-rw-r--r--winsup/cygwin/math/fminl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/winsup/cygwin/math/fminl.c b/winsup/cygwin/math/fminl.c
new file mode 100644
index 0000000..0396a8e
--- /dev/null
+++ b/winsup/cygwin/math/fminl.c
@@ -0,0 +1,12 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#include <math.h>
+
+long double
+fminl (long double _x, long double _y)
+{
+ return ((__builtin_islessequal(_x, _y) || __builtin_isnan (_y)) ? _x : _y );
+}