Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

fdim, fdimf, fdiml - compute positive difference

&pagelevel(4)&pagelevel

Definition

#include <math.h>

double fdim(double x, double y); (C11)
float fdimf(float x, float y); (C11)
long double fdiml(long double x, long double y); (C11)

These functions compute the positive difference between the floating-point numbers x and y.

Return val.

x - y                   if x > y

0                        if x <= y

HUGE_VAL/HUGE_VALF/HUGE_VALL

                          depending on the function type, if an overflow occurs.

                          errno is set to ERANGE.

See also

fmax, fmin