diff --git a/include/boost/math/special_functions/acosh.hpp b/include/boost/math/special_functions/acosh.hpp index 40ca985ed..5a43ae57d 100644 --- a/include/boost/math/special_functions/acosh.hpp +++ b/include/boost/math/special_functions/acosh.hpp @@ -21,6 +21,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic cosine function. @@ -58,7 +59,7 @@ namespace boost { // http://functions.wolfram.com/ElementaryFunctions/ArcCosh/06/01/06/01/0001/ // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x * 2) ); + return log(x) + constants::ln_two(); } else if(x < 1.5f) { diff --git a/include/boost/math/special_functions/asinh.hpp b/include/boost/math/special_functions/asinh.hpp index cf2a343e6..0534f550d 100644 --- a/include/boost/math/special_functions/asinh.hpp +++ b/include/boost/math/special_functions/asinh.hpp @@ -22,6 +22,7 @@ #include #include #include +#include // This is the inverse of the hyperbolic sine function. @@ -52,7 +53,7 @@ namespace boost { // http://functions.wolfram.com/ElementaryFunctions/ArcSinh/06/01/06/01/0001/ // approximation by laurent series in 1/x at 0+ order from -1 to 1 - return log(x * 2) + 1/ (4 * x * x); + return constants::ln_two() + log(x) + 1/ (4 * x * x); } else if(x < 0.5f) {