1#ifndef STAN_MATH_PRIM_FUN_HYPOT_HPP
2#define STAN_MATH_PRIM_FUN_HYPOT_HPP
23template <
typename T1,
typename T2, require_all_arithmetic_t<T1, T2>* =
nullptr>
24inline double hypot(T1 x, T2 y) {
39template <
typename T1,
typename T2, require_any_container_t<T1, T2>* =
nullptr,
40 require_all_not_nonscalar_prim_or_rev_kernel_expression_t<
42inline auto hypot(
const T1& a,
const T2& b) {
44 [](
const auto& c,
const auto& d) {
return hypot(c, d); }, a, b);
fvar< T > hypot(const fvar< T > &x1, const fvar< T > &x2)
Return the length of the hypotenuse of a right triangle with opposite and adjacent side lengths given...
auto apply_scalar_binary(const F &f, const T1 &x, const T2 &y)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...