Commit a5eecb5
authored
Implement round-half-even float.fromhex in common float_ops (#8234)
* Add round-half-even hex float parser to common float_ops
Add float_ops::from_hex returning Result<f64, HexFloatError>, which parses
the coefficient and exponent, rounds round-half-even over the full exponent
range, and detects overflow. Route float.fromhex through it: raise
OverflowError for values too large to represent and ValueError for invalid
input. Remove the expectedFailure on test_from_hex.
Assisted-by: Claude
* Address review: Option-returning byte helpers, const fns, drop test_ prefix
Assisted-by: Claude
* Whitelist fdigits and inity in cspell
Assisted-by: Claude
* Home is_py_ascii_whitespace in rustpython-wtf8; share with common and sre_engine
Assisted-by: Claude
* Use shared wtf8 is_py_ascii_whitespace in bytes_inner
Remove the private copy of is_py_ascii_whitespace in bytes_inner.rs and
import the shared rustpython_common::wtf8::is_py_ascii_whitespace.
Assisted-by: Claude1 parent 0e2c848 commit a5eecb5
7 files changed
Lines changed: 429 additions & 12 deletions
File tree
- Lib/test
- crates
- common/src
- sre_engine/src
- vm/src
- builtins
- wtf8/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1262 | 1262 | | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | | - | |
1266 | 1265 | | |
1267 | 1266 | | |
1268 | 1267 | | |
| |||
0 commit comments