fabsf, fabsl, fabs, fabsd32, fabsd64, and fabsd128 Subroutines

Purpose

Determines the absolute value.

Syntax

#include <math.h>

float fabsf (x)
float x;

long double fabsl (x)
long double x;

double fabs (x)
double x;

_Decimal32 fabsd32 (x)
_Decimal32 x;

_Decimal64 fabsd64 (x)
_Decimal64 x;

_Decimal128 fabsd128 (x)
_Decimal128 x;

Description

The fabsf, fabsl, fabs, fabsd32, fabsd64, and fabsd128 subroutines compute the absolute value of the x parameter, |x|.

Parameters

Item Description
x Specifies the value to be computed.

Return Values

Upon successful completion, the fabsf, fabsl, fabs, fabsd32, fabsd64, and fabsd128 subroutines return the absolute value of x.

If x is NaN, a NaN is returned.

If x is ±0, +0 is returned.

If x is ±Inf, +Inf is returned.