Home / Docs / Specification / 29. Numerics

29.9 Representation

Release v0.4.0

The representation is not observable (spec/16 §4). The interpreter holds an F64 inline in its value, as it holds a small Int, at no cost against the memory budget. Native code holds every F64 boxed, a heap object of 8 bytes behind a handle, canonical, until the raw cells and packed lists of ADR 0107 land (ADR 0114 rule 9.6): the semantics are the same, only the cost differs. Every operation is the runtime's, computed by the same routines of una-core as the interpreter's, so both engines give the same bits. A boxed F64 costs its slot and its object against the memory budget. A type descriptor (spec/20 §7) has a kind for F64: equality by its bits, and totalOrder. A native executable of edition 0.3 writes the default environment on its main thread and on each task's thread, and tests it once before main (§6 rule 4).