fabs()

Returns the absolute value of x.

Synopsis

float fabs(float x);

Parameters

Parameter Description
x Value

Return value

In the event of an error, the function returns 0.0.

Error

Description

Returns the absolute value of x.

Example

main()
{
  float f;
  f=fabs(-1.234); // returns 1.234
}

Assignment

Mathematical function

Availability

CTRL