toFloat32 (Function)

Signature: toFloat32(value: t0) -> float32

Description: Converts any numeric type to float32, rounding to nearest even. Overflow becomes signed infinity; widening from float16 is exact. Total and pure.

Parameters

  • value (t0): The number to convert

Returns: float32

Example

print(toFloat32(0.1))  // 0.1
print (toFloat32 0.1)  // 0.1