Stan Dev Math Versions Save

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 modeling, linear algebra, and equation solving.

v4.2.0-rc1

2 years ago

v4.1.0

2 years ago
  • Added the Cash-Karp numerical integrator to improve numerical integration of ODEs with semi-stiffness and/or rapid oscillations.(#2336)
  • Added the quantile function.(#2398)
  • Added custom reverse mode for diag_pre_multiply() and diag_post_multiply() functions.(#2405, #2453)
  • Optimized multi_normal_cholesky for non-autodiff covariance. (#2439)
  • Updated Sundials to 5.7.0.(#2441)
  • Improved memory safety of nested paralellism.(#2445)
  • Updated TBB to 2020.3.(#2447)
  • Added the STAN_NO_RANGE_CHECKS macro which turns off bounds and range checks.(#2423, #2437)
  • Optimized gp_*_cov functions, especially for large amount of data.(#2464)
  • Fixed compilation errors when using unsigned and long types with apply_scalar_unary.(#2469)
  • Added the implementation of the loglogistic probability density function.(#2477)
  • Adds reverse mode specialization for `csr_matrix_times_vector(sparse data, dense parameter).(#2462)
  • Allow tbb init to set the number of threads by an argument.(#2455)
  • Fixed a bug with expressions in poisson distribution functions.(#2414)
  • Fixed the off by one error in set_zero_all_adjoints_nested.(#2399)
  • Fixed bug with printing Eigen expressions.(#2436)
  • Refactored operands and partials to avoid extra allocations.(#2418)
  • Tidied up distributions C++ code.(#2352)
  • Updated the integrate_1d internal interface updated in preparation for closures(#2397)
  • Added docs for new contributors with a getting started guide and docs for contributing new distributions.(#2350, #2466)
  • Added an ODE testing framework.(#2432)
  • Replaced the finite difference approximation of the Hessian from one that is based on function calls to one that is based on gradients.(#2348)
  • Updated code generation for expression tests.(#2419)
  • Fixed a bug in expression tests and benchmark generation, where downloading stanc.exe did not work on Windows.(#2480)
  • Varmat:
    • Add rep_* utility functions for new matrix type(#2358)
    • var<Matrix> overloads for digamma, distance, Phi, inv_Phi, Phi_approx, sqrt, tail, tgamma, rows_dot_self, fma, offset_multiplier, bessel first and second kind, beta, binary log loss, ceil, erf, erfc, exp2, expm1, falling_factorial and floor (#2362, #2378, #2396, #2461)
    • Added lb/ub/lub_constrain specializations.(#2373, #2382, #2387, #2379)
    • Added script to automatically check stanc3 signatures for varmat compatibility.(#2434)
  • OpenCL:
    • Fixed OpenCL implementations of distributions mostly not working with row vectors.(#2360)
    • Added prim and rev OpenCL implementations for to_matrix, to_vector, to_row_vector, to_array_1d, to_array_2d, append_array, reverse, symmetrize_from_lower_tri, symmetrize_from_upper_tri trace.(#2377, #2383, #2388)
    • Added OpenCL functions rep_matrix, rep_vector, rep_row_vector, rep_array and identity_matrix.(#2388)
    • Added operator %.()
    • Reorganized how work is distributed between threads in generated kernels that use colwise reductions (including all distributions), significantly improving GPU preformance.(#2392)
    • Removed .triangularTranspose() member funtion from matrix_cl and TriangularMapCL enum. .triangularTranspose() is replaced by symmetrize_from_lower_tri().(#2393)
    • Added support for two dimensional reductions to kernel generator.(#2403)
    • Added OpenCL implementations for functions log_mix, log_softmax, log_sum_exp, rank, sd, softmax and ˙variance.(#2426)
    • Added OpenCL implementations for ub_constrain, lb_constrain, lub_constrain, offset_multiplier_constrain and unit_vector_constrain.(#2427)
    • Added OpenCL implementation for prod function and kernel generator operation for rowwise, colwise and 2d product.(#2433)
    • Added OpenCL implementations for functions: bernoulli_cdf, bernoulli_lcdf, bernoulli_lccdf, cauchy_cdf, cauchy_lcdf, cauchy_lccdf.(#2446)
    • Added OpenCL implementations for functions double_exponential_cdf, double exponential_lcd, double_exponential_lccdf˙, exp_mod_normal_cdf, exp_mod_normal_lcdf and exp_mod_normal_lccdf.(#2449)
    • Added OpenCL implementations for functions exponential_cdf, exponential_lcdf, exponential_lccdf, frechet_cdf, frechet_lcdf and frechet_lccdf.(#2450)
    • Added OpenCL implementations for functions gumbel_cdf, gumbel_lcdf, gumbel_lccdf, logistic_cdf, logistic_lcdf and logistic_lccdf.(#2451)
    • Added a new kernel generator operation that allows writing custom OpenCL code.(#2454)
    • Added OpenCL implementations for functions pareto_cdf, pareto_lccdf, pareto_lcdf, pareto_type_2_cdf, pareto_type_2_lccdf, and pareto_type_2_lcdf.(#2456)
    • Added OpenCL implementations for functions: rayleigh_cdf, rayleigh_lccdf, rayleigh_lcdf, skew_double_exponential_cdf, skew_double_exponential_lccdf, skew_double_exponential_lcdf and skew_double_exponential_lpdf.(#2457)
    • Added OpenCL implementations for functions lognormal_cdf, lognormal_lccdf, lognormal_lcdf, normal_cdf, normal_lccdf, normal_lcdf.(#2458)
    • Added OpenCL implementations for functions std_normal_cdf, std_normal_lccdf, std_normal_lcdf, uniform_cdf, uniform_lccdf and uniform_lcdf.(#2459)
    • Added OpenCL implementations for functions weibull_cdf, weibull_lccdf and weibull_lcdf.(#2460)
    • Removed unused OpenCL kernels and checks.(#2463)
    • Added OpenCL prim implementation for functions: gp_exponential_cov, gp_matern32_cov, matern_52_cov and both prim and rev implementation for gp_dot_prod_cov.(#2471)
    • Added reference (ref_type) for kernel generator expressions.(#2404)
    • Added typecast operation to kernel generator.(#2472)

v4.1.0-rc1

3 years ago

v4.0.1

3 years ago
  • Fixed issue with cholesky_decompose not propagating derivatives correctly .
  • Fixed OpenCL implementations of distributions mostly not working with row vectors.
  • Fixed handling of input expressions with reduce_sum.

v4.0.0

3 years ago

New functions:

  • Add symmetrize_from_lower_tri(matrix m) function to stan::math.(#2209)
  • Added the Moore-Penrose generalized inverse, available with the generalized_inverse function.(#2225)
  • Implement svd_U and svd_V, add gradients to singular_values.(#2286)
  • Added linspaced_int_array.(#2312)

Miscellaneous improvements and bugfixes:

  • Speedup reduce_sum parallelism.(#2162)
  • Make gradients for negative binomial and 2F1 function more robust for boundary values.(#2175)
  • Fixed problem with integrate_1d tolerances(#2183)
  • Fixed a bug in check_matching_dims that prevented checking vectors of Eigen matrices of vars.(#2220)
  • Updated log-likelihood calculation for ordered_probit_lpmf for increased numerical stability(#2229)
  • Updated TBB makefiles to support building on M1 Macs.(#2208)
  • Updated mdivide_left to avoid doing QR decomposition in reverse passes. (#2230)
  • Upgraded to Eigen 3.3.9.(#2238)
  • Upgraded Sundials to 5.6.1.(#2242, #2283)
  • Use immediately invoked lambdas in size and range error checks to improve code caching. (#2255)
  • Added a python script that can generate and run benchmarks for most of function signatures in math.(#2260)
  • scalar_type_t now decays references for var_value<T> types(#2264)
  • Added adjoint_of() function that accesses .adj() of vars, but analogous to value_of() also works on prim types (returning a dummy object).(#2270)
  • Wishart and inverse wishart functions now check that symmetric positive definite inputs are actually symmetric positive definite.(#2281)
  • Fix potential segfault when mixing reduce_sum() and print().(#2319)
  • Fixed a bug in dirichlet_lpdf and multi_normal_cholesky_lpdf, where function overloads that do broadcasting produced wrong derivatives. (#2331)

Expressions:

#2093, #2131, #2133, #2136, #2138, #2139, #2150, #2151, #2186, #2190, #2205

  • Generalized all remaining prim functions.
  • Prim functions now return expressions where applicable.
  • Removed the requirement for linear indexing from prim function
  • Improved expressions testing: No longer relying on an separate file of functions that do not support expressions

OpenCL:

#2117, #2155, #2176, #2177, #2180, #2181, #2215, #2173, #2174, #2184, #2185, #2191, #2216, #2217, #2217, #2219, #2221, #2222, #2226, #2231, #2236, #2236, #2250, #2253, #2258, #2259, #2263, #2267, #2270, #2272, #2273, #2274, #2275, #2294, #2295, #2296, #2311, #2316

  • Added OpenCL reverse mode support for lpdf/lpmf functions: bernoulli_lpmf, bernoulli_logit_lpmf, beta_lpdf, beta_proportion_lpdf, binomial_lpmf, cauchy_lpdf, chi_square_lpdf, double_exponential_lpdf, exp_mod_normal_lpdf, exponential_lpdf, frechet_lpdf, gamma_lpdf, gumbel_lpdf, inv_chi_square_lpdf, inv_gamma_lpdf, logistic_lpdf, lognormal_lpdf, neg_binomial_lpmf, neg_binomial_2_lpmf, neg_binomial_2_log_lpmf, normal_lpdf, pareto_lpdf, pareto_type_2_lpdf, poisson_lpmf, poisson_log_lpmf, rayleigh_lpdf, scaled_inv_chi_square_lpdf, skew_normal_lpdf, std_normal_lpdf, student_t_lpdf, uniform_lpdf and weibull_lpdf.
  • Added OpenCL reverse mode support for acos, acosh, add, add_diag, asin, asinh, atan, atanh, beta, block, cbrt, ceil, cholesky_decompose, col, cols, columns_dot_product, columns_dot_self, cos, cosh, crossprod, diag_matrix, diagonal, diag_post_multiply, diag_pre_multiply, digamma, dims, distance, dot_product, dot_self, elt_divide, elt_multiply, erf, erfc, exp, exp2, expm1, fabs, floor, head, hypot, inv, inv_cloglog, inv_logit, inv_Phi, inv_sqrt, inv_square, lbeta, ldexp, lgamma, lmultiply, log, log10, log1m, log1m_exp, log1m_inv_logit, log1p, log1p_exp, log2, log_diff_exp, log_inv_logit, log_inv_logit_diff, logit, mdivide_left_tri_low, mdivide_right_tri_low, mean, multiply, multiply_log, num_elements, Phi, Phi_approx, pow, round, row, rows, rows_dot_product, rows_dot_self, segment, sin, sinh, size, sqrt, square, squared_distance, sub_col, sub_row, subtract, sum, tail, tan, tanh, tcrossprod, tgamma, transpose and trunc.
  • Reduced amount of copying when using OpenCL. CPUs and integrated GPUs can use host memory in place. Transferring data to discrete GPUs can avoid one copy to pinned memory on host side if the new pinned_matrix class is used. Depending on the OPenCL implementation, optimization for CPUs and Discrete GPUs may also require use of this class. (#2219)
  • Improved kernel generator: simplified writing of broadcasting tests, fixed a bug when using same operations on different sets of unique matrices, fixed check_cl, extended support for integer arguments, added support for kernel expressions returning a scalar, added compound assignment operators, made transpose kernel generator operation assignable.
  • Bugfixed arena_matrix_cl so it can be assigned a matrix_cl.(#2270)

Varmat:

  • Added varmat implementations of cholesky_decompose, columns_dot_self, determinant, dot_self, inverse, log_determinant, matrix_power, multiply_lower_tri_self_transpose, and tcrossprod, add, operator+, operator-, quad_form, trace_quad_form, transpose (member function), variance, sd, log_softmax, log_sum_exp, divide, trace_gen_quad_form, dot_product, columns_dot_product, rows_dot_product, squared_distance, mdivide_left_spd, mdivide_left_tri, mdivide_left, log_determinant_spd, mdivide_left_ldlt, mdivide_right_ldlt, log_determinant_ldlt, trace_gen_inv_quad_form_ldlt, trace_inv_quad_form_ldlt (#2105, #2106, #2115, #2163, #2164, #2168, #2169, #2171, #2172, #2196, #2199, #2212, #2213, #2230, #2232, #2266, #2280, #2305)
  • Adds var_value<Matrix> overloads for array and column vector converters.(#2278)
  • Make multivariate distributions work with varmat(#2284)
  • Adds sequence views for var<matrix> to make some of the distributions var matrix compatible(#2292)
  • to_var_value and from_var_value now work with std::vector types(#2299)
  • Add more methods for taking blocks of var matrices.(#2188)
  • Updating matrix constrains to work with varmart(#2254)
  • Adds arc trig functions for var<matrix> along several other unary operators (#2256)

v3.5.0-rc1

3 years ago

v3.4.0

3 years ago

Math 3.4.0 Release Notes

  • Generalize signatures to accept general Eigen expressions (#1844, #1931, #1944, #1945, #1944, #2022, #2023, #2028, #2029, #2056, #2058, #2061, #2062, #2066, #2068, #2069, #2070, #2072, #2073, #2074, #2075, #2081, #2082, #2087, #2088, #2089, #2104, #2109, #2110, #2118, #2119, #2134, #2137, #2140)
  • Add templates to var and vari so that autodiff can use multiple floating point types.(#1915)
  • Made binomial_lpmf work more reliably when the probability parameter is 0.0 or 1.0(#1988)
  • Fixed requires docs(#1990)
  • fixed doxygen documentation of hmm_marginal(#1994)
  • Vectorised binary scalar functions (#1987, #2002, #2005)
  • Added reverse_pass_callback, a simpler and faster alternative to adj_jac_apply. dot_product implementation that accepts pointers has been removed.(#2011)
  • Added missing implementations for the unary plus.(#2032)
  • Reduced some duplicate ODE test code(#2039)
  • Fix problems with higher order gradients in probability test framework(#2042)
  • forward_as requires types match exactly -- not just be convertible(#2054)
  • C0 in gaussian_dlm_obs_lpdf and gaussian_dlp_obs_rng can now be positive semidefinite(#2143)
  • Made behaviour of fmin and fmax with equal inputs equivalent across reverse- and forward-mode(#2063)
  • Cleaned up the use of <Eigen/*> outside the main Eigen header file.(#2080)
  • fixed numerical issue with quad_form_sym.(#2096)
  • Added function for creating an ordered integer sequence(#2108)
  • The states returned by hmm_hidden_state_rng now live on {1, 2, ..., K}, rather than {0, 1, ..., K - 1}.(#2113)
  • Removed a duplicated check function.(#2126)

var_value:

  • Allowed vari to hold an Eigen type(#1952)
  • operands_and_partials now supports var_value operands.(#1970)
  • Added views for var_valueEigen::Matrix class(#2024)
  • Added functions for conversion between var_value and Eigen matrix of vars and a metaprogram that determines return type of a function that accepts a mixture of var_values and Eigen matrices and propagates var_value if present.(#2047)
  • Adds softmax function for ˙var_value` matrices and testing scheme for checking array of structs vs struct of arrays matrix var implimentation.(#2050)
  • Adds views to vari_value<Matrix> types that allow for compound slicing expressions.(#2064)
  • Enabled assigning to blocks and other views into var_value.(#2065)
  • Adds multiplication function for var matrices and a test suite for checking the correctness of binary functions that accept var matrices as an input.(#2091)
  • Add var and var matrix specializtion elementwise product.(#2121)

Testing:

  • Updated test values for pow() to fixed false positives in the testing framework(#2123)
  • Upgraded Google Test to v1.10.x.(#1995)
  • Added Google Benchmark as a test dependency.(#1995)
  • Added testing framework for checking that functions exposed to stan language accept Eigen Expressions.(#1980, #2027)
  • Removed unit tests for reduce_sum threading that caused false positives.(#2033)
  • Added more tests for vectorized probability functions(#2085)
  • Added makefile variables that will be used for optimizations in the upstream interfaces (#2020)
  • Jumbo tests are used for all test/unit/math unit tests.(#2057)
  • Added address sanitizer to continuous integration.(#2146)

Building:

  • Removed the use of the GNU cut utility.(#2126)
  • Improved error messaging on Windows if the C++ toolchain was installed in a folder with spaces.(#2009)
  • Added flags to suppress warnings when building TBB.(#1993)
  • Switched /bin/bash with /usr/bin/env bash in the makefiles.(#1998)

OpenCL backend:

  • Added support for elementwise checks to kernel generator(#1977)
  • Removed matrix_cl<var> specialization.(#2021)
  • OpenCL implementation normal_id_glm_lpdf can also be used when derivatives of x or y are needed.(#2034)
  • OpenCL implementations of bernoulli_logit_glm_lpmf and poisson_log_glm_lpmf can also be used when derivatives of x are needed.(#2035)
  • Added index operations to kernel generator.(#2051)
  • Implemented indexing for kernel generator expressions.(#2052)
  • OpenCL implementations of neg_binomial_2_log_glm_lpmf, ordered_logistic_glm_lpmf and categorical_logit_glm_lpmf can also be used when derivatives of x are needed.(#2055)
  • Added an option to select the OpenCL device to use at runtime.(#2067)
  • Simplified tests of GPU GLMs by moving repeated code into a common utility header.(#2097)
  • Added OpenCL reverse mode implementations of matrix multiply and sum.(#2099)
  • vari_base can now be constructed with matrix_cl value and adjoint. Copying between host and device is possible for vars containing Eigen::Matrix/matrix_cl. Adjoints are propagated over these copies.(#1967)

v3.4.0-rc1

3 years ago

v3.3.0

3 years ago

Math 3.3.0 Release Notes

  • New functions is_nonnegative and is_positive_finite to parallel check_nonnegative and check_positive_finite. They signal failure by returning false instead of by throwing std::domain_error.(#1798)
  • Functions check_not_nan, check_nonnegative, check_positive, check_finite, check_positive_finite, is_not_nan, is_nonnegative, is_positive, is_scal_finite, and is_positive_finite now operate on nested containers.(#1798)
  • Clearer error messages when csr_u_to_z is called with out of range indices.(#1798)
  • check_positive now throws domain error when given an unsigned 0.(#1798)
  • Adds documentation for the OpenCL modules.(#1804)
  • OpenCL kernel for matrix-vector multiply is replaced with kernel generator.(#1816)
  • Added optional broadcasting to kernel generator.(#1817)
  • Adds additional testing for checking type traits of Eigen objects and modifies type traits for Eigen matrices so detecting an Eigen matrix will only be true if neither rows or columns are equal to 1(#1827)
  • Generalized functions with names starting with letters e-l to accept general Eigen expressions.(#1828)
  • Updates to Eigen 3.3.7(#1832)
  • extended Eigen scalar traits to complex autodiff types to enable complex autodiff matrix operations(#1838)
  • added eigenvalues(), eigenvectors(), pseudo_eigenvalues(), pseudo_eigenvectors(), and complex_schur_decompose() functions(#1838)
  • Added function for more efficient extraction of values and derivatives from Eigen containers of autodiff variables(#1841)
  • Generalized function with names starting with m to p to accept geenral Eigen expressions.(#1845)
  • Generalized functions with names starting with q and r.(#1847)
  • Generalized functions starting with s and t.(#1848)
  • Cleaned up the use of Boost headers.(#1851)
  • Fixed issue where doing nested gradients while there is an ongoing chain would cause segfaults.(#1856)
  • Added support for int add(int,int) and real add(real,real).(#1858)
  • Added OpenCL support for prim versions of add, col, inv, inv_cloglog, inv_logit, inv_sqrt, inv_square, row, dims, cols.(#1859)
  • Added argument checks to OpenCL version of block() and renamed is_valid_expression to is_valid_kernel_expression and require_all_valid_expressions* to require_all_valid_kernel_expressions*.(#1859)
  • Added floating point classification functions (isfinite, isnan, isinf) to kernel generator.(#1860)
  • Added diagonal operation to kernel generator.(#1862)
  • Adds holder operation to kernel generator.(#1865)
  • Added matrix concatenation oprations (append_row and append_col) to kernel generator.(#1867)
  • Add two functions for hmm models that (i) evaluate the marginal posterior probability of each latent state and (ii) sample latent states from their posterior distribution.(#1868)
  • Renamed elewise_multiplication/elewise_division to elt_multiply/elt_divide in the kernel generator and added OpenCL support to /prim functions crossprod, tcrossprod, fabs, log1m_inv_logit, logit, divide(#1869)
  • Updated cpplint to conform to pypi(#1871)
  • value_of and value_of_rec now can now return Eigen expressions.(#1872)
  • Reverse mode differentiation of stan::math::eigenvectors_sym and stan::math::eigenvalues_sym now returns symmetric matrix (previously lower triangular).(#1878)
  • Refactored Jenkins CI stages.(#1881)
  • Implements both branches of the Lambert W function.(#1882)
  • Added -Wno-int-in-bool-context and -Wno-attributes compiler flags to silence warnings due to compiler bugs.(#1885)
  • Fixed bug causing wrong log-probability values to be returned when using the lognormal distribution with an integer argument for sigma.(#1894)
  • Unified EXPECT_MATRIX_* and EXPECT_STD_VECTOR_* macros in the Math unit tests.(#1895)
  • Added Github Actions to CI.(#1898)
  • Generalized GLM functions so they accept arbitrary Eigen expressions.(#1899)
  • Added framework for vectorizing/broadcasting binary scalar functions, and utilities for testing the values and gradients of these(#1907)
  • Fixed a bug where the appropriate specialization for the beta function was not called for forward-mode autodiff variables(#1909)
  • Added holder operation for Eigen expressions. value_of, value_of_rec, as_column_vector_or_scalar and as_array_or_scalar now work with rvalue inputs.(#1914)
  • Generalized functions related to Bernoulli distribution to accept Eigen expressions.(#1916)
  • Vectorized binary functions extended to take complex variables as inputs(#1917)
  • Fixed a bug that resulted in wrong result when constructing matrix_cl from row-major matrix or expression.(#1919)
  • Generalized functions related to Bernoulli distribution to accept Eigen expressions.(#1925)
  • Add log-parametrized multinomial distribution.(#1927)
  • Replaced OpenCL kernels for bernoulli_logit_glm_lpmf and poisson_log_glm_lpmf with kernel generator implementations.(#1929)
  • Generalized functions related to beta distribution to accept general Eigen expressions.(#1930)
  • Fixed one sided checks in test_repeat_as_vector in distribution tests.(#1933)
  • Simplified using operands_and_partials by making broadcast_array sum the argument when assigned to.(#1934)
  • Extended check_matching_dims to handle arbitrary containers.(#1936)
  • Bugfix for require style templates(#1942)
  • Fix segfaults when compiling mix tests for pow on Windows with g++ 4.9.3(#1951)
  • Extends binary vectorisation framework to take combinations of real and int containers as inputs(#1966)
  • Fixed generated OpenCL kernels using colwise reductions to work on OpenCL implementations that require local variables to be declared at the top level of kernel function.(#1975)
  • Added variadic ODE interfaces (ode_bdf, ode_adams, ode_rk45 and ode_bdf_tol,ode_adams_tol, ode_rk45_tol) and deprecated the old interfaces (integrate_ode_rk45, integrate_ode_bdf, integrate_ode_adams). It is important to switch to the new interfaces because the deprecated interfaces are much slower (we've seen up to 30%) than they previously were (#1641)

v3.2.0

4 years ago

Math 3.2.0 Release Notes

Feature summary:

  • Added new reduce_sum utility for parallelizing calculations over multiple cores of one computer
  • Sundials upgrade to version 5.2.0
  • Support for size 0 matrices [Ben: This needs checked by someone in release candidate, it might be just a Math-facing feature]
  • discrete_range_lpmf/lcdf/lccdf/rngs/etc. added for uniform discrete random variable
  • Added row vector, array and int_array construction utilities
  • Adds reverse function for vectors, row vectors, and std::vectors
  • Added release notes section to pull request to make assembling release notes easier (this must be filled out for new pulls)
  • Added apply operator (standin for C++17 apply)
  • Added support for complex numbers at all levels of the autodiff library

Bugfix summary:

  • Fixed problems with vectorizing neg_binomial_* functions that lead to wrong answers
  • Improved lbeta to be more numerically stable with one large and one small argument
  • Improved numerical stability with binomial_coefficient_log, neg_binomial_2_lpmf, and neg_binomial_2_log_lpmf computations
  • Fixed problem with wrong gradients for large arguments to log_sum_exp
  • Fixed bug where normal_id_glm did not work with a sigma is not an autodiff type
  • Fixed problem with makefiles on Windows
  • Fix ode gradients with respect to t0

There were also extensive work in various parts of the Math library adding docs, cleaning up distribution functions, adding tests, generalizing functions to work with special Eigen temporary types, working with new template functions (return_type_t, etc.), and otherwise making quality of life improvements.

Thanks to everyone who submitted and reviewed pull requests! The list of pull request submitters for this release are (in no particular order): @t4c1, @mcol, @martinmodrak, @rok-cesnovar, @serban-nicusor-toptal, @SteveBronder, @kedartal, @wds15, @bob-carpenter, @peterwicksstringfield, @andrjohns, @pgree, @IvanYashchuk, and @bbbales2.

Pull request details:

Contributor Title
t4c1 : (#1824) Add unary operations minus and logical negation to kernel generator
wds15 : (#1819) Feature/issue 1818 upgrade sundials 520
SteveBronder : (#1813) adds reduce_sum and tests
t4c1 : (#1802) Add extended kernel generator docs
t4c1 : (#1801) Add support for device functions to kernel generator
SteveBronder : (#1800) Adds auxilary functions needed for reduce_sum
t4c1 : (#1797) Add broadcasting to kernel generator
SteveBronder : (#1791) adds an apply function and cleans adj_jac_apply to use it
peterwicksstringfield : (#1780) Feature/elementwise check
bob-carpenter : (#1774) Feature/0123 complex funs
t4c1 : (#1769) Add transposition to kernel generator
t4c1 : (#1767) avoid redundant buffer allocations in kernel generator
t4c1 : (#1751) Allow kernel generator to calculate multiple outputs in single kernel
t4c1 : (#1740) Add colwise reductions to kernel generator
bob-carpenter : (#1736) Feature/1734 return scalar meta
andrjohns : (#1727) Eigen::Map and elementwise functions
t4c1 : (#1726) Bugfix common subexpression elimination in kernel generator
bob-carpenter : (#1720) Feature/0123 complex spec
mcol : (#1716) Add discrete_range_cdf, discrete_range_lcdf and discrete_range_lccdf
martinmodrak : (#1706) Using local_nested_autodiff for all instances of nested autodiff
mcol : (#1680) Add discrete_range_rng(lower, upper) and discrete_range_lpmf
wds15 : (#1675) avoid vari on chain-stack if var is constructed from an arithmetic type
martinmodrak : (#1657) Improved behavior of expect_near_rel
mcol : (#1650) Add reverse
mcol : (#1636) Add row vector, array and int_array construction utilities
t4c1 : (#1623) Add rowwise reductions to kernel generator
martinmodrak : (#1575) Additional tests for distributions
martinmodrak : (#1830) More stable implementation of neg_binomial_2_log_lpmf

Fixes

Contributor Title
mitzimorris : (#1842) Bugfix/1839 make shell linux
bob-carpenter : (#1837) return value type for complex abs; fixes #1836
bbbales2 : (#1834) Fix ode gradients with respect to t0 (Issue #1833)
rok-cesnovar : (#1825) Add licensing info to log_modified_bessel_first_kind
bbbales2 : (#1810) Added arithmetic version of pow (Fixes: #1809)
t4c1 : (#1807) fixed normal_id_glm for const sigma
rok-cesnovar : (#1795) Makefiles: Add $(strip) to findfiles function
SteveBronder : (#1794) Cleanup requires with macros
rok-cesnovar : (#1789) Reorganize Jenkins test stages
rok-cesnovar : (#1786) Add a release notes section in the pull request template
rok-cesnovar : (#1784) Makefiles: strip newlines in findiles and fix runChecks call
serban-nicusor-toptal : (#1777) Moved verify changes Jenkins step to shared libraries.
pgree : (#1772) Changed calculation of log_sum_exp(x1, x2)
peterwicksstringfield : (#1771) More documentation fixups.
SteveBronder : (#1768) [WIP][WIP] Add docs and generic value type signatures for reduce_sum
rok-cesnovar : (#1765) Cleanup duplicated overloads of scalar std:: functions
mcol : (#1762) Remove fwd versions of qr_Q and qr_R
mcol : (#1761) Move size_zero() calls after other consistency checks (L-Z)
mcol : (#1758) Move size_zero() calls after other consistency checks (A-I)
peterwicksstringfield : (#1756) Documentation fixups
t4c1 : (#1754) Generalize */fun starting with cr-d
t4c1 : (#1747) Generalize */fun startimg with chole-cov
mcol : (#1744) Reuse intermediate computations in distributions part 1
rok-cesnovar : (#1743) Update license.md year to 2020
t4c1 : (#1732) Generalize */fun starting with a-chol2
mcol : (#1730) Avoid 'Blocked loading mixed active content' errors
mcol : (#1728) Keep computations in log space and simplify expressions in beta binomial_*cdf
serban-nicusor-toptal : (#1724) Run CI/CD only on Source Code
pgree : (#1722) remove discontinuity in lub_constrain; fixes #1441
mcol : (#1718) Remove size zero checks from check_multiplicable
mcol : (#1717) Remove promote_common and common_type
mcol : (#1715) Cleanup mdivide_* and tests
rok-cesnovar : (#1712) fix develop
rok-cesnovar : (#1711) Bugfix/include what you use in /prim/fun
rok-cesnovar : (#1707) Add namespace qualifiers to size()
mcol : (#1705) Check for positive definiteness only after computing the LLT factors
mcol : (#1701) Don't throw when computing the inverse of a size zero matrix
mcol : (#1698) Improve tests and documentation for quad_form and quad_form_sym
mcol : (#1688) Add positive definite checks to mdivide_left_spd
mcol : (#1685) Allow multiply for size 0 inputs
kedartal : (#1684) Explicitly call stan::math::size (fix ambiguous call versus std::size)
mcol : (#1682) Check for consistent sizes before comparing arguments
mcol : (#1678) Reorganize files after flatten
mcol : (#1673) Remove Boost deprecation warning
mcol : (#1665) make develop build again
mcol : (#1663) correctness fixes in neg_binomial_* functions
mcol : (#1661) Move vectorize files to meta folder
t4c1 : (#1660) Generalize view and size functions
mcol : (#1655) Cleanup in poisson_cdf, poisson_lccdf and poisson_lcdf
serban-nicusor-toptal : (#1653) Fix permission denied in Jenkins pipeline
mcol : (#1649) Clean up code to use index_type_t, return_type_t and partials_return_t
t4c1 : (#1628) Generalize operator-like functions
martinmodrak : (#1614) Improved numerical stability of binomial_coefficient_log
rok-cesnovar : (#1567) Cleanup the use of find in makefile
SteveBronder : (#1525) Generic var templates for operators and std::iterator_trait var/fvar specialization
martinmodrak : (#1497) Fixing negative binomial phi cutoff
t4c1 : (#1796) Bugfix: make kernel generator wait for events on matrices
mcol : (#1674) Document template parameters in /prim
mcol : (#1668) Rename spaced_* to linspaced_*
wds15 : (#1821) clarify README.md