struct · System
Float64
public struct System.Float64 : System.ISignedNumber<f64>, System.IHashable<f64>, System.IComparable<f64>, System.IToString
- Kind
- struct
- Namespace
- System
- Assembly
- System.Core
- Access
- public, members of f64
- Source file
Primitives.ant
Inheritance
- Interfaces
-
ISignedNumber<TSelf>IHashable<TSelf>IComparable<TSelf>IToString - All interfaces
-
IComparable<TSelf>IHashable<TSelf>INumber<TSelf>ISignedNumber<TSelf>IToString
Properties
Methods
static method IsNumber(text: System.String<u8>) -> bool
#
Digits, an optional point and more digits, an optional exponent: what ParseBits reads.
static method Special(trimmed: System.String<u8>) -> i32
#
What a trimmed text names besides a number: 1 for nan (nan, NaN), 2 for +inf (inf, +inf,
Infinity, +Infinity), 3 for -inf (-inf, -Infinity), 0 otherwise.
static method ReadNumber(text: System.String<u8>) -> f64
#
The value of a text IsNumber accepts, read in place: up to 15 significant digits times a power of ten up to 10^22 are both exact in an f64, so one multiplication or division rounds the result correctly; the other texts go to ParseBits.
static method ReadBits(text: System.String<u8>) -> f64
#
What ParseBits reads from a text IsNumber accepts (ASCII: its units widened as they are).
method ToString(format: System.String<u8>) -> System.String<u8>
#
As text by a format: F, N, E, P, G, R and a precision ((2.5).ToString("F2") is "2.50").
method ToString() -> System.String<u8>
#
The shortest text that reads back as the same number, as print writes it (15 significant digits when
they are enough, else 16 or 17); nan, inf and -inf for the values that are no number.
A total order: the usual one, nan above every number and equal to itself, -0 equal to +0 (what sorting uses).
The IEEE 754 bits of the number, and back.
static method Parse(text: System.String<u8>) -> f64
#
The number text writes (digits, a point, an exponent; nan, inf, -inf as ToString writes them, or
NaN, Infinity, -Infinity); a FormatError otherwise.
static method TryParse(text: System.String<u8>) -> f64?
#
The number text writes, or null when it writes none.
Constants
The largest finite f64, and the smallest (its negative).
The smallest f64 above zero (a subnormal).
Not a number (quiet, positive), and the infinities.
Source
Float64 as Larva HIR, decompiled from its Larva HIR.
public struct System.Float64 : System.ISignedNumber<f64>, System.IHashable<f64>, System.IComparable<f64>, System.IToString
{
// The largest finite f64, and the smallest (its negative).
static constant MaxValue: f64
static constant MinValue: f64
// The smallest f64 above zero (a subnormal).
static constant Epsilon: f64
// Not a number (quiet, positive), and the infinities.
static constant NaN: f64
static constant PositiveInfinity: f64
static constant NegativeInfinity: f64
static method FromF64(value: f64) -> f64
static method ToF64(value: f64) -> f64
static method FormatInto(value: f64) -> i64
static method FormattedUnit(index: i64) -> i64
static method ParseBits(text: u16[]) -> i64
static method BitsOf(value: f64) -> i64
static method FromBitsOf(bits: i64) -> f64
// Digits, an optional point and more digits, an optional exponent: what ParseBits reads.
static method IsNumber(text: System.String<u8>) -> bool
// What a trimmed text names besides a number: 1 for nan (`nan`, `NaN`), 2 for +inf (`inf`, `+inf`,
// `Infinity`, `+Infinity`), 3 for -inf (`-inf`, `-Infinity`), 0 otherwise.
static method Special(trimmed: System.String<u8>) -> i32
// The value of a text IsNumber accepts, read in place: up to 15 significant digits times a power of ten up
// to 10^22 are both exact in an f64, so one multiplication or division rounds the result correctly; the
// other texts go to ParseBits.
static method ReadNumber(text: System.String<u8>) -> f64
// What ParseBits reads from a text IsNumber accepts (ASCII: its units widened as they are).
static method ReadBits(text: System.String<u8>) -> f64
// As text by a format: F, N, E, P, G, R and a precision (`(2.5).ToString("F2")` is "2.50").
method ToString(format: System.String<u8>) -> System.String<u8>
// The shortest text that reads back as the same number, as `print` writes it (15 significant digits when
// they are enough, else 16 or 17); `nan`, `inf` and `-inf` for the values that are no number.
method ToString() -> System.String<u8>
// A total order: the usual one, nan above every number and equal to itself, -0 equal to +0 (what sorting uses).
method CompareTo(other: f64) -> i32
method Equals(other: f64) -> bool
method Hash() -> u64
// The IEEE 754 bits of the number, and back.
static method Bits(value: f64) -> i64
static method FromBits(bits: i64) -> f64
static method IsNaN(x: f64) -> bool
static method IsInfinity(x: f64) -> bool
static method IsFinite(x: f64) -> bool
// The number `text` writes (digits, a point, an exponent; `nan`, `inf`, `-inf` as ToString writes them, or
// `NaN`, `Infinity`, `-Infinity`); a FormatError otherwise.
static method Parse(text: System.String<u8>) -> f64
// The number `text` writes, or null when it writes none.
static method TryParse(text: System.String<u8>) -> f64?
static property Zero: f64
static property One: f64
static property NegativeOne: f64
}