diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-08-21 01:13:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-20 22:13:52 +0000 |
| commit | cbd73dde3dd2da790bb663385a229ce22965c43c (patch) | |
| tree | 515a6847aa3dc5163845d834e94dfcb8de9ca56d /docs/user-guide | |
| parent | 619de903b70e08a7ca8471419e8eb7e4dd43ca9d (diff) | |
Fix nextafter() (#8195)
Fixes #8185. The previous implementation is incorrect and basically only
works in the `x = 0` case. `delta` was the smallest possible positive
value representable as a float, but that's below the rounding error of
addition with almost all reasonably sized floats.
This fixed implementation is based on bit twiddling instead. I've
checked the float case against the C++ `nextafterf` with both a -inf ->
inf and inf -> -inf sweep, in addition to the test included in this PR.
Diffstat (limited to 'docs/user-guide')
0 files changed, 0 insertions, 0 deletions
