Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5385: atanh.hpp returns wrong limits for atanh(1)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-29 11:01:25
#5385: atanh.hpp returns wrong limits for atanh(1)
---------------------------------+------------------------------------------
Reporter: florian@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
Version: Boost 1.46.0 | Severity: Showstopper
Resolution: | Keywords:
---------------------------------+------------------------------------------
Comment (by florian@â¦):
Sorry, I screwed up the formatting:
The original source code in boost/math/special_functions/atanh.hpp
{{{
59: else if(x < -1 + tools::epsilon<T>())
60: {
61: // -Infinity:
62: return -policies::raise_overflow_error<T>(function, 0, pol);
63: }
64: else if(x > 1 - tools::epsilon<T>())
65: {
66: // Infinity:
67: return -policies::raise_overflow_error<T>(function, 0, pol);
68: }
}}}
should be changed to
{{{
66: // Infinity:
67: return policies::raise_overflow_error<T>(function, 0, pol);
}}}
where in line 67 the minus sign was removed to return +Infinity if the
overflow error is ignored.
/Florian
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5385#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:06 UTC