Share via


Abs Method (Double)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the absolute value of a double-precision floating-point number.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function Abs ( _
    val As Double _
) As Double
public static double Abs(
    double val
)
public:
static double Abs(
    double val
)
static member Abs : 
        val:float -> float 
public static function Abs(
    val : double
) : double

Parameters

Return Value

Type: System. . :: . .Double
A double-precision floating-point number, x, such that 0 ≤ x ≤Double..::..MaxValue.

Remarks

The absolute value of a Double is its numeric value without its sign. For example, the absolute value of both 1.2e-03 and -1.2e03 is 1.2e03.

If val is equal to NegativeInfinity or PositiveInfinity, the return value is PositiveInfinity. If value is equal to NaN, the return value is NaN.

.NET Framework Security

See Also

Reference

Math Class

Abs Overload

System Namespace