Commit 08a8c22
committed
Fix multipleOf with integer-valued float failing for large integers
When multipleOf is a float with an integer value (e.g. 11.0), convert
it to int before performing the check. This avoids floating-point
precision loss for instances beyond 2**53, where float division
produces incorrect results.
Per JSON Schema spec, numbers with zero fractional parts are integers.
Fixes #11591 parent 5a5fa97 commit 08a8c22
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
504 | 521 | | |
505 | 522 | | |
506 | 523 | | |
| |||
0 commit comments