]> git.lizzy.rs Git - plan9front.git/commit
stdio: remove erronous assert in dtoa
authorOri Bernstein <ori@eigenstate.org>
Tue, 9 Feb 2021 21:57:38 +0000 (13:57 -0800)
committerOri Bernstein <ori@eigenstate.org>
Tue, 9 Feb 2021 21:57:38 +0000 (13:57 -0800)
commit0719ce2aa793f28ca63d2395a3568b75a60db27b
treebb27038ec43dddb2c5111d3e62e392ede28aa206
parent2d8adc7b881f20a8cc2dbccab84fc7e1655752a6
stdio: remove erronous assert in dtoa

The value of `k` in dtoa() is an estimate of
floor(log10(d)), where `d` is the number being
converted. The code was asserting that 'k' was
less than 100, but the full range of a double
goes to 10^308 or so.

This means that the majority of the range of
a double would trigger that assert.
sys/src/libstdio/dtoa.c