STAN C++ RELEASE NOTES
======================================================================

Note: these are the release notes for the stan-dev/stan repository.
Further changes may arise at the interface level (stan-dev/{rstan,
pystan, cmdstan}) and math library level (stan-dev/math).

v2.38.0 (13 January 2026)
======================================================================

 - Allow `min:max` indexing to always succeed if it is an empty selection. (#3362)
 - Updated scalar templating in the serializer. (#3355)
 - Removed the uses of `forward_as` from the stan repo and adds `if constexpr` where possible. (#3357)
 - Updated Pathfinder writer to avoid indexing past vector length. (#3364)

v2.37.0 (2 September 2025)
======================================================================

 - Fixed a memory leak in `laplace_sample`. (#3324)
 - Dramatically reduce the memory footprint of Pathfinder when PSIS resampling is disabled. Note that this change involves changes to thread scheduling that may result in the same seed returning draws in a different order when multiple threads are used, but the unordered set of draws should be unchanged. (#3325)
 - Fixed a missing size check by directing all std::vector assigns through size-aware version. (#3352) 
 - Implemented serialization and deserializtion for `sum_to_zero` matrix. (#3342)
 - Fixed stepsize adaption being completely reset when passing `0` for the size of `term_buffer`. (#3346)

v2.36.0 (10 December 2024)
======================================================================

 - Added de/serialization for the `stochastic_row_matrix` and `stochastic_column_matrix` types. (#3298, #3304)
 - Added de/serialization for the `sum_to_zero_vector` type. (#3308)
 - Relaxed restrictions on HMC to allow running when a model has no parameters. (#3071, #3303)
 - Updated `rvalue()` functions that use `multi_index` to return an Eigen expression of multi indexing instead of eagerly creating a new matrix from the indices. (#3250)
 - Improved error messages when user-specified initializations fail. (#3291)
 - Fixed progress output formatting being inconsistent for the non-adaptive samplers. (#3296)
 - Improved parsing of Stan CSV files to allow for getting MCMC sample from fixed_param and samples with saved warmup draws and to be able to correctly get ADVI sample. (#3311)
 - Improved parsing of Stan CSV files when they contain nan or infinite values. (#3318)
 - Added a new `stan::mcmc::chainset` object, exposing split-Rhat, split-ESS and Monte Carlo standard error diagnostics. This replaces the `chains<>` object. (#3312, #3313)
 - Fixed a header include order issue that caused compilation with `-DSTAN_MODEL_FVAR_VAR` to fail for certain models. (#3294)
 - Removed support for adding makefile variables in `~/.config/stan/make.local`. Use the `make/local` file in the Stan directory instead. (#3295)

v2.35.0 (3 June 2024)
======================================================================

 - The algorithms no longer catch `std::exception` unconditionally. The Math library uses `std::domain_error` for recoverable errors, and these are the ones which are caught. (#3259)
 - Allow laplace sampling without evaluating `log_prob` for each draw. (#3261)
 - Allow laplace sampling to save the Hessian as a diagnostic output. (#3261)
 - Stan's RNG usages now uses a type definition `stan::rng_t` rather than hard coding a specific Boost RNG. (#3263)
 - Switched the pRNG used by default in the services and tests to be `boost::mixmax`. Note that this means seeds from previous versions will lead to different numerical results in this version. (#3264)
 - Add a new ranked R-hat diagnostic from [Vehtari](https://arxiv.org/abs/1903.08008). (#3266)
 - Fixed an issue where Pathfinder would sometimes return more draws than requested. (#3279)

v2.34.1 (23 January 2024)
======================================================================

- Fixed a Windows-specific issue with std::regex in JSON file validation (#3251)
- Added a missing include of `cstdint` (#3255)

v2.34.0 (16 January 2024)
======================================================================

 - Resolved an issue in Pathfinder's multithreading which lead to non-reproducible results (#3239)
 - Improved the human-readability of the output of the JSON writer class (#3227)
 - Resolved various compiler warnings (#3228, #3234)
 - Added hooks to adaptive sampler methods to write adapted metric to JSON file. (#3230, #3248)
 - Changed bfgs and lbfgs's error messaging behavior so that the message is not split between stderr and stdout but is entirely sent to stderr. (#3238)
 - Fixed a bug in the stan opencl assign tests (#3219)
 - Updated PSIS to not add back the max and return the unnormalized resample ratios for stability (#3243)
 - Fixed an issue where trying to compute the potential scale reduction factor on an empty set of draws would lead to a crash (#3246)
 - Added flags to the Pathfinder service functions for turning off resampling and the calculation of the lp for the approximate draws. (#3249)

v2.33.0 (5 September 2023)
======================================================================

- Added Pathfinder and Multi-pathfinder to the service APIs. (#3123, #3205)
- Added the `unconstrain_array` method to the model base class as the inverse of `write_array`. (#3179, #3211)
- Support Tuple indices in Stan CSV Header Reader. (#3190)
- Add callback writer to output JSON data for diagnostics. (#3191, #3202)
- Replace use of `boost::lexical_cast` with `std::strol`, etc, and remove spurious header includes. (#3206)
- Fixed several typos in documentation. (#3210)
- Added multi chain service functions for hmc nuts for adapatation and nonadaption for the unit e, diag, and dense metrics. (#3212)
- Made the service functions consistently catch exceptions and favor return codes. (#3214)
- Added a hard copy of the event vector for OpenCL before making a copy to go from a tbb concurrent vector to a standard vector. (#3217)
- Added missing size checks to vectors of Eigen types. (#3218)
- Remove deprecated syntax from remaining tests. (#3220)

v2.32.2 (15 May 2023)
======================================================================

- Fixed handling of zero-sized parameters in standalone generated quantities.

v2.32.1 (2 May 2023)
======================================================================

- Fix an issue where the output of Laplace sampling was inconsistent with other outputs and could lead to invalid CSV headers (#3184)

v2.32.0 (20 April 2023)
======================================================================

- Extended `get_dims` and `get_param_names` in model_base with flags for whether to include transformed parameters and generated quantities. (#3139)
- Fixed an issue where initialization would still retry many times even if a fixed initialization was provided. (#3139)
- Cleaned up newlines in Laplace service logging. (#3153)
- make: use SUNDIALS_TARGETS instead of LIBSUNDIALS. (#3162)
- Updated JSON var context to handle nested structures (tuples). (#3165)
- Always discard at least 1 entry in new RNGs. (#3168)
- Relaxed requirements for 0-sized data objects in JSON. (#3170)
- Deleted unused io/cmd_line.hpp. (#3172)
- Standalone GQ: Output NaNs when exception is caught. (#3173)
- Cleaned up dimension and name logic in random_var_context. (#3174)
- Removed old/unused IO code. (#3177)
- Made deserializer's map members const. (#3178)

v2.31.0 (21 November 2022)
======================================================================
- RapidJSON library is now a part of Stan (previously part of CmdStan) (#3143)
- Added a #define flag flag to enable nested autodiff in model_base class (#3144)
- Set up the service function so interfaces can offer Laplace approximation. (#3148)

v2.30.0 (1 July 2022)
======================================================================
- Added `const noexcept` modifiers to the three accessors related to step-size (nominal, current, and jitter). (3124)
- Removed unused variable `num_params`. (#3126)
- Code cleanup - consistent set of includes for the set of services in stan/services/sample. (#3111)

v2.29.2 (25 March 2022)
======================================================================

- Fixed bug with selecting matrix rows with `matrix[x:x, ]`.
- Updated Math submodule to 4.3.2

v2.29.1 (2 March 2022)
======================================================================

- Updated Stan Math to 4.3.1.
- Fixed a bug with assigning var matrix types, only surfaces when using stanc3 optimization (`--O1` or up).

v2.29.0 (14 February 2022)
======================================================================

 - Fixed assign and lvalue to return empty array with negative indexing and prevent assigning containers not matching in size. (#3095)
 - Refactored the integration tests to use the Stan model from the stanc3 repository.
 - Upgraded Stan Math to 4.3.0.

v2.28.2 (22 November 2021)
======================================================================

 - Fixed a performance regression caused by using the diagnostic writer even when diagnostics were not requested.

v2.28.1 (21 October 2021)
======================================================================

 - Updated to Stan Math 4.2.1

v2.28.0 (5 October 2021)
======================================================================

 - Now using Eigen nullaryExpression for indexing with multi_index so these indexing functions propagate expressions, potentially reducing the number of times memory needs to be accessed. (#3046)
 - Fixes `àssign()` for `var<Matrix>`. (#3049)
 - Allowed intake of complex numbers. (#3056)
 - Marged rethrow_located as [[noreturn]]. (#3059)

v2.27.0 (2 June 2021)
======================================================================

- Refactored indexing functions (renaming, replaces indexing structure in favor of variadic arguments). (#3011)
- Added the serializer and deserializer classes for reading/writing constraints in the generated C++ easier. (#3013, #3018, #3019, #3024, #3036)
- Removed unuse template keyword to fix for clang 12+. (#3026)
- Added more robust detection of improper posteriors by checking that metric does not overflow during adaptation. (#3030)

v2.26.1 (17 February 2021)
======================================================================

- Updated Math to v4.0.1

v.2.26.0 (26 January 2021)
======================================================================

- Improved performance for assigning to slices of matrices and vectors and vector-style indexing (#2962, #2964, #2965, #2973).
- Improved error messages on range checks. (#2978)
- Allowed Stan CSV files to have first column be any Stan variable name, not just "lp__".
- Removed .eval() in rvalue() where applicable. (#2974)
- Allowed reader to accept Eigen vector and use Eigen Map to access inputs. (#2955)
- Allowed functions in reader to output a `var_value<Eigen::Matrix<T, R, C>>`.
- Added assignment to `var_value<Eigen::Matrix<T, R, C>>`.
- Added rvalue overloads for `var_value<Eigen::Matrix<T, R, C>>`.

v.2.25.0 (26 October 2020)
======================================================================

- added a const accessor to _z in base_hmc.hpp
- bugfixed validate_dims in array_var_context
- cleaned up includes of Eigen

v.2.24.0 (28 July 2020)
======================================================================

- `std::chrono` is now used for all timing purposes
- fixed a bug with generated quantities for vectors of length 1
- added `recover_memory` for normal exit of `log_prob_grad`
- replaced the use of `boost::` functions/metaprograms in favor of `std::` where applicable

v.2.23.0 (22 April 2020)
======================================================================

- updated Stan Math to 3.2
- `rvalue` and `assign` now accept generic Eigen expressions

v.2.22.0 (24 January 2020)
======================================================================

New Features
------------

- validate_dims in stan::io::var_context vas made a virtual function which allows its implementation for JSON data which is needed to accepts arrays where any dimension is size 0
- replaced Eigen vectors of strings with std::vector<std::string>
- replaced stan::math::domain_error with throw_domain_error
- added const noexcept accessors to the stepsize adaptation class which allows developers to query the adaptation parameters in contexts where it's natural to have a const sampler (logging, serialization, ...)

v.2.21.0 (18 October 2019)
======================================================================

New Features
------------
- Add Intel TBB (#2769)
- Add automated maintanence and cleanup via clang-tools to makefile (#2805)
- Use Welford's algorithm for Variance Estimates in src/stan/analyze (#2819)
- Adds additional no-u-turn checks across subtrees to avoid missing u-turns for approximately iid normal models (#2800)
- Add gp kernels to language (#2739)
- Update rhat and ess (#2794)

Bug Fixes
---------
- Fix const logic and size check (#2822)
- Add ifdef for R new_model (#2798)
- Add g_ to name of g vector name in ps_point (#2832)

v.2.20.0 (18 July 2019)
======================================================================

New Features
------------
- Update effective sample size calculations, with a small change to the autocovariance function, to use split chains (#2774)
- Add stan::model::model_base base class and and stan::model::model_crtp static adapter class for constructing models. (#2785)
- Allow ts and t0 to be parameters, complete ode_test, and extend the integrate_ode_* stan models (#2791)
- Add the GP covariance functions to the language (primitives of some popular materns, a dot product, and the periodic) (#2758)
- Update Eigen includes to allow compilation with new plugin methods (#2754)
- Add gp kernels to language (#2739)

Bug Fixes
---------
- Multi-unit compilation of base_xhmc.hpp. (#2775)
- Declaring a size zero simplex in a Stan program will halt the program. (#2773)

Other
-----
- Defer to Eigen's copy constructor now for assignment ( faster matrix assign ) (#2784)
- Rethrow_located also takes in a string to specify the location. (#2770)
- Faster indexing (#2766)
- Fixed generator so that matrix indexing uses most efficient access strategy (#2749)

v.2.19.1 (18 Apr 2019)
======================================================================

This is a release out of cycle to address a performance bug in v.2.19 (stan-dev/stan#2748)

Bug Fixes
--------------------------------------------------
* #2749 - Fixed generator so that matrix indexing uses most efficient access strategy - generated code should call stan::math::get_base1() on matrix using 5-arg function which specifies matrix row, column.


v.2.19.0 (20 March 2019)
======================================================================
Stan now comes with GPU support for certain functions; see the Math library
release notes for more details: https://github.com/stan-dev/math/releases/tag/v2.19.0
The manual is now online in HTML format! 

New Features
--------------------------------------------------
* #2618 - Add a new Variational Inference diagnostic 
* #2627 - 1d integrator
* #2725 - standalone generated quantities
* #2717, #2669 - offset/multiplier transformations for easier non-centering, etc
* #2652 - Allow CSV reader to read max_depth from CmdStan CSV file
* #2620 - expose beta_proportion distribution, cdf, rng functions
* #2635 - allow paths to be passed to stanc
* #2441 - Add specialized functions for GLMs
* #2358 - enchanced include syntax
* #2575 - Analysis API for computing effective sample size
* #2467 - expose bernoulli logit rng

Bug Fixes
--------------------------------------------------
* #2730 - make read_stan_csv more robust; affects CmdStan.
* #2714 - fix bug in generated code for strange constraint expressions
* #2704 - fix json nan and inf handling
* #2677 - fix copying for compound assignments
* #2672 - fix sampling from multivariate normal specified by precision matrix
* #2643 - fix segfault in optimizing an exponential model
* #2636 - fix return of generated quantities when client only asked for params
* #2614 - fix "unknown variable" messages for function calls on LHS
* #2609 - use the word "info" instead of "warning" for many messages

v.2.18.1 (24 December 2018)
======================================================================
Bugfix release - major bug in threading where certain thread count and
job size combinations could result in incorrect output. See
https://discourse.mc-stan.org/t/bug-in-map-rect-with-threading-in-stan-2-18-0/7056
for more details.

Bug Fixes
--------------------------------------------------
* Fix threading batch size bug (stan-dev/math#1075)

v2.18.0 (13 July 2018)
======================================================================
This is our first release with parallelism (threading and MPI)!

New Features
--------------------------------------------------
* New functions from Math library:
  - map_rect
  - multi_normal_rng
  - multi_normal_cholesky_rng
  - multi_student_t_rng
  - many vectorized RNGs
    - multi_normal_rng
    - multi_normal_cholesky_rng
    - multi_student_t_rng
    - bernoulli_rng
    - beta_binomial_rng
    - binomial_rng
    - neg_binomial_2_rng
    - neg_binomial_2_log_rng
    - neg_binomial_rng
    - poisson_rng
    - poisson_log_rng
    - uniform_rng
    - von_mises_rng
  - qr_thin_Q
  - qr_thin_R
  - matrix_exp_multiply
  - scale_matrix_exp_multiply
  - integrate_ode_adams
  - log_mix
  - std_normal
  - ordered_logistic_log
  - ordered_probit_log

* Manual now available in HTML (#2558)
* other vectorized RNGs (#2467)
* Easier-to-use algebra_solver
* Changes to effective sample size calculation (#2451)
* Foreach loops (#2438)
* Standalone generated quantities (#2434)
* Allow users to qualify function parameters as data (#2430)

Bug Fixes
--------------------------------------------------
* Better error messages (#2508, #2554)
* Fixes the behavior in mcmc_writer so that when there's an exception thrown in the model's generated quantities block, it writes out the parameter values and NaN for any generated quantity (#2571)
* Allow initialization of a Stan program to continue when there's a violation of constraints in transformed parameters (#2570)
* Fixed `+=` #(2482)
* rising_factorial and falling_factorial type checking (#2413)
* have parser check return type of integrate_ode_bdf functional (#2411)
* increase precision in output of ELBO values (#2406)
* ternary op fixes (#2101)


v2.17.1 (11 December 2017)
======================================================================
This is a bugfix release fixing a performance regression in the math repo. See
https://github.com/stan-dev/math/issues/667 for more details.

v2.17.0 (05 September 2017)
======================================================================

Bug Fixes
--------------------------------------------------
* Call the correct unconstrain function for covariance matrices from writer
  method (#2386)
* Better error messages (#2280, #2359)
* Deal better with 0-length simplexes (#2365)
* undefined behavior with uninitialized bool (#2344)

New User-Facing Features
--------------------------------------------------
* append_array function (#481)
* "data" type prefix qualifier for function arguments (#2369, #2376)
* new algebraic solver (#2380, #2300, #2339)
* standalone functions (#2310)

New Internal Features
--------------------------------------------------
* C++11 support (#2364)
* Boost 1.64.0
* Inline many functions to allow use in multiple translation units (#2082)

Documentation
--------------------------------------------------
* Updates to the Gaussian Processes chapter in the manual (#2372)


v2.16.0 (15 June 2017)
======================================================================

Bug Fixes
--------------------------------------------------
* Fix typo in cumulative_sum definition (#2288)
* Check input/output streams and give better errors when files are not found (#2227)
* Flush print outputs even in the face of a reject (#2311)

New User-Facing Features
--------------------------------------------------
* New categorical_logit_rng function (#517)
* New include mechanism for including stan code from other files (#2224)
* New mechanism for compiling standalone Stan functions (#2267)

New Internal Features
--------------------------------------------------
* New logging framework (#512)
* Resolve hessian() to call O(N) reverse-mode version (#2321)
* Change model to take in int seed for RNG instead of full RNG object (#2241)

Documentation
--------------------------------------------------
* Updates to the Gaussian Processes chapter in the manual (#2240)
* User manual updates for this release (#2265)


v2.15.0 (14 April 2017)
======================================================================

New Team Members
--------------------------------------------------
* Sean Talts (Columbia University) -- Stan and Math libraries
* Imad Ali (Columbia University) -- Bayesian Statistician

Bug Fixes
--------------------------------------------------
* Added runtime checks for container variable dimensions (#1194)
* Fixed compiler errors for certain variants of nuts_classic (#2268)
* Fixed compound declaration definition in local blocks (#2145)

New User-Facing Features
--------------------------------------------------
* Row-vector and matrix expressions (#1489)
* Better warning message for windowed adaptation (#2064)
* Stan language - model block is optional in a Stan program (#1427)

New Internal Features
--------------------------------------------------
* Code cleanup for parser grammars (#2223)
* Exposed new function signatures for to_matrix (#1452)
* Remove initial state from the calculation of the average Metropolis acceptance probability (#2182)
* Refactor stan/lang/generator.hpp (#2204)
* Add informational message to `std::domain_error` exception (#2203)
* Tweaked windowed adaptation warning to be more readable (#2064)

Documentation
--------------------------------------------------
* User manual updates for this release (#2122)

v2.14.0 (26 December 2016)
======================================================================

Bug Fixes
--------------------------------------------------
* NUTS sampler broken (#2179)
* seralization issues with RStan v2.13.1 (#2179)
* printing result of a void function parses, but doesnt' compile (#2168)
* compound declare/define not working for all types (#2163)

Other
--------------------------------------------------
* Update Stan Math Library to v2.14.0
* make use of const references consistent (#2186)


v2.13.1 (3 December 2016)
======================================================================

Bug Fixes
--------------------------------------------------
* fixed compound declare and define (#2156, #2153, #2146)


v2.13.0 (25 November 2016)
======================================================================

New Team Members
--------------------------------------------------
* Thel Seraphim (Columbia University) -- Stan and Math libraries
* Vincent Picaud (CEA, France) -- MathematicaStan

Bug Fixes
--------------------------------------------------
* generated code for lower truncation fixed for discrete variables (#2054)
* typo in error messages for RNGs only allowed in transformed data
  block (#2124)
* variables ending in _lpdf are now allowed (#2123)
* cov_exp_quad() not compiling in C++ (#2113)
* conditional operator in functions not compiling in C++ (#2101)
* off-by-one error in error message for integrate_ode_bdf() fixed (#2073)

New User-Facing Features
--------------------------------------------------
* vectorization of unary functions (#2119, #2037)
* bernoulli_logit_rng() added to language (#2084)
* Jacobian warning now suggests `target +=` (#2066)
* matrix_exp() function now available (#2043)
* compound declaration / definition statements (#1951)

New Internal Features
--------------------------------------------------
* user-defined functions can be declared and not defined (#2068)

Documentation
--------------------------------------------------
* manaul reorganization (#1599)
* line too long (#2121)
* added integer % operator documentation (#2065)
* lots more (#2051)


v2.12.0 (6 September 2016)
======================================================================

New Team Members
--------------------------------------------------
* Charles Margossian (Metrum Research Group, LLC) -- diff eq models

Known, outstanding bugs
--------------------------------------------------
* Normalization for lower truncated discrete distributions is off
  by one (#2054)

Bug Fixes
--------------------------------------------------
* updated the math library to deal with g++6 errors
  (math#348, math#345, math#327)
* fixed issue with 1:0 indexing in array slicing producing
  huge size (#1960)
* allow variables to be named the same as unary functions
  (#1459)
* distributions without cumulative distribution functions are now
  prevented from being used in truncation (#2052)
* allow user-defined lpdf functions to be used in `target += `
  expressions (#1944)
* fixed duplicate function warning message (#1946)
* fixed ternary operator generating C++ code that doesn't compile
  (#2044)


New User-Facing Features
--------------------------------------------------
* added mdivide_left_spd() and mdivide_right_spd() to the language
  (#2016)
* added cov_exp_quad() to the language (#1957)
* added break and continue statements to the language (#1756)
* added append_row() and append_col() to the language (#1347)
* updated error message for missing `|` when using probability functions
  (#2003)
* updated parser/warning errors for new syntax (#1940)

New Internal Features
--------------------------------------------------
* updated Travis CI config (#2033)
* fixed segfault in lang test with g++-5.4 (#2030)
* `make clean-all` cleans CVODES binaries (#2012)

v2.11.0 (27 July 2016)
======================================================================

Bug Fixes
--------------------------------------------------
* fixed sampling bug introduced in v2.10.0 (#1979)
* fixed compilation issue under clang++3.8 for rethrow_located and
  ios_base::failure (#1937)
* print() now prints when there is a rejection/exception in the model
  block (#1936)
* integer division by zero throws exception (#1974, math#321)


v2.10.0 (15 June 2016)
======================================================================

New Team Members
--------------------------------------------------
* Aki Vehtari (Aalto Uni) --- GPs, LOO, statistical modeling,
  MATLAB
* Rayleigh Lei (U. Michigan) --- vectorizing functions
* Sebastian Weber (Novartis) --- diff eq models

New User-Facing Features
--------------------------------------------------
* introduction of = for assignment; deprecating <- (#1819)
* _lpdf, _lpmf, _lcdf, _lccdf and vertical bar notation
  for probability mass, density, and cumulative distribution
  functions; update user-defined function syntax;
  deprecate older forms (#1811)
* target += lp to replace increment_log_prob(lp); target() to rpelace
  log_prob() function;  remove lp__ variable access (#1800)
* conditional (ternary) operator (#1125)
* stiff diff eq solver CVODES from Sundials
* add control parameters (tolerance, max iteraitons) to ODE solvers
* rename ODE solvers based on algorithm, integrate_ode_rk45
  for existing non-stiff Runge-Kutta solver and integrate_ode_bdf
  for the stiff backward differentiation form;  deprecate
  the unmarked integrate_ode function (#1886)
* limiting diff eq iterations in solvers (Boost/CVODES)
* unit_vector as parameter (#1713) [it never worked in the past]
* rename multiply_log and log_binomial_coefficient
  to lmultiply and lchoose (also part of #1811)
* incomplete beta function as inc_beta (#1540)

New Internal Features
--------------------------------------------------
* exhaustive HMC (XHMC)
* multinomial variant of NUTS (#1846)
* simplified NUTS criterion (#1852)
* uniform static HMC (#1849)
* Riemannian HMC with SoftAbs (#304)
* refactor semantic actions to header/implementation (#1795)
* writer callback interface for algorithms (#1739)
* error writer callbacks (#1836)
* cleaner HMC diagnostic ouptut (#1790)
* pull-request template on GitHub (#1794)
* remove unused filename argument in parser (#1752)
* remove unused lp_no_jacobian function (now controlled with
  template params)
* writer callback interface for HMC (#1680)

Bug Fixes
--------------------------------------------------
* index slicing not compiling for matrices (#1754, #1810)
* parsing too eager for reserved words (#1077)
* CSV reader whitespace sensitivity (#1907)
* delayed reject multinomial NUTS (#1906)
* PYTHON2 variable for cpplint (#1912)
* size zero vectors, row vectors, matrices (#1909)
* overflowing transition probs in multinomial NUTS (#1904)
* all the manual bug fixes (#1431, #1709, #1734, #1753,
  #1826, #1874, #1879, #1890)
* compiler fix for vector /. real to compile (#1883)
* terminate infinite loops in optimization (#1896)
* ADVI argument config failure (#1731)
* double struct creation removed for forward-declaration
  of user-defined functions bug (#1079)
* clarify deprecation of <- is only in Stan, not R (#1819)
* memory leaking with command getting in way of debug (#1293)
* makefile dependencies for stanc (#1682)
* remove NaN init for integers in place of min (negative)
  value (#1766)
* namespace pollution from log_mix removed (#1707)
* message buffering reduced in ADVI
* add pstream to user-defined CDFs supporting truncation (#1628)
* initialization failure message clarification (#1736)

v2.9.0 (3 Dec 2015)
======================================================================
New Team Members
--------------------------------------------------
* Krzysztof Sakrejda, adding functions in Stan Math and Stan

New Features
--------------------------------------------------
* General R-like indexing for arrays and vectors! (#1057)
* Automatic differentation paper: http://arxiv.org/abs/1509.07164
* Changed unit_vector transformation (#1720)
* Automatically detect bitness for Windows 32-bit (#1614)
* Better adaptation for ADVI (#1550, #1559, #1587, #1591, #1593, #1710)

Bug Fixes
--------------------------------------------------
* Allows unit_vector to be used in parameters block (#1720)
* Fixed NaN bug in ADVI (#1610)

Maintenance
--------------------------------------------------
* Reduced Cpplint warnings to 0! (#1651, #1656, #1701)
* Better ADVI output (#1588)
* Updated logo for doxygen (#1631)
* Refactoring the use of output streams (#1602, 1653, #1662,
  #1670, #1676, #1696, #1601)
* Moved src/stan/services files and namespaces (#1616)
* Updated clang++ compiler options for Mac OS X (#1668)
* Additional testing on Travis CI (#1708)
* Removed unused python script (#1611)
* Updated makefile (#1618, #1655, #1659)

Manual
--------------------------------------------------
* Improved Wiener distribution documentation (#1576)
* Corrected bugs and typos (#1617)
* Thanks to Julain King, Ashley Ford, Evelyn Mitchell,
  José Rojas Echenique, Miguel de Val-Borro, Bruno Jacobs,
  Ryan Batt, David Manheim


v2.8.0 (8 Sep 2015)
======================================================================
New Team Members
--------------------------------------------------
* Dustin Tran, helps make variational inference a reality

New Features
--------------------------------------------------
* Inverse CDF for normal distribution (#1157)
* Compiler error messages are friendlier
  - operator[] (#1517)
  - assignment (#1543, stan-dev/math#146)
* Sparse matrix by dense vector multiplication (#1565)

Bug Fixes
--------------------------------------------------
* Disallow user-defiend function overloading (#1547)
* Better behaved beta cdf (#1561, stan-dev/math#124)

Manual
--------------------------------------------------
* Corrected all known bug reports and typos; details in
  issues #1526, #1548, #1577
* Thanks to @jonathan-g (Github handle), Damjan Vukcevic,
  Daniel Chen, Guido Biele, Takahiro Kubo, Andy Choi


v2.7.0 (9 July 2015)
======================================================================

New Team Members
--------------------------------------------------
* Alp Kucukelbir, who brings you variational inference
* Robert L. Grant, who brings you the StataStan interface

Major New Feature
--------------------------------------------------
* Black-box variational inference, mean field and full
  rank (#1505)

New Features
--------------------------------------------------
* Line numbers reported for runtime errors (#1195)
* Wiener first passage time density (#765) (thanks to
  Michael Schvartsman)
* Partial initialization (#1069)
* NegBinomial2 RNG (#1471) and PoissonLog RNG (#1458) and extended
  range for Dirichlet RNG (#1474) and fixed Poisson RNG for older
  Mac compilers (#1472)
* Error messages now use operator notation (#1401)
* More specific error messages for illegal assignments (#1100)
* More specific error messages for illegal sampling statement
  signatures (#1425)
* Extended range on ibeta derivatives with wide impact on CDFs (#1426)
* Display initialization error messages (#1403)
* Works with Intel compilers and GCC 4.4 (#1506, #1514, #1519)

Bug Fixes
--------------------------------------------------
* Allow functions ending in _lp to call functions ending in _lp (#1500)
* Update warnings to catch uses of illegal sampling functions like
  CDFs and updated declared signatures (#1152)
* Disallow constraints on local variables (#1295)
* Allow min() and max() in variable declaration bounds and remove
  unnecessary use of math.h and top-level :: namespace (#1436)
* Updated exponential lower bound check (#1179)
* Extended sum to work with zero size arrays (#1443)
* Positive definiteness checks fixed (were > 1e-8, now > 0) (#1386)

Code Reorganization and Back End Upgrades
--------------------------------------------------
* New static constants (#469, #765)
* Added major/minor/patch versions as properties (#1383)
* Pulled all math-like functionality into stan::math namespace
* Pulled the Stan Math Library out into its own repository (#1520)
* Included in Stan C++ repository as submodule
* Removed final usage of std::cout and std::cerr (#699) and
  updated tests for null streams (#1239)
* Removed over 1000 CppLint warnings
* Remove model write CSV methods (#445)
* Reduced generality of operators in fvar (#1198)
* Removed folder-level includes due to order issues (part of Math
  reorg) and include math.hpp include (#1438)
* Updated to Boost 1.58 (#1457)
* Travis continuous integration for Linux (#607)
* Add grad() method to math::var for autodiff to encapsulate math::vari
* Added finite diff functionals for testing (#1271)
* More configurable distribution unit tests (#1268)
* Clean up directory-level includes (#1511)
* Removed all lint from new math lib and add cpplint to build lib
  (#1412)
* Split out derivative functionals (#1389)


Manual and Dcoumentation
--------------------------------------------------
* New Logo in Manual; remove old logos (#1023)
* Corrected all known bug reports and typos; details in
  issues #1420, #1508, #1496
* Thanks to Sunil Nandihalli, Andy Choi, Sebastian Weber,
  Heraa Hu, @jonathan-g (GitHub handle), M. B. Joseph, Damjan
  Vukcevic, @tosh1ki (GitHub handle), Juan S. Casallas
* Fix some parsing issues for index (#1498)
* Added chapter on variational inference
* Added strangely unrelated regressions and multivariate probit
  examples
* Discussion from Ben Goodrich about reject() and sampling
* Start to reorganize code with fast examples first, then
  explanations
* Added CONTRIBUTING.md file (#1408)



v2.6.3 (17 March 2015)
======================================================================

Bug Fixes
----------------------------------------
* removed extra semicolons in code; they are techinically a C++11
  extension [#1379]
* removed use of variable length array; this is a C99 feature
  [#1381]

Features
----------------------------------------
* error messages in initialization during sampling get printed out
  to the message stream [#1326]

Test Enhancements
----------------------------------------
* added tests for is_vector_like [#1360]


v2.6.2 (14 March 2015)
======================================================================

Bug Fixes
----------------------------------------
* fixed append_row and append_col to return the corect types [#1297]
* documentation fix: fixed generation of stan-functions.txt [#1327]
* changed constructor of stan::agrad::var so it can compile without
  C++11 [#1337, 1364]
* fixed bug in matrix double-indexing [#1342]
* fixed calculation of derivative in normal_cdf_log, normal_ccdf_log
  [#1357]

API Enhancements
----------------------------------------
* refactored math / autodiff library [#1222, #1349, #1353]
* fixed capitalization in tests [#1355]
* updated Eigen to 3.2.4 [#1173]



v2.6.1 (3 March 2015)
======================================================================

Language Enhancements
----------------------------------------
* improved warning messages from the parser [#1244]

API/Build/Test Enhancements
----------------------------------------
* the C++ API now throws 3 types of exceptions [#685]
* parts of the C++ API were rearranged (gm, common) [#942]
* replace promote_args
* allow reading from a local makefile outside of the code repository [#1277]
* added gradient of hessian functional in C++ [#1272]
* supressed printing of adjoints when printing stan::agrad::var [#330]
* removed some cpplint warnings [#1282]
* removed doxygen warnings [#1290]
* reimplemented fmix and fmax [#1311]

Bug Fixes
----------------------------------------
* allow nested indexes to compile with integrate_ode [#1317]

Documentation
----------------------------------------
* fixed typos in MCMC sampling



v2.6.0 (5 February 2015)
======================================================================

New Features
----------------------------------------
* log_mix function for binary mixtures [half of #970]
* neg_binomial_2 CDF function [#1129]

Language Enhancements
----------------------------------------
* allow local-variable integers to be treated as constants,
  allowing, among other things, more general ODE functions [#1131]
* initialize transformed data and generated quantities the
  same way as transformed parameters [#1099]
* libstan.a removed and model compilation is 100% header-only [#1095]
* check for infinite/nan inits from boundary initializations
  with warning [#537]

API/Build/Test Enhancements
----------------------------------------
* removed extra variables being generated by validation [#1248]
* generalize OperandsAndPartials to second order [#676]
* rationalize error handling, using const char* args for efficiency [#1234]
* upgrade to Boost version 1.55 library [#1206]
* generate .hpp instead of .cpp for models [#803]
* value_of_rec recursive metaprogram to pull values out of higher-order
  autodiff structures; removes order dependency on fwd/rev includes
  [#1232]
* tests now run more efficiently with Python script [#1110]
* add performance tests to continuous integration to perform
  end-to-end regression testing on speed [#708, #1245]
* manual index parser for tool automation in interfaces (such as
  auto-complete suggestions) and emacs mode
* refactor log determinant and fix return type cast in vector arena
  alloc  [#1187]
* update makefile dependencies for auto-generated cpp test files [#1108]
* move test models into clearly labeled directories (good/bad) [#1016]
* removing policies from math error checking [#1122]
* remove usage of Boost's formatting (which can cause runtime
  errors like printf) [#1103]
* rearrange directory structure of err_handling [#1102]
* clean up math includes to proper location in source tree [#778]
* remove Windows newline and write script to catch in future [#1233]
* remove extra copy of Eigen (3.2.0), leaving just Eigen 3.2.2 [#1206]
* remove example-models dependency from Git [#1105]


Bug Fixes
----------------------------------------
* allow identifiers with prefixes matching keywords [#1177]
* allow functions to be used in variable declaration constriants [#1151]
* fix segfault resulting from multivariate normal in optimizer (root
  cause wasn't in optimizer, but in autodiff nesting cleanup) [#1200]
* fixed return type in language and C++ for append_row of two
  column vectors and append_col of two row vectors [#1241]
* fixed derivative error for pareto_type_2_log() [#1223]
* remove unused models from stan distribution (they're now in
  the stan-dev/example-models repo on GitHub) [#1249]
* squash compiler warnings and fix windows tests (mostly
  signed vs. unsigned, as usual) [#1257]
* fix memory leak in ODE solver [#1160]
* fix overflow in gamma_p function to throw instead [#674]
* make sure multiply_lower_tri_self_transpose returns a symmetric
  matrix [#1121]
* fix overflow in Poisson RNG to throw instead [#1053]


Documentation
----------------------------------------
* manual updated for 2.6 [#1081]
  - new chapter on software process (thanks to Sebastian Weber
    and Tony Rossini for help)
  - new chapter on sparse and ragged arrays
  - pointers to Julia and MATLAB interfaces (yay!)
  - vectorization of CDFs described
  - fix priors on IRT models
  - added discussion of multiple change points
  - remove range-contstrained scale priors
  - clarified fixed parameter call
  - remove references to "std::vector" in favor of "array"
  - corrected signs for lasso and ridge and discuss truncated gradient
    and absolute zero results
  - extended discussion of Gaussian process priors (thanks
    to Aki Vehtari, Jon Zelner, and Herra Huu)
  - remove bogus paths to models and replace with pointers to
    example-models repo
  - clarified Wishart/inverse Wishart parameterizations w.r.t. BDA3
  - fixed exp_mod_normal definition
  - fix student-t reparameterization
  - fix hurdle distribution definition

Thanks!
----------------------------------------
Thanks to all the users who contributed code and doc corrections
and comments: Alex Zvoleff, Juan Sebastián Casallas, Gökçen
Eraslan, seldomworks [GitHub handle], Avraham Adler, Sebastian
Weber, Amos Waterland, David Hallvig, Howard Zail, Andre Pfeuffer,
Bobby Jacob, Cody Ross, Krzysztof Sakrejda, Andrew Ellis, John Sutton


v2.5.0 (20 October 2014)
======================================================================

New Features
----------------------------------------
* ordinary differential equation solver, implemented by coupling
  the user-specified system with its sensitivities (#771)
* add reject() statement for user-defined rejections/exceptions (#458)
* new num_elements() functions that applies to all containers (#1026)
* added is_nan() and is_inf() function (#592)
* nested reverse-mode autodiff, primarily for ode solver (#1031)
* added get_lp() function to remove any need for bar lp__  (#470)
* new functions append_col() and append_row() like cbind and rbind
  in R (#787)
* added modulus function in a way tht is consistent with integer
  division across platforms (#577)
* exposed pareto_type_2_rng (#580)
* added Frechet distribution and multi_gp_cholesky distribution
  (thanks to Alexey Stukalov for both)

Enhancements
----------------------------------------
* removed Eigen code insertion for numeric traits and replaced
  with order-independent metaprogram (#1065)
* cleaned up error messages to provide clearer error context
  and more informative messages (#640)
* extensive tests for higher order autodiff in densities (#823)
* added context factory
* deprecated lkj_cov density (#865)
* trying again with informational/rejection message (#223)
* more code moved from interfaces into Stan common libraries,
  including a var_context factory for configuration
* moved example models to own repo (stan-dev/example-models) and
  included as submodule for stan-dev/stan (#314)
* added per-iteration interrupt handler to BFGS optimizer (#768)
* worked around unused function warnings from gcc (#796)
* fixed error messages in vector to array conversion (#579, thanks
  Kevin S. Van Horn)
* fixed gp-fit.stan example to be as efficient as manual
  version (#782)
* update to Eigen version 3.2.2 (#1087)

Builds
----------------------------------------
* pull out testing into Python script for developers to simplify
  makes
* libstan dependencies handled properly and regenerate
  dependencies, including working around bug in GNU
  make 3.8.1 (#1058, #1061, #1062)

Bug Fixes
----------------------------------------
* deal with covariant return structure in functions (allows
  data-only variables to alternate with parameter version);  involved
  adding new traits metaprograms promote_scalar and
  promote_scalar_type (#849)
* fixed error message on check_nonzero_size (#1066)
* fix arg config printing after random seed generation (#1049)
* logical conjunction and disjunction operators short circuit (#593)
* clean up parser bug preventing variables starting with reserved
  names (#866)
* fma() function calls underlying platform fma (#667)
* remove upper bound on number of function arguments (#867)
* cleaned up code to remove compiler warnings (#1034)
* share likely() and unlikely() macros to avoid redundancy warnings (#1002)
* complete review of function library for NaN behavior and consistency
  of calls for double and autodiff values, with extensive
  documentation and extensive new unit tests for this and other,
  ehances NaN testing in built-in test functions (several dozen issues
  in the #800 to #902 range)
* fixing Eigen assert bugs with NO_DEBUG in tests (#904)
* fix to makefile to allow builds in g++ 4.4 (thanks to Ewan Dunbar)
* fix precedence of exponentiation in language (#835)
* allow size zero inputs in data and initialization (#683)

Documentation
----------------------------------------
* new chapter on differential equation solver
* new sections on default priors for regression coefficients and
  scales, including hierarchical and multivariate based on
  full Cholesky parameterization
* new part on algorithms, which chapters on HMC/NUTS, optimization,
and diagnostics
* new chapter on models with latent discrete parameters
* using latexmk through make for LaTeX compilation
* changed page numbers to beg contiguous throughout so page numbers
  match PDF viewer page number
* all user-supplied corrections applied from next-manual issue
* section on identifiability with priors, including discussion of K-1
  parameterization of softmax and IRT
* new section on convergence monitoring
* extensive corrections from Andrew Gelman on regression models
  and notation
* added discussion of hurdle model in zero inflation section
* update built-in function doc to clarify several behaviors (#1025)


v2.4.0 (20 July 2014)
======================================================================

New Features
------------
* L-BFGS optimization (now the default)
* completed higher-order autodiff (added all probability functions,
  matrix functions, and matrix operators);  tested up to 3rd order
* enhanced effective range of normal_cdf to prevent underflow/overflow
* added von Mises RNG
* added ability to use scalars in all element-wise operations
* allow matrix division for mixing scalars and matrices
* vectorization of outcome variates in multivariate normal with efficiency boosts
* generalization of multivariate normal to allow rwo vectors as means
  and

Reorganization
--------------
* move bin/print and bin/stanc to CmdStan;  no longer generating main
  when compiling model from Stan C++

New Developer
-------------
* Added Jeffrey Arnold as core Stan developer

Bug Fixes
---------
* modified error messages so that they're all 1-indexed instead of 0-indexed
* fixed double print out of times in commands
* const added to iterators to allow VS2008 compiles
* fix boundary conditions on ordered tests
* fix for pow as ^ syntax to catch illegal use of vectors (which
  aren't supported)
* allow zero-length inputs to multi_normal and multi_student_t
  with appropriate log prob (i.e., 0)
* fixed bug in inverse-Wishart RNG to match MCMCPack results
  with slightly asymmetric inputs
* fixed problem with compiling user-defined function twice
* fixed problem with int-only parameters for user-defined functions
* fixed NaN init problems for user-defined functions
* added check that user variable doesn't conflict with user function + doc
* disallow void argument types in user-defined functions

Code Cleanup and Efficiency Improvements
----------------------------------------
* removed main() from models generated from C++ Stan (they are
  now available only in CmdStan); removed no_main command options
* reserve vector sizes for saving for sample recorder
* removing many instances of std::cout from API (more still to go)
* removed non-functional Nesterov optimization option
* optimization code refactoring for testing ease
* better constant handling in von Mises distribution
* removed tabs from all source files
* massive re-org of testing to remove redundant files and allow
  traits-based specializations, plus fixed for 1-indexing

Testing
-------
* added tests for log_softmax, multiply_lower_tri_self_transpose, tcrossprod
* break out function signature tests into individual files, add many
  more
* enhanced cholesky factor tests for round trip transforms and
  derivatives
* extensive unit testing added for optimization
* remove use of std::cout in all tests

Example Models
--------------
* lots of cleanup in links and models in ARM examples
* added BUGS litter example with more stable priors than in the
  BUGS version (the original model doesn't fit well in BUGS as is,
  either)

Documentation
-------------
* add infix operators to manual
* categorical_logit sampling statement
* Cholesky factor with unit diagonal transform example
* example of using linear regression for prediction/forecasting with
  notes
* clarified some relations of naive Bayes to clustering
  vs. classification and relation to non-identifiability
* new advice on multivariate priors for quad_form_diag
* fix typo in multiply_lower_self_transpose (thanks to Alexey Stukalov)
* fix formatting of reserved names in manual
* fixed typo and clarified effective sample size doc


v2.3.0 (18 June 2014)
======================================================================

We had a record number of user-submitted patches this go around.
Thanks to everyone!

New Features
------------
* user-defined function definitions added to Stan language
* a^b syntax for pow(a,b)  (thanks to Mitzi Morris)
* reshaping functions: to_matrix(), to_vector(), to_row_vector(),
  to_array_1d(), to_array_2d()
* matrix operations: quad_form_sym() (x' *Sigma * x), QR decompositions
  qr_Q(), qr_R()
* densities: Gaussian processes multi_gp_log(), multi_gp(),
  and alternative negative binomial parameterization neg_binomial_2()
* random number generator: multi_normal_cholesky_rng()
* sorting: sort_indices_*() for returning indexes in sorted order by
  value
* added JSON parser to C++ (not exposed through interfaces yet; thanks
  to Mitzi Morris)
* many fixes to I/O for data and inits to check consistency and
  report errors
* removed some uses of std::cout where they don't belong
* updated parser for C++11 compatibility (thanks to Rob Goedman)

New Developer
--------------
* added Marco Inacio as core developer

Optimizations
-------------
* turned off Eigen asserts
* efficiency improvements to posterior analysis print

Documentation
-------------
* Clarified licensing policy for individual code contributions
* Huge numbers of fixes to the documentation, including many
  user-contributed patches (thanks!), fixes to parallelization in
  CmdStan, Windows install instructions, boundaries for Dirichlet and
  Beta, removed suggestion to use floor and ceiling as indices,
  vectorized many models, clarified that && doesn't short circuit,
  clarified von Mises normalization, updated censoring doc (thanks
  to Alexey Stukalov), negative binomial doc enhanced, new references,
  new discussion of hierarchical models referencing Betancourt and
  Girolami paper,
* Avraham Adler was particularly useful in pointing out and fixing
  documentation errors

Bug Fixes
------------
* fixed bug in lkj density
* fixed bug in Jacobian for corr_matrix data type
* fix cholesky_cov_matrix test code to allow use as parameter
* fixed poisson_rng, neg_binomial_rng
* allow binary operations (e.g., < and >) within range constraints
* support MS Visual Studio 2008
* fixed memory leaks in categorical sampling statement, categorical_log
  function, and softmax functions
* removed many compiler warnings
* numerous bug fixes to arithmetic test code conditions and messages,
  including calls from
* fixed model crashes when no parameter specified
* fixed template name conflicts for some compiler bugs (thanks Kevin
  S. Van Horn)

Code Reorganizations & Updates
------------------------------
* CmdStan is now in its own repository on GitHub: stan-dev/cmdstan
* consolidate and simplify error handling across modules
* pulled functionality from CmdStan command class and PyStan and RStan
  into Stan C++
* generalized some interfaces to allow std::vector as well as Eigen
  for compatibility
* generalize some I/O CSV writer capabilities
* optimization output text cleaned up
* integer overflow during I/O now raises informative error messages
* const correctness for chains (thanks Kevin S. Van Horn)


v2.2.0 (14 February 2014)
======================================================================
Bug Fixes
-------------
* increment_log_prob is now vectorized and compiles with vector arguments
* multinomial random number generator used the wrong size for the return value
* fixed memory leaks in auto-diff implementation
* variables can start with the prefix 'inf'
* fixed parameter output order for arrays when using optimization

Features
-------------
* suppress command line output with refresh <= 0
* added 1 to treedepth to match usual definition of treedepth
* added distance, squared_distance, diag_pre_multiply, diag_pre_multiply to Stan modeling lnaguage
* added a 'fixed_param' sampler for use with the generated quantities block




v2.0.1 (24 October 2013)
======================================================================

Bug Fixes
----------------------------------
* fixed multi_normal distribution's gradient calculations
* fixed diagnose mode from the command line to work for matrices
* typos in the manual



v2.0.0 (16 October 2013)
======================================================================

This list is incomplete.  The 2.0.0 update is a huge fix, and this
list just represents what was clearly called out in pull requests.

Enhancements
----------------------------------
* all new hierarchical command-line interface
* compiler flags to build with Xcode 5 (which has too-small template-depth)
* BFGS optimization
* print variable name when initialization fails
* reserved function names (breaks backward compatibility)
* deprecate direct use of lp__ in favor of increment_log_prob()
* unfolded softmax for more efficiency, optimized and vectorized categorical
* new Cholesky factor data type
* upgraded to Boost 1.54 and Eigen 3.2.0
* added flag to suppress Jacobian adjustment in log prob (for
  optimizers)
* added Rayleigh distribution
* added Bessel (and modified Bessel) functions of first and second
  kind
* added Pochhammer functions (rising/falling factorials)
* completed vectorization of univariate distributions
* trapped use of "." in variable names and print error
* moved RStan into its own subproject
* rewrote writer interface for samples
* added delete method to chainables to allow exceptions in
  constructors
* added sort and rank functions
* improved doc and coding for GP example models
* shuffle function signature tests for test speed
* new gradient functionality for memory allocation and cleaning
  and to reduce code duplication

Bug Fixes
----------------------------------
* remove function signatures from undocumented functions
* fixed broken abs(real) signature;  deprecated abs(real) in favor
  of fabs(real)
* error checking for dirichlet
* fix bin/print to be row major
* suppress warnings for unused variables; cleanup truly unused ones
* fixed pow() boundary conditions with negative base, fractional
exponent
* fix model tests and error codes
* fix command-line return codes to be more compliant
* fix build parameter names to be more compliant with conventions
* fix integer vs. real problems in some RNGs
* fix print so that it prints expression values, not just names
* fix Newton optimization backtrack to eventually terminate with
  failure rather than looping infinitely
* fix CSV output from command for matrices (was transposed)
* fixes to allow Stan to build under Cygwin
* fix double indexing on LHS of assignment
* fix nested expression prints to allow indexed array sizes in
  declarations
* fix parameterization of gamma RNG
* reserved model's class name as variable
* added vector size test in assignment
* fixed mixture examples
* fixed rep_vector to work with integer value
* fixed parser error message
* fixed use of Boost NaN tests
* initialze local variables to NaN to prevent segfaults if used
  before defined
* remove unused includes from model header
* fix signed/unsigned warnings in tests and code
* validate that init=0 is valid starting value and raise error if not
* fix diag_pre_multiply loop bound


Doc
---------------------------------
* made all user-suggested cleanups and changes to doc
* new basic programming section
* new chapter for new command line



v1.3.0 (12 April 2013)
======================================================================

Enhancements
----------------------------------

Modeling Language
* forward sampling (random draws from distributions)
  in generated quantities
* added broadcast (repetition) functions for initializing
  matrices, vectors, and arrays
* better error messages in parser
* additional distributions:
    + exp_mod_normal
    + gumbel
    + skew_normal
* additional functions:
    + mdivide_right_spd
    + mdivide_left_spd
    + owenst
    + columns_dot_product
    + rows_dot_product
* broadcast (repetition) functions for vectors, arrays, matrices
    + rep_arrray
    + rep_matrix
    + rep_row_vector
    + rep_vector

Command-Line
* added option to display autocorrelations in the command-line program
  to print output
* changed default point estimation routine from the command line to
  use Nesterov's accelerated gradient method, added option for point
  estimation with Newton's method

RStan
* added method as.mcmc.list()
* compatibility with R 3.0.0

C++/Internal
* refactored math/agrad libs in C++ to separate files/includes,
  remove redundant code, more unit tests for existing code
* added chainable_alloc class for caching solver results
* generalized VectorView with seq_view
* templated out generated code for efficient double-only operation
  on model log probs w/o gradients

Doc
* additions to user's guide w. sample models
    + stochastic volatility example with source, optimized source,
      simulation
    + time series, moving average, standardization for linear
      regression, hidden Markov models, with examples
* manual's index is now hyperlinked
* added additional acknowledgements to manual
* added full description of differences between sampling
  statement and lp__
* fixed general normal mixture model example

Testing
* split unit tests from distribution tests

Bug Fixes
----------------------------------
* fixed derivative in multi_normal_prec distribution function
* double-based log_prob functions return the same value as var-based
  log_prob_grad functions
* calls to lgamma are now using boost's lgamma function
* patched transform to work with Eigen 3.2 beta
* all probability distribution functions and cumulative distribution
  functions behave properly with 0 length vector arguments
* fixed error in definition of hypergeometric pmf
* fixed arguments to nesterov optimization ctor in command
* fixed issue with initialization matrices being read improperly
* Use fabs() instead of abs() in unit_vector_constrain.
* typos in the manual
* rstan:
  + fixed crash in R when index is out of bounds using set_cppo("fast")
  + io_context fix skipping len=0
  + fix the typo in manual (dims -> dim)
  + add require(inline) to fix the problem with loading sysdata.rda


v1.2.0 (6 March 2013)
======================================================================

Enhancements
----------------------------------
* full mass matrix estimation during warmup
* expose model log_prob and gradient functions in RStan for use
  in other packages (such as optimizers)
* command-line program to display output from multiple chains
  with parameter-by-parameter mean, se, sd, quantiles, and R-hat
* probability function speed improvements with vectorization
* created Stan contributed repositories for user-contributed
  and experimental features (first entry is an emacs mode)
* modified makefiles so targets are the same under Windows,
  Linux, and Mac

New Functions
----------------------------------
* most of the cumulative distribution functions (see the documentation
  index for the full list of supported functions)
* added monitor() function in RStan

Bug Fixes
----------------------------------
* disabled Boost asserts in parser to quiet R's warnings
* enabled prints in generated quantities block
* various documentation patches
* fixed memory leak in matrix operations leading to leaks in
  multivariate probability function use
* wrapped call to gradient log prob to catch unexpected exceptions
* fixed matrix resize issue on Windows that caused models to fail
  at optimization levels above 0
* fixed bug in print preventing hyphens or grave accents from
  priting
* fixed issue preventing matrix rows from being assigned on the
  left side of an assignment statement
* clearer error messages on matrix and other function arguments


v1.1.1 (5 February 2013)
======================================================================

Bug Fixes
----------------------------------
* fixed bug in comparison operators, which swapped operator< with
  operator<= and swapped operator> with operator>= semantics
* auto-initialize all variables to prevent segfaults
* atan2 gradient propagation fixed
* fixed off-by-one in NUTS treedepth bound so NUTS goes
  at most to specified tree depth rather than specified depth + 1
* various compiler compatibility and minor consistency issues
* fixed bug in metaprogram preventing lower/upper bound constraints
  on matrices
* fixed print error for number of kept samples
* fixed floating point literal precision issue in code generation
* fixed bug in bernoulli_log for boundary chance of success
  theta=0 or theta=1
* many doc patches (mostly due to user comments -- thanks!)
* replace boost sign() to avoid compiler conflicts
* trapping mismatched dimension assignments in arrays,
  matrices, and vectors

Enhancements
----------------------------------
* user's guide chapters w. sample models
    + gaussian processes
    + measurement error and meta-analysis
    + clustering (soft k-means, LDA, naive Bayes)
    + ARCH, GARCH model section in regression chapter
* sample models
    + hidden Markov models (HMMs)
    + non-negative matrix factorization (NNMF)
* speed improvements to multivariate models and matrix solvers
    + mdivide_left, mdivide_left_tri_low, mdivide_right,
      mdivide_right_tri_low
    + determinant, log determinant
    + inverse
* much more extensive probability tests
* unstacked vari for multivariate auto-diff unfolding
* faster multiply self transpose / columns_dot_self
* cleaned up error messages for size mismatches in accessors
* simplified vector view expression template parameterization
* cleaned up many --pedantic compiler warnings

New Functions
----------------------------------
* log absolute determinant, with optimized gradients
* probability functions
    + multivariate normal, precision parameterization
* model timing and n_eff output in CSV for all test models
* ongoing vectorizations and reparameterizations
  of probability functions
* faster Phi_approx computing an approximate cumulative unit
  normal density
* added dims() function to extract dimensions of arrays of scalars,
  vectors, and matrices
* added size()  function to extract the number of elements in an array


v1.1.0  (17 Dec 2012)
======================================================================
-- Backward Compatibility Issue
   * Categorical distribution recoded to match documentation;  it
     now has support {1,...,K} rather than {0,...,K-1}.
   * (RStan) change default value of permuted flag from FALSE to TRUE for
     Stan fit S4 extract() method
-- New Features
   * Conditional (if-then-else) statements
   * While statements
-- New Functions
   * generalized multiply_lower_tri_self_transpose() to non-square
     matrices
   * special functions: log_inv_logit(), log1m_inv_logit()
   * matrix special functions: cumulative_sum()
   * probability functions: poisson_log_log() for log-rate
     parameterized Poisson
   * matrix functions: block(), diag_pre_multiply(), diag_post_multiply()
   * comparison operators (<, >, <=, >=, ==, !=)
   * boolean operators (!, ||, &&)
   * allow +/- inf values in variable declaration constraints
-- RStan Improvements
   * get_posterior_mean() method for Stan fit objects
   * replaced RcppEigen dependency with include of Eigen source
   * added read_stan_csv() to create Stan fit object from CSV files of
     the form written to disk by the command-line version of Stan
   * as.data.frame() S3 method for Stan fit objects
-- Bug Fixes
   * fixed bug in NUTS diagonal resulting in too small step sizes
   * fixed bug introduced in 1.0.3 that hid line and column number
     bug reporting
   * added checks that data dimensions match as well as sizes
   * removed non-symmetric versions of eigenvalues() and eigenvectors()
   * testing identifiers are not reserved words in C++/Stan
   * trapping/reporting locations of errors in data and init reads
   * improvements in dump data format reader for more R compatibility
     and more generality
   * fix bug in bernoulli logit distro tail density
-- Code Improvements
   * templated out matrix libs to reduce code duplication
   * vectorized auto-dif for tcrossprod() and crossprod()
   * optimizations in Wishart
   * vectorization with efficiency improvements in probability distributions
-- Libraries Updated
   * Eigen version 3.1.1 replaced with version 3.1.2
   * Boost version 1.51.0 replaced with version 1.52.0
-- Manual Improvements
   * New chapter on univariate and multivariate variable transforms
   * Many consistency improvements and typo corrections
   * Information on running command line in parallel from shell



v 1.0.3 Release Notes (25 Oct 2012)
======================================================================
Stan Bug Fixes:
 -- error output in stanc now directed to standard error
 -- catching all exceptions thrown in stanc to prevent core dumps
 -- parser now accepts variable names starting with "int" and "real"
    in first assignment after declaration
 -- now catching unknown truncation cdfs and vectorizations in stanc
 -- (hopefully) less scary message for domain error rejects
 -- removed use of assert(); replaced with exceptions where
    appropriate
 -- fixed boundary condition on reporting max init retry failures
 -- fixed initialization errors in tests that failed on some platforms
 -- improved error checking for matrix size args to prevent segfaults
 -- fixed boundary condition on bounded transform to allow
    beta(0.8,0.8) samples near 0 or 1
Stan New Features:
 -- mdivide_left_tri_low, mdivide_right_tri_low functions
 -- all univariate continuous densities vectorized
 -- better error checking for transforms
 -- new error return type in stanc for invalid arguments
 -- lower and upper bounds for vectors, row vectors, and matrices
 -- command parameter refresh <= 0 turns off iteration reporting
 -- int divisions produce warnings in stanc
 -- errors caused by invalid transformed parameters include var name
 -- various efficiency improvements and error handling for boundary
    conditions and special cases of probability functions
 -- simplified matrix code with heavier use of templating
Stan Manual Additions:
 -- example of defining new distribution with parameters
 -- diff report vs. previous versions
 -- updated for range constraints on vector, row vector, matrix
 -- updated Eigen licensing information (now MPL, was LGPL)
 -- fixed alpha ordering issue in function index due to bolding
RStan Bug Fixes:
 -- bug of setting parameter epsilon_pm wrongly for NUTS
 -- fixed seed reset so results match Stan
RStan New Features:
 -- return empty stanfit object upon error such as incorrect data
    input, wrong argument specification, etc. Previously, it will
    stop. The empty stanfit includes the compiled model, so it can be
    reused.
 -- add function stan_demo() to run examples included in Stan.
 -- add function sflist2stanfit() to merge a list of stanfit objects
    into one, to facilitate user-level parallelism.
 -- add S3 method as.matrix, as.array, is.array, dim,
    dimnames for stanfit objects.
 -- specify seed using string of digits in addition to numbers
 -- turn off refresh if value <= 0


V 1.0.2 Release Notes (28 Sep 2012)
----------------------------------------------------------------------
Bug Fixes:
  -- check ranges for LHS of assignment to prevent seg faults
  -- added matrix size and shape tests to avoid seg faults
  -- changed matrix to throw domain_error rather than illegal_argument
  -- removed template variable names from distribution error msgs
  -- indexing fixed for arrays of matrix/vector/row_vector
  -- fixed sd() and variance() to return 0.0 for sequences of size 1
  -- fixed void return type in auto_covariance
  -- patch truncation to return -inf for variates out of range
  -- upgraded BUGS ring model to use constraints plus tan2()
New Features:
  -- print statements
  -- multiply_lower_tri_self_transpose function
  -- vectorized several probability functions (see the manual)
Manual Additions:
  -- programming guide: IRT models
  -- new appendix: style guide
  -- new appendix: migrating from Stan
  -- new index: function and distribution index


v1.0.1
----------------------------------------------------------------------
Patch release.


v1.0.0
----------------------------------------------------------------------
First release.






Sync between RStan and Stan Command-line
========================================

Top-Level Command
Cmd:    stan/gm/command.hpp
RStan:  rstan/rstan/inst/include/rstan/stan_fit.hpp
        rstan/rstan/inst/include/rstan/stan_args.hpp
        rstan/rstan/R/rstan.R

libstan.a
Cmd:    any XXX.cpp file added to makefile
RStan:  rstan/rstan/src/YYY__XXX.cpp


stanc translator
Cmd:    stan/command/stanc.cpp
R:      rstan/rstan/src/stanc.cpp


output analysis
Cmd:    stan/mcmc/chains.hpp
R:      rstan/rstan/src/chains.cpp

var_context impl
Cmd:
R: rstan/rstan/inst/include/rstan/io/rlist_ref_var_context.hpp

makefiles
Cmd:    add .cpp files, makefile,  make/make*
R:      rstan/rstan/src/Makefile{,.win}


boost/eigen version
Cmd:    lib/boost_x.xx.x/, lib/eigen_x.x.x, etc.
R:      rstan/rstan/src/Makefile{,.win}
        rstan/rstan/R/options.R

author list
Cmd:   web/mc-stan.org/development-team.html
R:     rstan/rstan/DESCRIPTION
       rstan/rstan/man/rstan.Rd
