1#ifndef STAN_MATH_FWD_FUN_POW_HPP
2#define STAN_MATH_FWD_FUN_POW_HPP
29template <
typename T1,
typename T2,
30 require_any_fvar_t<base_type_t<T1>, base_type_t<T2>>* =
nullptr,
31 require_all_stan_scalar_t<T1, T2>* =
nullptr>
32inline auto pow(
const T1& x1,
const T2& x2) {
46 }
else if (x2 == -1) {
48 }
else if (x2 == -0.5) {
50 }
else if (x2 == 0.5) {
52 }
else if (x2 == 1.0) {
54 }
else if (x2 == 2.0) {
73template <
typename T1,
typename T2, require_any_container_t<T1, T2>* =
nullptr,
74 require_all_not_matrix_st<is_var, T1, T2>* =
nullptr,
75 require_any_fvar_t<base_type_t<T1>, base_type_t<T2>>* =
nullptr>
76inline auto pow(
const T1& a,
const T2& b) {
78 a, b, [](
const auto& c,
const auto& d) {
return stan::math::pow(c, d); });
complex_return_t< U, V > complex_pow(const U &x, const V &y)
Return the first argument raised to the power of the second argument.
fvar< T > inv_square(const fvar< T > &x)
auto pow(const T1 &x1, const T2 &x2)
fvar< T > log(const fvar< T > &x)
fvar< T > sqrt(const fvar< T > &x)
auto apply_scalar_binary(const T1 &x, const T2 &y, const F &f)
Base template function for vectorization of binary scalar functions defined by applying a functor to ...
fvar< T > inv_sqrt(const fvar< T > &x)
fvar< T > inv(const fvar< T > &x)
fvar< T > square(const fvar< T > &x)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
If T is a complex type (that is, an instance of std::complex) or a cv-qualified version thereof,...
Defines a static member function type which is defined to be false as the primitive scalar types cann...