SplitScript reference / f32 / fromBits

f32.fromBits

Function

f32.fromBits(bits: u32) -> f32

Constructs a 32-bit float from its exact IEEE-754 bit pattern.

Every bit pattern is accepted, including signed zero, infinities, and NaN payloads. This is a reinterpretation and performs no numeric conversion.

Parameters

  • bits: The exact IEEE-754 binary32 representation.

Effects: pure

Runtime behavior: available everywhere; synchronous

Examples

Construct the smallest positive 32-bit subnormal

let smallest = f32.fromBits(0x00000001)