math
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...
In constants.hpp, I noticed there are some constants that get a small unnecessary rounding error due to how they are defined. For example, with 64bit precision floating point, we have:...
hi all, (sorry if this is the wrong place for this) I was fitting a mixture model that involves multiple calls to `beta_binomial_lpmf`. There, I put a linear model on...
The only GLM lpmf/lpdf test in test/unit/math/**prim**/prob/ seems to be for binomial_logit_lpdf The other GLMs apparently only have tests in test/unit/math/**rev**/prob/ Maybe the files just should be split into two?...
Stan's log cdfs just take the log of the linear cdf, so they're prone to underflow to -infinity after the cdc underflows to 0 or rounds to 1. The R...
Compiling the following Stan code gives an error about bad return deduction ```stan parameters { vector[5] sigma_gamma_n; matrix
## Summary As discussed in issue #3127, I've implemented a log sum exp function that computes the logarithm of the element-wise sum of exponentials and returns the result as a...
A [couple](https://discourse.mc-stan.org/t/cmdstan-intel-tbb-error-when-compiling-model/38618) [issues](https://discourse.mc-stan.org/t/oserror-using-bridgestan-from-within-conda-env/38693) have come up on the forums which were caused by environments (hpc or conda) shipping newer versions of TBB than Stan, causing linking issues if the environment's...
Currently, according to the guide https://mc-stan.org/docs/functions-reference/complex-valued_basic_functions.html it seems that basic arithmetic operators and `pow` are the only functions that accept complex vectors. I am modelling some periodicities in data using...
## Description This is one of those things where I can't tell if it's a bug or a user error, but I'm trying to use an `arena_matrix` type and I'm...
It would be nice to have a function that works like log_sum_exp but elementwise, so the return was also a container. > I have a similar issue with `log_sum_exp` where...