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(T1&& a, T2&& b) {
44 [](
auto&& c,
auto&& d) {
45 return hypot(std::forward<
decltype(c)>(c),
46 std::forward<
decltype(d)>(d));
48 std::forward<T1>(a), std::forward<T2>(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(F &&f, T1 &&x, 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 ...