Float512 structv0.1.0
pub struct Float512 {
// private fields
}
Associated functions
FromBits
pub func FromBits(bits: uint512) -> Float512
The value these bits encode.
| Name | Type | Description |
|---|---|---|
bits | uint512 | the value's bit pattern |
Returns: the value that bit pattern stands for
FromValue
pub func FromValue(value: float512) -> Float512
The value a float512 holds, carried as its bits.
Reads the primitive's storage through a raw pointer, as BitsOfFloat64 does: a cast would ask for the
number, and what is wanted is its representation.
| Name | Type | Description |
|---|---|---|
value | float512 | the primitive to read |
Returns: the value with that primitive's bit pattern
Layout
pub func Layout() -> FloatLayout
The format these bits are read under.
Returns: which format the bits are in
Methods
Value
pub func Value(self: &Float512) -> float512
The float512 these bits encode, for arithmetic on a value that was read or built here.
Writes the bits into the primitive's storage through a raw pointer.
Returns: the primitive with this value's bit pattern
Bits
pub func Bits(self: &Float512) -> uint512
The bits.
Returns: the value's bit pattern
IsNan
pub func IsNan(self: &Float512) -> bool
Whether this is not a number.
Returns: whether the value is a NaN
IsInfinite
pub func IsInfinite(self: &Float512) -> bool
Whether this is an infinity of either sign.
Returns: whether the value is either infinity
IsFinite
pub func IsFinite(self: &Float512) -> bool
Whether this is an ordinary value: neither a NaN nor an infinity.
Returns: whether the value is neither infinite nor a NaN
IsNegative
pub func IsNegative(self: &Float512) -> bool
Whether the sign bit is set, which a negative zero answers yes to.
Returns: whether the sign bit is set
FormatWith
pub func FormatWith(
self: &Float512,
allocator: Allocator,
writer: &var TextWriter,
spec: FormatSpec
) -> ! FormatError
Writes this value's text under spec, taking the working storage from allocator.
The shortest decimal that reads back as the same bits, or the digits a precision asks for. This is the only
way to render one of these: they implement neither Display nor Debug, because the exact arithmetic
their text needs allocates and those protocols offer nowhere to say from where.
Reports whatever the writer reported, UnsupportedRequest for any style, and TextFailure(OutOfMemory)
where allocator could not supply the working storage.
| Name | Type | Description |
|---|---|---|
allocator | Allocator | where the working storage comes from |
writer | &var TextWriter | the destination |
spec | FormatSpec | what the placeholder asked for |
Returns: success when the complete rendering was accepted