fabs


Calculates the absolute value

[Classification]

Mathematical library

[Syntax]

#include <math.h>

double __far fabs(double x);

[Return value]

Returns the absolute value (size) of x.

If x is ±∞, fabs returns ±∞ and sets macro ERANGE to global variable errno.

If x is a Not-a-Number(NaN), fabs returns a Not-a-Number (NaN) and sets macro EDOM to global variable errno.

[Description]

This function calculates the absolute value (size) of x.