Opened 6 years ago
Closed 6 years ago
#12525 closed Feature Requests (fixed)
cpp_bin_float: Anal fixation. Part 2. Sign of trunc(x) for x in range (-1..0)
Reported by: | Michael Shatz | Owned by: | John Maddock |
---|---|---|---|
Milestone: | Boost 1.63.0 | Component: | multiprecision |
Version: | Boost 1.62.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
trunc(x) for x in range (-1..0).
I have no idea what IEEE-754 says about it, but I see that in practice all sane implementations return -0.
Except for boost::cpp_bin_float.
Attachments (1)
Change History (2)
by , 6 years ago
comment:1 by , 6 years ago
Milestone: | To Be Determined → Boost 1.63.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks, this also effects round and ceil as well as trunc. Fixed in https://github.com/boostorg/multiprecision/commit/ed43204e925aa604061b33315fa7db7002689fdc.
Note:
See TracTickets
for help on using tickets.
demonstrates unexpected sign of zero as result of trunc()