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)

public static double Abs(
	double val


Type: System..::..Double
A number that is greater than or equal to Double..::..MinValue, but less than or equal to Double..::..MaxValue.

Return Value

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

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.