Skip to content
Konjure / spatial intelligence

f128

← Builtin reference

IEEE binary128: 113 significand bits, normal exponents -16382 through 16383, subnormals through 2^-16494. Portable software arithmetic retains all 128 bits. Finite values only; ties-to-even rounding.

Signature

Integer arithmetic checks overflow; floating-point arithmetic rounds each operation at its declared precision and rejects nonfinite results. Mixed representations require explicit conversion, which rejects loss of range or precision. Values serialize as decimal strings so JSON hosts retain the exact value.

Methods

convert

convert[U]() -> Res[U, DataError]

Converts to explicit numeric dtype U or returns DataError when exact conversion fails.

Examples

Calculate at a declared precision

Both operands have this dtype; changing the annotation changes its range and precision.

Tick 0 · 0.00 s⌘ / Ctrl + EnterThis device
main.kj
Loading the language runtime…
Output 0
No output.
Expected output
42

Rust definition

Rust SDK Scalar with an explicit dtype and validated bits; exact scalar JSON uses strings.

See also