Boost C++ Libraries: Ticket #5660: reimplement conversions to float/double/long double types https://svn.boost.org/trac10/ticket/5660 <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5660 Trac 1.4.3 Thomas Heller Wed, 29 Jun 2011 16:53:33 GMT <link>https://svn.boost.org/trac10/ticket/5660#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5660#comment:1</guid> <description> <p> You shouldn't compare floating point values with operator==, as explained here:<br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16</a> <br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17</a> <br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18</a> <br /> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Wed, 06 Jul 2011 15:40:48 GMT</pubDate> <title>status, summary changed https://svn.boost.org/trac10/ticket/5660#comment:2 https://svn.boost.org/trac10/ticket/5660#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>summary</strong> <span class="trac-field-old">lexical_cast_loopback_test fails on some compilers</span> → <span class="trac-field-new">reimplement conversions to float/double/long double types</span> </li> </ul> Ticket Antony Polukhin Wed, 06 Jul 2011 15:52:54 GMT <link>https://svn.boost.org/trac10/ticket/5660#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5660#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/5660#comment:1" title="Comment 1">theller</a>: </p> <blockquote class="citation"> <p> You shouldn't compare floating point values with operator==, as explained here:<br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.16</a> <br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17</a> <br /> <a class="ext-link" href="http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18"><span class="icon">​</span>http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.18</a> <br /> </p> </blockquote> <p> 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. <br /> Other tests use BOOST_CHECK_CLOSE for floats.<br /> <br /> Some work on this ticket has been already done in <a class="changeset" href="https://svn.boost.org/trac10/changeset/72925" title="Partial fix for #5660. Better performance and less memory usage for ...">[72925]</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Tue, 24 Jul 2012 18:14:17 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/5660#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5660#comment:4</guid> <description> <p> Fixing this ticket must also resolve <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6975" title="#6975: Support Requests: lexical_cast&lt;double&gt; produces different answers with 53-bit FPU precision (closed: fixed)">#6975</a>. See <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6975" title="#6975: Support Requests: lexical_cast&lt;double&gt; produces different answers with 53-bit FPU precision (closed: fixed)">#6975</a> for more requirements. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Antony Polukhin</dc:creator> <pubDate>Mon, 09 Mar 2015 08:48:48 GMT</pubDate> <title>status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/5660#comment:5 https://svn.boost.org/trac10/ticket/5660#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.58.0</span> </li> </ul> <p> Since Boost 1.58 it is decided that lexical_cast must use converters from Sandard Library. </p> Ticket