An IEEE 754 64-bit floating point number. A `Float` is capable of approximately representing numeric values between:

- 2-1022, approximately 1.79769×10308, and
- (2-2-52)×21023, approximately 5×10-324.

Zero is represented by distinct instances `+0.0`, `-0.0`, but these instances are equal.

In addition, the following special values exist:

- `infinity` and `-infinity`, and
- undefined values.

As required by the IEEE standard, an undefined value, often denoted NaN, is not equal to any other value, nor even to itself. Thus, the definition of `equals()` for `Float` violates the general contract defined by `Object.equals()`.

A floating point value with a zero `fractionalPart` is considered equal to its `integer` part.

Literal floating point values are written with a decimal point and, optionally, a magnitude or exponent:

    1.0
    1.0E6
    1.0M
    1.0E-6
    1.0u

In the case of a fractional magnitude, the decimal point is optional. Underscores may be used to group digits into groups of three.

See also `parseFloat()`

- `Anything`
  - `Object`
    - `Float` ...and other supertypes

- `Float`
  - `Exponentiable`
    - `Numeric`
      - `Invertible`
        - `Summable`
  - `Number`
    - `Comparable`
    - `Numeric`
      - `Invertible`
        - `Summable`
  - `Object`
    - `Anything`

no subtypes hierarchy

Initializer
`Float(Float float)`

Attributes
`finite` | Source Code `shared Boolean finite` Determines whether this value is finite. Produces `false` for `infinity`, `-infinity`, and undefined. See also `infinite`, `infinity`
`fractionalPart` | Source Code `shared actual Float fractionalPart` The fractional part of this number, after truncation of the integral part. For `Integral` numeric types, the fractional part is always zero. Refines `Number.fractionalPart`
`hash` | Source Code `shared actual Integer hash` The hash value of the value, which allows the value to be an element of a hash-based set or key of a hash-based map. Implementations must respect the constraint that: if `x==y` then `x.hash==y.hash`. Therefore, a class which refines `Object.equals()` must also refine `hash`. Refines `Object.hash`
`infinite` | Source Code `shared Boolean infinite` Determines whether this value is infinite in magnitude. Produces `true` for `infinity` and `-infinity`. Produces `false` for a finite number, `+0.0`, `-0.0`, or undefined. See also `infinity`, `finite`
`integer` | Source Code `shared Integer integer` This value, represented as an `Integer`, after truncation of its fractional part, if such a representation is possible. Throws `OverflowException` if the the `wholePart` of this value is too large or too small to be represented as an `Integer`
`magnitude` | Source Code `shared actual Float magnitude` The magnitude of this number, defined for any instance `x` as: `-x` if `x<0`, or `x` otherwise, where `0` is the additive identity. Hence: `x.magnitude >= 0` for any `x`, and `x.magnitude == 0` if and only if `x==0`. Refines `Number.magnitude`
`negated` | Source Code `shared actual Float negated` The additive inverse of this value. Refines `Invertible.negated`
`negative` | Source Code `shared actual Boolean negative` Determines if this value is a negative number or `-infinity`. Produces `false` for a positive number, `+0.0`, `-0.0`, or undefined. Refines `Number.negative`
`positive` | Source Code `shared actual Boolean positive` Determines if this value is a positive number or `infinity`. Produces `false` for a negative number, `+0.0`, `-0.0`, or undefined. Refines `Number.positive`
`sign` | Source Code `shared actual Integer sign` The sign of this value. Produces `1` for a positive number or `infinity`. Produces `-1` for a negative number or `-infinity`. Produces `0.0` for `+0.0`, `-0.0`, or undefined. Refines `Number.sign`
`strictlyNegative` | Source Code `shared Boolean strictlyNegative` Determines if this value is a negative number, `-0.0`, or `-infinity`. Produces `false` for a positive number, `+0.0`, or undefined.
`strictlyPositive` | Source Code `shared Boolean strictlyPositive` Determines if this value is a positive number, `+0.0`, or `infinity`. Produces `false` for a negative number, `-0.0`, or undefined.
`string` | Source Code `shared actual String string` A developer-friendly string representing the instance. Concatenates the name of the concrete class of the instance with the `hash` of the instance. Subclasses are encouraged to refine this implementation to produce a more meaningful representation. Refines `Object.string`
`undefined` | Source Code `shared Boolean undefined` Determines whether this value is undefined (that is, Not a Number or NaN). The undefined value has the property that it is not equal (`==`) to itself, and as a consequence the undefined value cannot sensibly be used in most collections.
`wholePart` | Source Code `shared actual Float wholePart` The integral value of the number after truncation of the fractional part. For `Integral` numeric types, the integral value of a number is the number itself. Refines `Number.wholePart`

Inherited Attributes
Attributes inherited from: `Invertible<Other>` `Invertible.negated`
Attributes inherited from: `Number<Other>` `Number.fractionalPart`, `Number.magnitude`, `Number.negative`, `Number.positive`, `Number.sign`, `Number.wholePart`

Methods
`compare` | Source Code `shared actual Comparison compare(Float other)` Compares this value with the given value. Implementations must respect the constraints that: `x==y` if and only if `x<=>y == equal` (consistency with `equals()`), if `x>y` then `y<x` (symmetry), and if `x>y` and `y>z` then `x>z` (transitivity). Refines `Comparable.compare`
`divided` | Source Code `shared actual Float divided(Float other)` The quotient obtained by dividing this number by the given number. For integral numeric types, this operation results in a remainder. When the given number is `0`, the additive identity, the behavior depends on the numeric type: For some numeric types, including `Integer`, division by `0` results in an exception. For others, including `Float`, it results in a special value of the type, for example, `infinity`. Refines `Numeric.divided`
`equals` | Source Code `shared actual Boolean equals(Object that)` Determines if the given object is equal to this `Float`, that is, if: the given object is also a `Float`, neither this value nor the given value is `undefined`, and either both values are `infinite` and have the same `sign`, or both represent the same finite floating point value as defined by the IEEE specification. Or if: the given object is an `Integer`, this value is neither `undefined`, nor `infinite`, the `fractionalPart` of this value equals `0.0`, and the `integer` part of this value equals the given integer. Refines `Object.equals`
`largerThan` | Source Code `shared actual Boolean largerThan(Float other)` Determines if this value is strictly larger than the given value. Refines `Comparable.largerThan`
`minus` | Source Code `shared actual Float minus(Float other)` The difference between this number and the given number. Must produce the value `x + -y`. Refines `Invertible.minus`
`notLargerThan` | Source Code `shared actual Boolean notLargerThan(Float other)` Determines if this value is smaller than or equal to the given value. Refines `Comparable.notLargerThan`
`notSmallerThan` | Source Code `shared actual Boolean notSmallerThan(Float other)` Determines if this value is larger than or equal to the given value. Refines `Comparable.notSmallerThan`
`plus` | Source Code `shared actual Float plus(Float other)` The result of adding the given value to this value. This operation should never perform any kind of mutation upon either the receiving value or the argument value. Refines `Summable.plus`
`plusInteger` | Source Code `shared actual Float plusInteger(Integer integer)` The result of adding this number to the given `Integer`. Refines `Number.plusInteger`
`power` | Source Code `shared actual Float power(Float other)` The result of raising this number to the given power. Refines `Exponentiable.power`
`powerOfInteger` | Source Code `shared actual Float powerOfInteger(Integer integer)` The result of raising this number to the given non-negative `Integer` power. For a negative power, the behavior is implementation-dependent. Refines `Number.powerOfInteger`
`smallerThan` | Source Code `shared actual Boolean smallerThan(Float other)` Determines if this value is strictly smaller than the given value. Refines `Comparable.smallerThan`
`times` | Source Code `shared actual Float times(Float other)` The product of this number and the given number. Refines `Numeric.times`
`timesInteger` | Source Code `shared actual Float timesInteger(Integer integer)` The result of multiplying this number by the given `Integer`. Refines `Number.timesInteger`

Inherited Methods
Methods inherited from: `Comparable<Other>` `Comparable.compare()`, `Comparable.largerThan()`, `Comparable.notLargerThan()`, `Comparable.notSmallerThan()`, `Comparable.smallerThan()`
Methods inherited from: `Exponentiable<This,Other>` `Exponentiable.power()`
Methods inherited from: `Invertible<Other>` `Invertible.minus()`
Methods inherited from: `Number<Other>` `Number.plusInteger()`, `Number.powerOfInteger()`, `Number.timesInteger()`
Methods inherited from: `Numeric<Other>` `Numeric.divided()`, `Numeric.times()`
Methods inherited from: `Summable<Other>` `Summable.plus()`