Opened 6 years ago
Closed 6 years ago
#12196 closed Bugs (fixed)
cpp_bin_float: convert_to<double> of infinity and NaN returns zero
Reported by: | Michael Shatz | Owned by: | John Maddock |
---|---|---|---|
Milestone: | To Be Determined | Component: | multiprecision |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Applying convert_to<double>() to cpp_bin_float object with values of Inf and/or NaN returns 0. That is a new bug in the latest github version.
In Version 1.60.0 behavior is also not 100% correct, but better: inf.convert_to<double>() => 1.79769e+308 nan.convert_to<double>() => nan
Platform: Mingw, gcc 5.3.0, x64. All optimization levels.
Attachments (1)
Change History (2)
by , 6 years ago
Attachment: | infcnv_test.cpp added |
---|
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in https://github.com/boostorg/multiprecision/commit/6e7e2e801004b328b34e726d80ea815b892952f3
Thanks for the reports!
Note:
See TracTickets
for help on using tickets.
demonstrates mistake in convert_to<double>() of special cpp_bin_float values