Go to the first, previous, next, last section, table of contents.


fabs

Syntax

#include <math.h>

double fabs(double x);

Description

This function computes the absolute value of its argument x.

Return Value

x if x is positive, else -x. Note that in this context, +0.0 is positive and -0.0 is negative. Infinities and NaNs are returned unchanged, except for the sign.

Portability

ANSI, POSIX


Go to the first, previous, next, last section, table of contents.