Double

Summary

The wrapper class for the double primitive type.

Description

The System.Double class represents an IEEE-754 double-precision floating-point value. The System.Double class is the wrapper class for the double primitive type.

The range for double values is [ -1.79769313486232e308, 1.79769313486232e308 ] (inclusive).

Examples

Instantiation
1
2
3
import System;
 
System.Double x = new System.Double(100);
Auto-boxing
1
2
3
import System;
 
System.Double x = 100d;
Primitives Only
1
2
double x = 1.1d;
double y = 2D;

Methods

  • compare

    Compares the Double object to another Double object.

  • Double (Constructor)

    Constructs a System.Double object.

  • fromString

    Converts a string to a double value.

  • fromStringOr

    Converts a string to its equivalent double value or the provided default value if the conversion fails.

  • fromStringOrThrow

    Converts a string to a valid double value or throws an exception if the value cannot be converted.

  • isEven

    Checks if the number is an even number.

  • isFinite

    Checks if the value is finite.

  • isNaN

    Checks if the value is NaN (Not a Number).

  • isOdd

    Checks if the number is an odd number.

  • MAX_VALUE

    Represents the maximum value for the double type.

  • MIN_VALUE

    Represents the minimum value for the double type.

  • NaN

    Represents the NaN (Not a Number) value.

  • NEGATIVE_INFINITY

    Represents negative infinity (-∞).

  • POSITIVE_INFINITY

    Represents positive infinity (+∞).

  • toExponential

    Formats the double value using exponential notation.

  • toExternal

    Converts the IEEE-754 double-precision floating-point value to its equivalent external value.

  • toFixed

    Formats the double value using fixed-point notation.

  • toPrecision

    Formats the double value as a string to the given precision.

  • toString

    Converts the double value to an equivalent string value.

  • valueOf

    Returns the primitive double value wrapped by the System.Double object.

Share

HTML | BBCode | Direct Link