diff --git a/docs/DESIGN.md b/docs/DESIGN.md index 46e89e7..16bc820 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -2058,6 +2058,13 @@ no `f32` variant. The runtime / codegen contract: pattern is conformant; `0.0 / 0.0` may produce `0x7ff8000000000000` on one target and a different qNaN on another. +- The textual rendering of NaN by `io/print_float`. The libc + `printf("%g", nan)` glue used by the runtime is permitted to + emit `nan` / `-nan` / `NaN` etc. depending on libc version and + the NaN's sign bit; AILang does not normalise this, since the + prose / surface-print paths render NaN as the explicit `"NaN"` + spelling and `io/print_float` is for human-readable output, not + round-trip. These are the Rust / Swift / standard-LLVM defaults — not research-grade reproducibility guarantees. The stronger guarantee diff --git a/docs/roadmap.md b/docs/roadmap.md index 44d4e3d..0d32a5b 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -91,6 +91,15 @@ work progresses. - [ ] **\[todo\]** 21'h iteration — final 21' carry-over (latency methodology pass). Numbering kept for continuity with the 21' arc. +- [ ] **\[todo\]** `io/print_float` always-emit-`.0` — surface + printer always emits `.` or `e/E` so re-lex routes to Float; + the runtime printer (`printf("%g\n", v)`) doesn't, so `2.0` + prints as `2` (Int-shaped). Asymmetric. Either switch the + runtime path to a `.0`-fallback printer (matching surface) or + document the `%g` contract in DESIGN.md §"Float semantics" so + the LLM-author knows `io/print_float`'s output is for-humans + not round-trip. + - context: `docs/specs/2026-05-10-fieldtest-floats.md` finding F1. - [ ] **\[todo\]** Rustdoc warning sweep — `cargo doc --no-deps` reports 16 pre-existing warnings (15 in `ailang-check`, 1 in `ailang-core`: private-item links from public doc, unresolved