Home / Docs / Specification / 29. Numerics
29.6 Determinism
The result of every F64 operation, and every output that depends on one, is bitwise identical in the interpreter and in native code, on every supported target and on every machine.
-
NaN is canonical outside registers. Every engine replaces a NaN by the canonical NaN at every store, call argument, return value and observation, and after
-x,absandcopy_sign(ADR 0114 rule 6.1). The interpreter canonicalizes after every operation whose result is a NaN. -
No contraction, no reassociation.
a * b + cis two roundings. No engine fuses, reassociates, or assumes that values are not NaN, not infinite or not-0.0. Onlyfmafuses. -
No excess precision. Both targets compute binary64 in binary64 registers.
-
The environment. Every command that reads a package of edition
0.3or later (una run,una test,una check,una build,una core, and the language server) first runs a self-test of the floating-point environment: probes, whose inputs no compiler folds, that tell round-to-nearest-even from each of the other rounding modes, by a tie and by a value that is not a tie, and detect flush-to-zero and denormals-are-zero. A failed probe stops the command with U6006, "the floating-point environment of this platform is not the default one (<probe>)", exit code 1, before the package's sources are checked. A native executable of edition0.3or later writes the default environment at start and tests it (ADR 0114 rule 6.4). Packages of editions0.1and0.2never run the self-test. -
No platform math library.
floor,ceil,trunc, both roundings,rem,fmaand the conversions of §4 are the project's own routines, in integer arithmetic on the bits, shared by both engines;sqrtis the IEEE instruction. Every routine returns the canonical NaN for a NaN result.(Note of 2026-10-31, #1277.) The rule binds what computes a value of a Una program: both engines, the interpreter's code in
unaincluded, the native runtimelibuna_rtand every executable thatuna buildlinks. The Z3 solver built intouna(ADR 0124) computes no value of a Una program; its own calls to the platform's math library, in its search heuristics, are allowed in theunabinary alone, each by name (scripts/no-libm-una.txt), together with the C++ runtime it loads (scripts/load-commands-una.txt). Thebuildrelease gate checks thatunabuilt without the solver, the runtime and every emitted executable reference none of the math library's names, and that each such nameunareferences is one the solver's library imports (docs/release-gates.md).