-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turns out, using `IToA` for magnitudes was a little bit sloppy. Magnitude values are always unsigned, which means there are meaningful values that won't fit inside of an `int64_t`. Fortunately, adding all those constants (#336) was a great stress test to expose this. I think the most natural fix would be to add a `UIToA`, which can't handle signed values, but which _can_ handle the "upper half" of `uint64_t` values. This way, we can have `IToA` delegate to `UIToA` for the "integer magnitude" parts of the logic. Why not just get rid of `IToA` altogether? Well, we do need it for printing exponents, which can be negative. Helps #90: this gets the test to pass on #336.
- Loading branch information
Showing
3 changed files
with
49 additions
and
20 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
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