diff options
| author | Evan Haas <evan@lagerdata.com> | 2022-04-03 08:47:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-04-04 16:04:35 -0400 |
| commit | b4bf3bdf7eac05c5e4ff887294385946f4dd5f3f (patch) | |
| tree | 714937345eadfd8ccb5332ae87179083260e4029 /lib/std/math | |
| parent | 364e53f3bf6b5aa4e5e7eba5d790c5b957007067 (diff) | |
| download | zig-b4bf3bdf7eac05c5e4ff887294385946f4dd5f3f.tar.gz zig-b4bf3bdf7eac05c5e4ff887294385946f4dd5f3f.zip | |
std.fmt: Fix incorrect behavior with large floating point integers.
I consider this an interim workaround/hack until #1299 is finished.
There is a bug in the original C implementation of the errol3 (and errol4)
algorithm that can result in undefined behavior or an obviously incorrect
result (leading ':' in the output)
This change checks for those two problems and uses a slower fallback
path if they occur. I can't guarantee that this will always produce
the correct result, but since the workaround is only used if the original
algorithm is guaranteed to fail, it should never turn a previously-correct
result into an incorrect one.
Fixes #11283
Diffstat (limited to 'lib/std/math')
0 files changed, 0 insertions, 0 deletions
