math icon indicating copy to clipboard operation
math copied to clipboard

The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed modes. It includes a range of built-in functions for probabilistic modelin...

Results 261 math issues
Sort by recently updated
recently updated
newest added

## Summary This PR updates the Bernoulli CDF functions (`_cdf`, `_lcdf`, and `_lccdf`) to operate on the log scale as much as possible, to avoid issues with underflow and resolution...

## Summary Updates Eigen to 3.4-rc1 to test and report any issues downstream. ## Tests No new tests ## Side Effects See the release page for the updates to 3.4...

## Description Attempting to run OpenCL code with Intel Integrated graphics gives the error: ``` [ RUN ] ProbDistributionsBernoulliCdf.opencl_matches_cpu_small exception thrown in signature const std::tuple&]: unknown file: Failure C++ exception...

## Summary Fix #2529 by re-implementing the `prim` version of the function. ## Tests - test `matrix_exp_multiply_handle` components that calculate the taylor expansion order and helper function approximating matrix power...

## Description As mentioned in #2641, the `math::size()` overloads should have a return type consistent with Eigen's `size()` member to avoid compiler errors when calling code such as: ``` Eigen::VectorXd...

## Summary This is a prototype for discussion about allowing our distributions to return back vectors instead of just scalars. I only did `normal_lpdf` as an example of how this...

## Description The binary overload for `log_sum_exp` currently only accepts two scalar arguments (i.e., not two matrices to operate elementwise on). While the binary overload for `log_diff_exp` does accept two...

## Description The `bernoulli_cdf` function directly subtracts the probability parameter from 1, and then multiplicatively accumulates for vectorised inputs: ``` const T_partials_return Pi = 1 - theta_vec.val(i); P *= Pi;...

With vectorized indexing I expected to be able to increment/decrement the `array[] int` but that is not allowed. For this special case I think it makes sense to allow adding...

feature
new function
good first issue

## Description The Math library currently has the normalised incomplete gamma functions (`gamma_p` and `gamma_q`), which return values within [0, 1]. The log of the `gamma_p` function is used for...