zig/lib/std/fmt/parse_float
Marc Tiehuis ff3bf98345 fix large f128 values being incorrectly parsed as inf
Found while fuzzing. Previously 1.1897314953572317650857593266280070162E4932
was parsed as +inf, which caused issues for round-trip serialization of
floats. Only f128 had issues, but have added other tests for all
floating point large normals.

The max_exponent for f128 was wrong, it is subtly different in the
decimal code-path as it is based on where the decimal digit should go.
This needs to be 2 greater than the max exponent (e.g. 308 or 4932) to
work correctly (greater by 1, then we use a >= comparision).

In addition, I've removed the redundant `optimize` constant which was only
use for testing the slow path locally.
2024-02-25 12:37:03 -08:00
..
common.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
convert_eisel_lemire.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
convert_fast.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
convert_hex.zig all: migrate code to new cast builtin syntax 2023-06-24 16:56:39 -07:00
convert_slow.zig reduce AstGen.numberLiteral stack usage 2023-07-20 12:51:18 -07:00
decimal.zig fix large f128 values being incorrectly parsed as inf 2024-02-25 12:37:03 -08:00
FloatInfo.zig add new float-parser based on eisel-lemire algorithm 2022-05-03 16:46:40 +12:00
FloatStream.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
parse.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
parse_float.zig fix large f128 values being incorrectly parsed as inf 2024-02-25 12:37:03 -08:00