Releases: stan-dev/math
Releases · stan-dev/math
v5.1.0 (2 September 2025)
- Added functions for the embedded Laplace approximation. (#3097, #3209, #3210)
- Added new overloads for
sum_to_zero_constrainandsum_to_zero_freethat accept Eigen Matrix types. (#3169) - The simplex transform is now defined in terms of the isometric log ratio transform instead of stick breaking. (#3171)
- Renamed
hypergeometric_1f0tohypergeometric_1F0for consistency, fixed compilation forhypergeometric_2f1with autodiff second argument. (#3165) - Simplified implementation of
chol2invusing matrix functions. (#3136) - Improved the numerical stability of the gradient calculations for
inv_Phiandstd_normal_log_qf. (#3139, #3207) - Simplified vectorisation of
std_normal_lpdf. (#3140) - Removed redundant computation in
grad_reg_inc_beta. (#3159) - Updated signature for
apply_scalar_binaryto take the functor as its first argument, instead of the last. (#3156) - Added perfect forwarding to all functions that use the
apply_family of functors. (#3221, #3228, #3229) - Fixed expression test errors with
poisson_binomial_rng, added support for row-vector andstd::vector<double>thetaarguments forpoisson_binomial. (#3178) - Updated
inv_logitto use the logistic function from Eigen. (#3155, #3160) - Update the constraint functions templating to be more flexible. (#3151)
- Added ARM64 testing to the Github CI for Windows and Ubuntu (#3177, #3173, #3180, #3174, #3158, #3164)
- Disabled Make's implicit rules in our Makefiles. (#3183)
- Updated Boost to version 1.87.0 (#3185)
- Patched an issue preventing TBB from building with clang 21.1 (#3223)
v5.1.0-rc4 (22 August 2025)
Tagging v5.1.0-rc4
v5.1.0-rc3 (18 August 2025)
Tagging v5.1.0-rc3
v5.1.0-rc2 (12 June 2025)
Tagging v5.1.0-rc2
v5.1.0-rc1 (5 June 2025)
Tagging v5.1.0-rc1
v5.0.0 (10 December 2024)
Breaking changes:
- Removed deprecated
_log()probability functions. (#2995) - Moved constraint transforms to their own folder. (#3039)
- Updated arena_matrix to use move semantics. (#2928)
- Un-vendored a great many unused boost libraries. (#3129)
- C++17 is now required.
Other changes:
- Added
sum_to_zero_constrain,sum_to_zero_free, andcheck_sum_to_zero. (#3101) - Added beta_neg_binomial_lpmf. Allows modeling heavy-tail count data. (#3108)
- Added beta_neg_binomial_lccdf. (#3114, #3118)
- Added beta_neg_binomial_lcdf. (#3116)
- Added beta_neg_binomial_cdf. (#3120)
- Added beta_neg_binomial_rng. (#3126)
- Added overloads for tuples of bounds to
lub_freeandlub_constrain. (#3087) - Added error checking functions for row/column stochastic matrices. (#3095)
- Added constructor to vari for passing initial values and adjoints. (#3089)
- Improved efficiency of
finite_diff_gradient_auto. (#3096) - Functions concerned with the number of entries in a container (
size,cols,rows, ...) now consistently uselong intas their return type. (#3086) - Removed support for adding makefile variables in
~/.config/stan/make.local. Use themake/localfile in the Math directory instead. (#3090) - Fixed an indexing bug inside gp_matern32_cov. (#3084)
- Fixed the new
wiener_lpdfoverloads evaluating their expression template arguments more than once. (#3112) - Fixed some failures to compile calls to
powwhen using libc++ 19. (#3110) - Updated templated complex functions in the Stan math library to be better candidates than the standard library functions during ADL. (#3122)
- Fixed a warning about a mismatched struct/class declaration from clang 18. (#3091)
- Fixed compilation of
fabswith Apple Clang 15. (#3093) - Fix Eigen issue 2852 so that Eigen's kronecker product type works with
value_type_t. (#3124)
v5.0.0-rc1 (25 November 2024)
Tagging v5.0.0-rc1
v4.9.0 (3 June 2024)
- Stan now detects if your compiler supports C++17 and will issue a warning if it is not available. Support for pre-C++17 compilers may be removed as early as next version. (#3063)
- Added a new distribution:
wiener_full_lpdf. (#2822) - Replaced
static constobjects withstatic constexprwhen available. (#2830) - Gradients for the
hypergeometric_pFqfunction rewritten for increased speed and stability. (#2961) - Added the Hypergeometric 1F0 function and gradients. (#2962)
- Removed macro usage in the definitions of the
require_templates. (#2965) - Added a sparse matrix implimentation for
arena_matrix. (#2971) - Added hand-calculated derivatives for the multivariate normal lpdf. (#2980)
- Added derivatives for the
multi_student_t_cholesky_lpdf. (#2990) - Added constrain function for creating matrices holding row or column simplexes. (#2992)
- Updated TBB Windows build rules for compatibility with RTools make. (#2999)
- Improved efficiency of
von_mises_lpdfgradient calculation, credit to @venpopov. (#3010) - Fixed a few additional issues in checking the inputs to distributions defined over cholesky matrices. (#3012)
- Functions which are wrappers around CVODES and IDAS routines from Sundials now throw
domain_error, rather than a mix ofdomain_errorandruntime_error. (#3013) - Fixed the stack_allocator being able to return non-8-byte aligned pointers. (#3014)
- Upgrade bundled Boost headers to 1.84. (#3001, #3018, #3019)
- Fixed a bug where
linspaced_arraywas returning its results truncated to integers. (#3023) - Fixed the return type of
max(int, int)being a double. (#3024) - Added 'override' to built-in make variables. (#3028)
- Maded
sqrt(x)have a finite gradient atx=0. Allowsdistance(x,y)to work forx=ytoo. (#3033) - Improved stability of the
von_mises_lpdffunction to avoid numeric overflow. Now it's no longer necessary to use the normal_lpdf for kappa>100, allowing vectorizing of the likelihood. (#3036) - Updated the
weibull_cdfandweibull_lcdffunctions for numerical stability as well as correct handling ofy == 0.0. (#3037) - Improved speed of
inv_Phiandstd_normal_qffunctions. (#3046) - Fixed spurious linker issue with
csr_matrix_times_vector. (#3048, #3053) - Improved error messages when variables dimensions do not match in operations that require it. (#3049)
- Added support for Windows ARM64 with RTools ARM64 toolchain. (#3051)
- Fixed
clean-allerror when using external SUNDIALS libraries. (#3054) - Fixed several small floating-point accuracy issues with ARM64 platforms. (#3059)
- The RNGs for the multinomial and multinomial_logit distributions now accept a zero total count, resulting in a zero integer vector. (#3061)
- Fixed a data race in profiling in multiple threads. (#3066)
- Backported SUNDIALS bugfix for hashmap integer overflow. (#3072)
v4.9.0-rc2 (23 May 2024)
Tagging v4.9.0-rc2
v4.9.0-rc1 (13 May 2024)
Tagging v4.9.0-rc1