Everything

fdim / fdimf / fdiml


Calculates the positive difference between two arguments.

[Format]

#include <math.h>

double fdim(double d1, double d2);

float fdimf(float d1, float d2);

long double fdiml(long double d1, long double d2);

[Parameters]

d1, d2 Values of which difference is to be computed (|d1 - d2|)

[Return values]

Normal: Positive difference between two arguments

Abnormal: Range error: HUGE_VAL, HUGE_VALF, or HUGE_VALL

[Remarks]

A range error may occur if the return value overflows.