Jeroen van Rijn
4d09219ff4
Merge pull request #7616 from wardjm/fix/parse_int_overflow
...
Fixed strconv overflow noted in issue#7608.
2026-10-08 01:57:40 -07:00
Jeffrey Ward
c2684b43cb
Added tests from issue 7608 comments.
...
Fixed "_" only and no digits. Now returns an error since this is effectively passing nothing to the parser.
2026-10-07 21:28:43 -04:00
gingerBill
b6f29d5f5d
Merge branch 'master' into fix/parse_int_overflow
2026-09-30 12:29:32 +01:00
Matthias Huerbe
dad90e2850
added unit tests for string to float conversion
2026-09-29 20:43:14 +02:00
Matthias Huerbe
9f9d7f7f55
ported Eisel-Lemire's fast float algorithm to odin
...
also fixed string the float conversion producing wrong results.
2026-09-25 11:55:36 +02:00
Matthias Huerbe
50ca03440d
added a hexadecimal floating-point parsing test
2026-09-24 10:08:44 +00:00
Jeffrey Ward
4e724f13c2
Fixed strconv overflow noted in issue#7608. Added regression tests to catch failing conditions and test edge conditions.
2026-09-22 17:19:45 -04:00
Laytan Laats
ebc63a7355
add hexfloat (0h) parsing to strconv
2025-05-10 15:11:52 +02:00
Feoramund
25feff3eb4
Permit parsing of incomplete infinity but do not return true
...
To clarify, `parse_f64` will indeed take `infi` to mean `+Inf` and
return that as the value, but it will not return `ok = true`. It treats
it as `inf` followed by any other trailing character.
`parse_f64_prefix` is the lenient one which will return true so long as
it finds some meaningful value.
2024-06-04 18:55:13 -04:00
Feoramund
1fc6ff91b2
Add test for infinity with trailing characters
2024-06-04 18:55:13 -04:00
Feoramund
c656a9e4cd
Fix and subsume test_issue_2087 into strconv test suite
...
The full "infinity" strings were expected to be partial consumes, but
this is not the case. That has been fixed and the relevant extra tests
from that file have been added to this test suite.
Fixes #2670
2024-06-04 14:23:48 -04:00
Feoramund
7d670f6562
Add initial test suite for core:strconv
2024-06-04 14:20:31 -04:00