Opened 11 years ago
Closed 8 years ago
#5660 closed Bugs (wontfix)
reimplement conversions to float/double/long double types
Reported by: | Antony Polukhin | Owned by: | Antony Polukhin |
---|---|---|---|
Milestone: | Boost 1.58.0 | Component: | lexical_cast |
Version: | Boost 1.46.1 | Severity: | Problem |
Keywords: | Cc: |
Description
Conversion double-string-double may give a different value (or even throw) on many compilers. Need to implement such conversions from scratch in lexical_cast library. This will give performance boost and unified behavior.
Change History (5)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Status: | new → assigned |
---|---|
Summary: | lexical_cast_loopback_test fails on some compilers → reimplement conversions to float/double/long double types |
comment:3 by , 11 years ago
Replying to theller:
You shouldn't compare floating point values with operator==, as explained here:
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18
Test lexical_cast_loopback_test is more like an exception from the rule. It is used to determinate the accuracy of the upcoming algorithm. Some of the compilers currently do not fail the test, so this test must continue to pass successfully on those compilers.
Other tests use BOOST_CHECK_CLOSE for floats.
Some work on this ticket has been already done in [72925].
comment:4 by , 10 years ago
comment:5 by , 8 years ago
Milestone: | To Be Determined → Boost 1.58.0 |
---|---|
Resolution: | → wontfix |
Status: | assigned → closed |
Since Boost 1.58 it is decided that lexical_cast must use converters from Sandard Library.
You shouldn't compare floating point values with operator==, as explained here:
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18