Commit e16584e
committed
fix(naturaldelta): only suppress OverflowError for non-finite floats
The previous fix caught all OverflowErrors, which incorrectly swallowed
the documented OverflowError for truly too-large finite float values.
Use math.isfinite() to distinguish inf/-inf (return unchanged) from a
legitimately too-large finite value (re-raise).1 parent fe0bf42 commit e16584e
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
152 | 159 | | |
153 | 160 | | |
154 | 161 | | |
| |||
0 commit comments