snazzy-d/sdc

Decode floats with overflowing mantissa.

Opened this issue · 0 comments

This is a follow up to #246 . Floats with overflowing mantissa needs to be rounded the proper way.

Relevant code:

if (overflow) {
return getError(location, "Integral too large to fit in 64 bits.");
}

See what fast_float does when there are too many digits:
https://github.com/fastfloat/fast_float/blob/3a63b00d53549dc5a91aa1960ed81dd5f9dd8161/include/fast_float/ascii_number.h#L229-L245
https://github.com/fastfloat/fast_float/blob/3a63b00d53549dc5a91aa1960ed81dd5f9dd8161/include/fast_float/parse_number.h#L211-L225