Synopsis

#include <math.h>

double fabs(double x);

float fabsf(float x);

long double fabsl(long double x);

Status

Partially implemented

Conformance

IEEE Std 1003.1-2017

Description

These functions shall compute the absolute value of their argument x.

Return value

Upon successful completion, these functions shall return the absolute value of x. If x is NaN, a NaN shall be returned.

If x is ±0, +0 shall be returned.

If x is ±Inf, +Inf shall be returned.

Errors

No errors are defined.

Tests

Untested

Known bugs

None

See Also

  1. Standard library functions
  2. Table of Contents