1#ifndef STAN_MATH_PRIM_PROB_STD_NORMAL_LPDF_HPP
2#define STAN_MATH_PRIM_PROB_STD_NORMAL_LPDF_HPP
30 bool propto,
typename T_y,
31 require_all_not_nonscalar_prim_or_rev_kernel_expression_t<T_y>* =
nullptr>
35 static constexpr const char* function =
"std_normal_lpdf";
47 T_partials_return logp = -
dot_self(y_val) / 2.0;
51 partials<0>(ops_partials) = -y_val;
58 return ops_partials.build(logp);
61template <
typename T_y>
63 return std_normal_lpdf<false>(y);
return_type_t< T_y_cl > std_normal_lpdf(const T_y_cl &y)
The log of the normal density for the specified scalar(s) given a location of 0 and a scale of 1.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
int64_t size(const T &m)
Returns the size (number of the elements) of a matrix_cl or var_value<matrix_cl<T>>.
bool size_zero(const T &x)
Returns 1 if input is of length 0, returns 0 otherwise.
const double NEG_LOG_SQRT_TWO_PI
The value of minus the natural logarithm of the square root of , .
void check_not_nan(const char *function, const char *name, const T_y &y)
Check if y is not NaN.
auto dot_self(const T &a)
Returns squared norm of a vector or matrix.
auto as_value_column_vector_or_scalar(T &&a)
Extract values from input argument and transform to a column vector.
auto make_partials_propagator(Ops &&... ops)
Construct an partials_propagator.
typename ref_type_if< true, T >::type ref_type_t
typename partials_return_type< Args... >::type partials_return_t
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Extends std::true_type when instantiated with zero or more template parameters, all of which extend t...
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...