Float80 structv0.1.0

Source
An x87 extended-precision value, held as its eighty bits.
pub struct Float80 {
    // private fields
}

Associated functions

FromBits

pub func FromBits(bits: uint128) -> Float80

The value these bits encode.

NameTypeDescription
bitsuint128the value's bit pattern

Returns: the value that bit pattern stands for

Source

FromValue

pub func FromValue(value: float80) -> Float80

The value a float80 holds, carried as its eighty bits. Reads the primitive's storage through a raw pointer, as BitsOfFloat64 does, and keeps the low eighty bits: the storage is sixteen bytes, and the six above the value are padding whose contents nothing promises.

NameTypeDescription
valuefloat80the primitive to read

Returns: the value with that primitive's bit pattern

Source

Layout

pub func Layout() -> FloatLayout

The format these bits are read under.

Returns: which format the bits are in

Source

Methods

Value

pub func Value(self: &Float80) -> float80

The float80 these bits encode, for arithmetic on a value that was read or built here. Writes the low eighty bits into the primitive's storage through a raw pointer, with the padding above them zero.

Returns: the primitive with this value's bit pattern

Source

Bits

pub func Bits(self: &Float80) -> uint128

The bits.

Returns: the value's bit pattern

Source

IsNan

pub func IsNan(self: &Float80) -> bool

Whether this is not a number.

Returns: whether the value is a NaN

Source

IsInfinite

pub func IsInfinite(self: &Float80) -> bool

Whether this is an infinity of either sign.

Returns: whether the value is either infinity

Source

IsFinite

pub func IsFinite(self: &Float80) -> bool

Whether this is an ordinary value: neither a NaN nor an infinity.

Returns: whether the value is neither infinite nor a NaN

Source

IsNegative

pub func IsNegative(self: &Float80) -> bool

Whether the sign bit is set, which a negative zero answers yes to.

Returns: whether the sign bit is set

Source

FormatWith

pub func FormatWith(
    self: &Float80,
    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.

NameTypeDescription
allocatorAllocatorwhere the working storage comes from
writer&var TextWriterthe destination
specFormatSpecwhat the placeholder asked for

Returns: success when the complete rendering was accepted

Source