7.12.12.1 The fdim functions

Synopsis

1

#include <math.h>
double fdim(double x, double y);
float fdimf(float x, float y);
long double fdiml(long double x, long double y);

Description

2

The fdim functions determine the positive difference between their arguments:

{x - y  if x > y
{
{+0     if x <= y

A range error may occur.

Returns

3

The fdim functions return the positive difference value.