long double math fixes for LD64
[libm] / src / math / fdiml.c
1 #include "libm.h"
2
3 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
4 long double fdiml(long double x, long double y)
5 {
6         return fdim(x, y);
7 }
8 #else
9 long double fdiml(long double x, long double y)
10 {
11         if (isnan(x))
12                 return x;
13         if (isnan(y))
14                 return y;
15         return x > y ? x - y : 0;
16 }
17 #endif