[Boost-bugs] [Boost C++ Libraries] #2512: interval cosh: wrong result if interval contains 0 (but is not identical to [0, 0])

Subject: [Boost-bugs] [Boost C++ Libraries] #2512: interval cosh: wrong result if interval contains 0 (but is not identical to [0, 0])
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-19 09:12:58


#2512: interval cosh: wrong result if interval contains 0 (but is not identical to
[0,0])
--------------------------------------------+-------------------------------
 Reporter: stephan.puchegger_at_[hidden] | Owner: bgubenko
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: interval
  Version: Boost 1.37.0 | Severity: Showstopper
 Keywords: |
--------------------------------------------+-------------------------------
 The last line (line 179) of the cosh function in the file transc.hpp
 should imho read:

 return I(static_cast<T>(1), rnd.cosh_up(-x.lower() > x.upper() ? x.lower()
 : x.upper()), true);

 instead of

 return I(static_cast<T>(0), rnd.cosh_up(-x.lower() > x.upper() ? x.lower()
 : x.upper()), true);

 since the cosh(0) == 1. Otherwise the function will return the wrong
 result.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2512>
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:49:59 UTC