-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
104: Implement ldexp and use it in ratio_to_f64 r=cuviper a=MattX This eliminates errors where we attempt a multiplication by 2^-x, but that 2^-x underflows. (#91). This is based on the code in #94. The `ldexp` implementation strategy is mostly to extract the exponent, modify it, then reinsert it. To avoid dealing with subnormal numbers at the bit level, we shift any subnormal numbers into normal range before that operation. Fixes #91. Co-authored-by: Josh Stone <[email protected]> Co-authored-by: Matthieu Felix <[email protected]>
- Loading branch information
Showing
1 changed file
with
125 additions
and
15 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