blob: 62e29b7df39e1cb25e73b844cbb98e423bf87d26 [file] [log] [blame]
nsz9560b6b2012-03-13 19:51:14 +01001#include <math.h>
2#include <float.h>
Rich Felkerb69f6952012-03-13 01:17:53 -04003
4#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5long double fdiml(long double x, long double y)
6{
7 return fdim(x, y);
8}
9#else
10long double fdiml(long double x, long double y)
11{
12 if (isnan(x))
13 return x;
14 if (isnan(y))
15 return y;
16 return x > y ? x - y : 0;
17}
18#endif