Skip to content

function abs(double) demo

constexpr double abs(double x) { … }

Computes the absolute value of a floating-point number.

Parameters
x Input floating-point value.
Returns
The absolute value of x.

Since

1.1.0

Deprecated

Prefer std::abs for floating-point types.

See also: abs(int)

Defined at library.hpp:255