-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: use banker's rounding for the exact mode in flt2dec.
For the shortest mode the IEEE 754 decoder already provides an exact rounding range accounting for banker's rounding, but it was not the case for the exact mode. This commit alters the exact mode algorithm for Dragon so that any number ending at `...x5000...` with even `x` and infinite zeroes will round to `...x` instead of `...(x+1)` as it was. Grisu is not affected by this change because this halfway case always results in the failure for Grisu.
- Loading branch information
1 parent
a641b05
commit 3d34e17
Showing
2 changed files
with
23 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters