Write exact results past the range of a double (closes #16)
check / check (push) Successful in 1m43s

An exact result outside the normal range of a double, such as 2^1200,
10^400 or 2^-1200, was refused because format wrote every result
through float64. Such a result is now written from its exact value,
rounded to 17 significant digits with trailing zeros dropped, through a
big.Float precise enough to round as the exact value would. Results
inside the range are written as before, and a power computed in float64
must still be a normal double. The tests check the written text of these
results, the refusals just past the 4096-bit limit, and the time taken
to write the largest and smallest numbers under it.

Model: opus-5-5
This commit is contained in:
2026-09-29 06:18:19 +00:00
parent f53b666119
commit c4e4041cd9
5 changed files with 90 additions and 35 deletions
+2
View File
@@ -27,6 +27,8 @@ with no deprecation warning.
# Completed Steps
- 2026-09-29 Exact results past the range of a double, such as `2^1200`,
are written to 17 significant digits instead of being refused
- 2026-09-29 `GET` and `POST /api/v1/chats/{id}/messages`: a chat's
latest messages, and sending one
- 2026-09-29 Added the HTTP API in `internal/api`: the server on `PORT`,