[Boost-bugs] [Boost C++ Libraries] #12066: Accuracy of modified Bessel functions

Subject: [Boost-bugs] [Boost C++ Libraries] #12066: Accuracy of modified Bessel functions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-03-13 13:57:32


#12066: Accuracy of modified Bessel functions
-----------------------------------------+--------------------------
 Reporter: Pavel Holoborodko <pavel@…> | Owner: johnmaddock
     Type: Library Submissions | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.61.0 | Severity: Optimization
 Keywords: |
-----------------------------------------+--------------------------
 This is not a bug report but proposal for enhancement.

 Currently Boost is using rational minimax approximations to compute
 modified Bessel functions in double precision. In short, I propose to
 replace them with more accurate (and faster) approximations.

 I happen to work in the field of high-accuracy computations and accuracy
 assessment of various software libraries is part of job.

 Few months ago I tested accuracy of computing the modified Bessel
 functions by different software libraries including Boost.

 Relative accuracy of every library was evaluated against "true" values
 computed using quadruple precision (in terms of machine epsilon). Reports
 with details and plots can be found by the links:
 (Trac doesn't allow multiple links, so there is only one - others can be
 easily found)

 [http://www.advanpix.com/2015/11/11/rational-approximations-for-the-
 modified-bessel-function-of-the-first-kind-i0-computations-double-
 precision/ I0]

 The main conclusion is:

 Rational approximation currently used in Boost were build by minimizing
 only theoretical approximation error, ignoring effects of finite precision
 floating-point arithmetic. Which makes them sub-optimal (e.g. Boost
 delivers the lowest accuracy for I0 with arguments in [0,15]).

 To fix this, I searched for approximations which take into account the
 real-life rounding & cancellation effects - proposed approximations are
 included in reports.

 In most of the cases, new methods deliver the lowest relative error even
 if compared to Chebyshev expansions and have simple structure
 (polynomials). I think it would be a big plus for Boost to use the updated
 coefficients and give highest accuracy among other libs.

 My question are:
 1. Is this of any interest for Boost::math maintainers?
 2. If yes - I would be happy to help with updating the routines for I0,
 I1, K0 and K1.
    (Fork -> pull request would be enough, right?)


 P.S.
 GSL has issues with accuracy (K0, K1) and probably it is not good idea to
 use it for evaluating accuracy against (I saw tables in Boost
 documentation with accuracy checks against GSL).

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