Write exact results past the range of a double (closes #16) #18

Merged
clawbot merged 3 commits from issue-16-exact-results-past-float64 into next 2026-09-29 09:56:56 +02:00
3 Commits
Author SHA1 Message Date
clawbot c4094fff7d Answer fractional powers of exact numbers past a double's range (closes #16)
check / check (push) Successful in 1m21s
A fractional power turned its base into a double first and refused a
base outside the normal range of a double, so (2^1200)^0.5, (2^1024)^0.5,
(2^-1200)^0.5 and 1e400^0.5 were refused although each answer is an
ordinary double. Such a base is now brought into that range by square
roots taken from its exact value in a big.Float, at most three under the
4096-bit limit, with the exponent doubled for each, and only a result
that is not a normal double is refused. The tests give these powers and
the edges of the range their values, and the bounded-work test covers a
base that needs three roots. The README's refusal sentence and example
are updated.

Model: opus-5-5
2026-09-29 07:37:57 +00:00
clawbot 4b871c2b12 Merge next into issue-16-exact-results-past-float64
check / check (push) Successful in 1m21s
Both sides added a line at the top of the Completed Steps in
docs/TODO.md; both are kept, this branch's first.

Model: opus-5-5
2026-09-29 06:41:31 +00:00
clawbot c4e4041cd9 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
2026-09-29 06:18:19 +00:00