Boost C++ Libraries: Ticket #6001: math::tools::roots eps_tolerance wrong behaviour at 0. 0. https://svn.boost.org/trac10/ticket/6001 <p> at line 34 of toms748_solve.hpp: </p> <p> <code>return (fabs(a - b) / (std::min)(fabs(a), fabs(b))) &lt;= eps;</code> </p> <p> this leads to wrong behavior when a=b=0. </p> <p> fix is trivial: </p> <p> <code>return fabs(a - b) &lt;= eps * (std::min)(fabs(a), fabs(b));</code> </p> <p> does almost the same, but it is correct when a=b=0 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6001 Trac 1.4.3 John Maddock Mon, 10 Oct 2011 11:52:08 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6001#comment:1 https://svn.boost.org/trac10/ticket/6001#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/74890" title="Remove unused constants. Fix expression for tolerance in ...">[74890]</a>) Remove unused constants. Fix expression for tolerance in eps_tolerance. Add include guards to prime.hpp. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5982" title="#5982: Bugs: Wrong value of `one_div_two_pi' in &lt;boost/math/constants/constants.hpp&gt; (closed: fixed)">#5982</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5927" title="#5927: Bugs: Missing #include guards (closed: fixed)">#5927</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6001" title="#6001: Bugs: math::tools::roots eps_tolerance wrong behaviour at 0. 0. (closed: fixed)">#6001</a>. </p> Ticket John Maddock Sun, 16 Oct 2011 18:58:00 GMT <link>https://svn.boost.org/trac10/ticket/6001#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6001#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/74984" title="Merge recent bug fixes from Trunk. Refs #6014 Refs #5832 Refs #5934 ...">[74984]</a>) Merge recent bug fixes from Trunk. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6014" title="#6014: Patches: Boost.Math patch to fix long double support on OpenBSD/hppa &amp; hppa64 (closed: fixed)">#6014</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5832" title="#5832: Bugs: Unable to clean compile Boost::Test (1.40.0) with GCC using -Weffc++ (closed: invalid)">#5832</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5934" title="#5934: Bugs: boost/math/tools/tuple.hpp omits &#34;tr1/&#34; from #include directive. (closed: fixed)">#5934</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6001" title="#6001: Bugs: math::tools::roots eps_tolerance wrong behaviour at 0. 0. (closed: fixed)">#6001</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5982" title="#5982: Bugs: Wrong value of `one_div_two_pi' in &lt;boost/math/constants/constants.hpp&gt; (closed: fixed)">#5982</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5914" title="#5914: Bugs: std:: qualifier missing for &lt;cstring&gt; function (closed: fixed)">#5914</a> Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5927" title="#5927: Bugs: Missing #include guards (closed: fixed)">#5927</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>