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:2 by Antony Polukhin, 11 years ago

Status: newassigned
Summary: lexical_cast_loopback_test fails on some compilersreimplement conversions to float/double/long double types

comment:3 by Antony Polukhin, 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 Antony Polukhin, 10 years ago

Fixing this ticket must also resolve #6975. See #6975 for more requirements.

comment:5 by Antony Polukhin, 8 years ago

Milestone: To Be DeterminedBoost 1.58.0
Resolution: wontfix
Status: assignedclosed

Since Boost 1.58 it is decided that lexical_cast must use converters from Sandard Library.

Note: See TracTickets for help on using tickets.