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.

564
157
C++

The Stan Math Library is a C++, reverse-mode automatic
differentiation library designed to be usable, extensive and
extensible, efficient, scalable, stable, portable, and redistributable
in order to facilitate the construction and utilization of algorithms
that utilize derivatives.

Documentation, Installation, and Examples

All of Stan math’s documentation is hosted on our website below. Please do not
reference articles in the wiki as they are outdated and not maintained.

mc-stan.org/math

Licensing

The Stan Math Library is licensed under the new BSD
license
.

The Stan Math Library depends on the Intel TBB library which is
licensed under the Apache 2.0 license. This dependency implies an
additional restriction as compared to the new BSD license alone. The
Apache 2.0 license is incompatible with GPL-2 licensed code if
distributed as a unitary binary. You may refer to the Licensing page on the Stan wiki.