1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
10 float fdimf(float x
, float y
)
17 if (__fpclassifyf(x
) == FP_NAN
) return(x
);
18 if (__fpclassifyf(y
) == FP_NAN
) return(y
);
20 return x
> y
? x
- y
: 0.0;
23 #ifdef _DOUBLE_IS_32BITS
26 double fdim(double x
, double y
)
33 return (double) fdimf((float) x
, (float) y
);
36 #endif /* defined(_DOUBLE_IS_32BITS) */