erf.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_ERF_HPP
#define STAN_MATH_PRIM_SCAL_FUN_ERF_HPP
#include <stan/math/prim/scal/fun/boost_policy.hpp>
#include <stan/math/prim/scal/fun/is_nan.hpp>
#include <boost/math/special_functions/erf.hpp>
#include <limits>
namespace stan {
namespace math {
inline double erf(double x) {
if (is_nan(x))
return std::numeric_limits<double>::quiet_NaN();
return boost::math::erf(x, boost_policy_t());
}
inline double erf(int x) {
return erf(static_cast<double>(x));
}
}
}
#endif
stan::math::erf
var erf(const var &a)
The error function for variables (C99).
Definition: erf.hpp:60
boost_policy.hpp
is_nan.hpp
stan
Definition: log_sum_exp.hpp:8
stan::math::erf
fvar< T > erf(const fvar< T > &x)
Definition: erf.hpp:14
stan::math::boost_policy_t
boost::math::policies::policy< boost::math::policies::overflow_error< boost::math::policies::errno_on_error >, boost::math::policies::pole_error< boost::math::policies::errno_on_error > > boost_policy_t
Boost policy that overrides the defaults to match the built-in C++ standard library functions...
Definition: boost_policy.hpp:23
stan::math::is_nan
int is_nan(const fvar< T > &x)
Returns 1 if the input&#39;s value is NaN and 0 otherwise.
Definition: is_nan.hpp:21

[ Stan Home Page ] © 2011–2016, Stan Development Team.