##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# fabs

From cppreference.com
< c‎ | numeric‎ | math

Defined in header `<math.h>` |  |
float fabsf( float arg ); |  | (since C99)
double fabs( double arg ); |  |
long double fabsl( long double arg ); |  | (since C99)

Computes the absolute value of a floating point value `arg`.

### [edit] Parameters

arg | - | floating point value

### [edit] Return value

The absolute value of `arg` (`|arg|`)

### [edit] See also

abs labs llabs imaxabs (C99) | computes absolute value of an integral value (|x|) (function) [edit]
signbit (C99) | checks if the given number is negative (function) [edit]
C++ documentation for fabs

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=c/numeric/math/fabs&oldid=62575"