On this page

0177: One floating-point type, f64, with IEEE 754 semantics

Status: Proposed (pending maintainer)

Context

Harness has only integers (ADR-0012, ADR-0044). Measurements, ratios and statistics in CLI tools need fractions. The language forbids implicit conversions, keeps left-to-right evaluation and requires the interpreter and the C backend to agree byte for byte (ADR-0003).

Decision

Consequences

f64 joins the printable scalars. Range proofs (ADR-0066) ignore floats; only i64(x) adds a value check, so checkfree rejects it. Because NaN breaks reflexivity, generic code that relies on x == x must not assume it for f64.

Alternatives