long double math fixes for LD64
[libm] / src / math / fdiml.c
index 5bb950c..cda3022 100644 (file)
@@ -1,4 +1,11 @@
 #include "libm.h"
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
+long double fdiml(long double x, long double y)
+{
+       return fdim(x, y);
+}
+#else
 long double fdiml(long double x, long double y)
 {
        if (isnan(x))
@@ -7,3 +14,4 @@ long double fdiml(long double x, long double y)
                return y;
        return x > y ? x - y : 0;
 }
+#endif