hypot.hpp
Go to the documentation of this file.
#ifndef STAN_MATH_PRIM_SCAL_FUN_HYPOT_HPP
#define STAN_MATH_PRIM_SCAL_FUN_HYPOT_HPP
#include <stan/math/prim/scal/fun/is_nan.hpp>
#include <boost/math/tools/promotion.hpp>
#include <cmath>
namespace stan {
namespace math {
template <typename T1, typename T2>
inline typename boost::math::tools::promote_args<T1, T2>::type
hypot(const T1& x, const T2& y) {
using std::sqrt;
return sqrt(x * x + y * y);
}
}
}
#endif
stan::math::hypot
fvar< T > hypot(const fvar< T > &x1, const fvar< T > &x2)
Return the length of the hypoteneuse of a right triangle with opposite and adjacent side lengths give...
Definition: hypot.hpp:25
stan::math::sqrt
fvar< T > sqrt(const fvar< T > &x)
Definition: sqrt.hpp:14
is_nan.hpp
stan
Definition: log_sum_exp.hpp:8

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