Ticket #7415: boost_atanh_fix.patch

File boost_atanh_fix.patch, 1.1 KB (added by Oleksii <oleksii.taran@…>, 10 years ago)

patch with fix

  • boost/math/special_functions/atanh.hpp

     
    6161               // -Infinity:
    6262               return -policies::raise_overflow_error<T>(function, 0, pol);
    6363            }
    64             else if(x > 1 - tools::epsilon<T>())
    65             {
    66                // Infinity:
    67                return policies::raise_overflow_error<T>(function, 0, pol);
    68             }
    6964            else if(x > 1)
    7065            {
    7166               return policies::raise_domain_error<T>(
    7267                  function,
    7368                  "atanh requires x <= 1, but got x = %1%.", x, pol);
    7469            }
     70            else if(x > 1 - tools::epsilon<T>())
     71            {
     72               // Infinity:
     73               return policies::raise_overflow_error<T>(function, 0, pol);
     74            }
    7575            else if(abs(x) >= tools::forth_root_epsilon<T>())
    7676            {
    7777                // http://functions.wolfram.com/ElementaryFunctions/ArcTanh/02/