|
Boost : |
From: Szymon Modzelewski (angelofpromise_at_[hidden])
Date: 2008-08-06 16:38:00
http://svn.boost.org/svn/boost/trunk/boost/math/special_functions/acosh.hpp
goes like this:
static T const taylor_2_bound = sqrt(tools::epsilon<T>());
// this is way smaller than 1
static T const taylor_n_bound = sqrt(taylor_2_bound);
static T const upper_taylor_2_bound = one/taylor_2_bound;
if(x < one) // right
{
return policies::raise_domain_error<T>(
"boost::math::acosh<%1%>(%1%)",
"acosh requires x >= 1, but got x = %1%.", x, pol);
}
else if (x >= taylor_n_bound) // what?
{
...
}
else
{
// so when do we actually get here?
...
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk