fdim, fdimf, fdiml - positive difference
#include <math.h>
double fdim(double x, double y);
float fdimf(float x, float y);
long double fdiml(long double x, long double y);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
These functions return the positive difference,
max(x
-y
,0), between their arguments.
On success, these functions return the positive difference.
If x
or y
is a NaN, a NaN is returned.
If the result overflows, a range error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively.
fmax(3)