# \#math

**URL:** https://discourse.mc-stan.org/tag/math/42.md

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

---

## [Interpolating in a look-up table](https://discourse.mc-stan.org/t/interpolating-in-a-look-up-table/41533)

<div class="topic-metadata">

**Author:** [@bmelinden](https://discourse.mc-stan.org/u/bmelinden)\
**Replies:** 3\
**Last updated:** [August 30, 2026, 5:36pm UTC](https://discourse.mc-stan.org/t/interpolating-in-a-look-up-table/41533 "2026-08-30T17:36:32Z")

</div>

In a recent project I was missing a look-up functionality in stan, meaning I wanted to define some problem-specific function (of one variable) and use it in my model specification. An example would be if my model include…

---

## [Developing a Deeper Intuition for HMC: Connecting the Underlying Concepts with the Hamiltonian Equations](https://discourse.mc-stan.org/t/developing-a-deeper-intuition-for-hmc-connecting-the-underlying-concepts-with-the-hamiltonian-equations/38450)

<div class="topic-metadata">

**Author:** [@karl](https://discourse.mc-stan.org/u/karl)\
**Replies:** 10\
**Last updated:** [January 17, 2025, 1:32pm UTC](https://discourse.mc-stan.org/t/developing-a-deeper-intuition-for-hmc-connecting-the-underlying-concepts-with-the-hamiltonian-equations/38450 "2025-01-17T13:32:50Z")

</div>

I’m trying to develop a deeper understanding of HMC and how the sampling in Stan works, but it has proven to be difficult given the two main sources (Neal, Betancourt) that are out there. Most other tutorials are just co…

---

## [Most Numerically Stable Way to Calculate log\_Phi](https://discourse.mc-stan.org/t/most-numerically-stable-way-to-calculate-log-phi/37278)

<div class="topic-metadata">

**Author:** [@eweine](https://discourse.mc-stan.org/u/eweine)\
**Replies:** 8\
**Last updated:** [November 18, 2024, 4:02pm UTC](https://discourse.mc-stan.org/t/most-numerically-stable-way-to-calculate-log-phi/37278 "2024-11-18T16:02:49Z")

</div>

Hey all, I need to calculate \\log(\\Phi(y)) in a numerically stable way (where \\Phi is the CDF of a standard normal distribution), where y may be a very large or small number. What is the best way to do this in stan math…

---

## [Monthly Math development meeting: 3/21/2024, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-3-21-2024-10-am-et/34548)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 2\
**Last updated:** [March 21, 2024, 2:25pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-3-21-2024-10-am-et/34548 "2024-03-21T14:25:37Z")

</div>

Hey all, It’s that time again! We have our monthly Math meetings on the third Thursday of the month. The next Math meeting is Thursday, March 21, 2024, 10 am Eastern time. Note: please check your local time zone. This …

---

## [Math development meeting: 02/29/2024, 10 am ET](https://discourse.mc-stan.org/t/math-development-meeting-02-29-2024-10-am-et/34216)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 2\
**Last updated:** [February 29, 2024, 3:03pm UTC](https://discourse.mc-stan.org/t/math-development-meeting-02-29-2024-10-am-et/34216 "2024-02-29T15:03:14Z")

</div>

We’ll have our next Math development meeting next week on February 29, 2024 at 10 am ET. This will last no more than one hour; if we need more time, we can schedule additional time. This meeting is open to all those th…

---

## [Gamma distribution quantile and inverse quantile function](https://discourse.mc-stan.org/t/gamma-distribution-quantile-and-inverse-quantile-function/22882)

<div class="topic-metadata">

**Author:** [@fomotis](https://discourse.mc-stan.org/u/fomotis)\
**Replies:** 46\
**Last updated:** [June 18, 2021, 8:42am UTC](https://discourse.mc-stan.org/t/gamma-distribution-quantile-and-inverse-quantile-function/22882 "2021-06-18T08:42:18Z")

</div>

My model involves solving an equation of the F(d, b e^{k}) = \\frac{q}{c - 1} for b, where F(.) is the gamma CDF. Obviously, b = \\frac{F^{-1}(\\frac{q}{c - 1}, 1, d)}{e^{k}} , where F^{-1} is the inverse of the incompl…

---

## [Mathematical notation for a zero-inflated negative binomial nested model](https://discourse.mc-stan.org/t/mathematical-notation-for-a-zero-inflated-negative-binomial-nested-model/33924)

<div class="topic-metadata">

**Author:** [@epkanol](https://discourse.mc-stan.org/u/epkanol)\
**Replies:** 0\
**Last updated:** [January 24, 2024, 6:06pm UTC](https://discourse.mc-stan.org/t/mathematical-notation-for-a-zero-inflated-negative-binomial-nested-model/33924 "2024-01-24T18:06:03Z")

</div>

Follow-up to the post: Mathematical Notation for a zero inflated negative binomial model in brms which was explained in detail by @Max\_Mantei (thanks for your excellent explanation!) I have a slightly more complex scen…

---

## [Math: simplifying code](https://discourse.mc-stan.org/t/math-simplifying-code/33710)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 3\
**Last updated:** [January 11, 2024, 2:32pm UTC](https://discourse.mc-stan.org/t/math-simplifying-code/33710 "2024-01-11T14:32:20Z")

</div>

I’m going to try to simplify code steadily and slowly. If anyone wants to help, happy to get it.

---

## [Wrap boost::math::chebyshev\_transform into stan::var?](https://discourse.mc-stan.org/t/wrap-boost-chebyshev-transform-into-stan-var/33109)

<div class="topic-metadata">

**Author:** [@sjvrensburg](https://discourse.mc-stan.org/u/sjvrensburg)\
**Replies:** 2\
**Last updated:** [November 2, 2023, 6:10am UTC](https://discourse.mc-stan.org/t/wrap-boost-chebyshev-transform-into-stan-var/33109 "2023-11-02T06:10:39Z")

</div>

I CLEARLY NEED MORE SLEEP… Obviously, zstr.adj() is not going to give me what I want, I’m supposed to access r.adj() Sorry, everyone! Hi! I am approximating a univariate function (not available in closed-form) with Boos…

---

## [Cc1plus.exe: out of memory allocating 65536 bytes](https://discourse.mc-stan.org/t/cc1plus-exe-out-of-memory-allocating-65536-bytes/13838)

<div class="topic-metadata">

**Author:** [@serban-nicusor](https://discourse.mc-stan.org/u/serban-nicusor)\
**Replies:** 9\
**Last updated:** [September 26, 2023, 5:06am UTC](https://discourse.mc-stan.org/t/cc1plus-exe-out-of-memory-allocating-65536-bytes/13838 "2023-09-26T05:06:10Z")

</div>

Hello, I’m currently running into cc1plus.exe: out of memory allocating 65536 bytes error on AWS EC2 Windows instances. They have 32 cores, 128 GB of RAM, 25 GB of SWAP and the software on them is mirroring the current…

---

## [Monthly Math development meeting: 09/21/2023, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-09-21-2023-10-am-et/32844)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 1\
**Last updated:** [September 21, 2023, 12:47pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-09-21-2023-10-am-et/32844 "2023-09-21T12:47:15Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is today, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional time. This meeting…

---

## [Monthly Math development meeting: 08/17/2023, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-08-17-2023-10-am-et/32467)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 0\
**Last updated:** [August 17, 2023, 12:12pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-08-17-2023-10-am-et/32467 "2023-08-17T12:12:54Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month (although we’ve taken most of the summer off). The next one is today, at 10 am ET. This will last no more than one hour; if we need more time, w…

---

## [Multivariate relationship between categorical and beta-distributed dependent variables](https://discourse.mc-stan.org/t/multivariate-relationship-between-categorical-and-beta-distributed-dependent-variables/31581)

<div class="topic-metadata">

**Author:** [@SpTB](https://discourse.mc-stan.org/u/SpTB)\
**Replies:** 0\
**Last updated:** [June 1, 2023, 4:32am UTC](https://discourse.mc-stan.org/t/multivariate-relationship-between-categorical-and-beta-distributed-dependent-variables/31581 "2023-06-01T04:32:47Z")

</div>

Dear Stan Community, I am figuring out how to model a relationship between two dependent variables, where one of them is categorical (in a simplest case, binary), and the second bounded and continuous (Beta-distributed)…

---

## [Monthly Math development meeting: 05/18/2023, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-05-18-2023-10-am-et/31405)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 3\
**Last updated:** [May 18, 2023, 2:50pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-05-18-2023-10-am-et/31405 "2023-05-18T14:50:12Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional time. This meet…

---

## [Help with notation for hierarchical gam in BRMS](https://discourse.mc-stan.org/t/help-with-notation-for-hierarchical-gam-in-brms/30913)

<div class="topic-metadata">

**Author:** [@sea83](https://discourse.mc-stan.org/u/sea83)\
**Replies:** 1\
**Last updated:** [March 31, 2023, 10:28am UTC](https://discourse.mc-stan.org/t/help-with-notation-for-hierarchical-gam-in-brms/30913 "2023-03-31T10:28:02Z")

</div>

I have been asked to include the notation for a model in the supplement of a paper we are submitting. I have come up with my best attempt at notating what we fit in brms, but I would greatly appreciate if anyone is able …

---

## [Monthly Math development meeting: 03/16/2023, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-03-16-2023-10-am-et/30752)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 3\
**Last updated:** [March 16, 2023, 2:29pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-03-16-2023-10-am-et/30752 "2023-03-16T14:29:25Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is today, in just over an hour! This will last no more than one hour; if we need more time, we will schedule additional time. Thi…

---

## [Monthly Math development meeting: 02/15/2023, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-02-15-2023-10-am-et/30407)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 2\
**Last updated:** [February 16, 2023, 3:13pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-02-15-2023-10-am-et/30407 "2023-02-16T15:13:24Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. This will last no more than one hour; if we need more time, we will schedule additional time. This meeting is open to all those that currently…

---

## [Math not passing OpenCL tests on develop for hash \`5c6f31f\`](https://discourse.mc-stan.org/t/math-not-passing-opencl-tests-on-develop-for-hash-5c6f31f/30128)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 2\
**Last updated:** [January 22, 2023, 4:15pm UTC](https://discourse.mc-stan.org/t/math-not-passing-opencl-tests-on-develop-for-hash-5c6f31f/30128 "2023-01-22T16:15:08Z")

</div>

It looks like the OpenCL tests on Math are failing right now. See: Commits · stan-dev/math · GitHub This is the Jenkins CI run for that git hash: Jenkins It’s failing in the OpenCL tests with lots of messages like thi…

---

## [Newton solver in Stan](https://discourse.mc-stan.org/t/newton-solver-in-stan/6684)

<div class="topic-metadata">

**Author:** [@charlesm93](https://discourse.mc-stan.org/u/charlesm93)\
**Replies:** 97\
**Last updated:** [December 21, 2022, 6:25pm UTC](https://discourse.mc-stan.org/t/newton-solver-in-stan/6684 "2022-12-21T18:25:39Z")

</div>

Stan’s current method for solving systems of (nonlinear) algebraic equations is Powell’s dogleg method, as implemented in Eigen. There have been a few examples where Newton’s method is, up to an order of magnitude, faste…

---

## [Monthly Math development meeting: 11/17/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-11-17-2022-10-am-et/29513)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 6\
**Last updated:** [November 17, 2022, 3:55pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-11-17-2022-10-am-et/29513 "2022-11-17T15:55:38Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. This will last no more than one hour; if we need more time, we will schedule additional time. This meeting is open to all those that currently…

---

## [Monthly Math development meeting: 10/20/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-10-20-2022-10-am-et/29205)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 0\
**Last updated:** [October 20, 2022, 2:04pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-10-20-2022-10-am-et/29205 "2022-10-20T14:04:41Z")

</div>

Hi all, this one is happening now if you want to join: We’ve been having monthly Math meetings on the third Thursday of the month. This will last no more than one hour; if we need more time, we will schedule additio…

---

## [1D and 2D convolution functions in stan](https://discourse.mc-stan.org/t/1d-and-2d-convolution-functions-in-stan/28854)

<div class="topic-metadata">

**Author:** [@nikunj410](https://discourse.mc-stan.org/u/nikunj410)\
**Replies:** 1\
**Last updated:** [September 19, 2022, 5:16pm UTC](https://discourse.mc-stan.org/t/1d-and-2d-convolution-functions-in-stan/28854 "2022-09-19T17:16:00Z")

</div>

I am working on modeling species invasion using an integro differential equation framework, N \_{r,t+1} = \\int\_{0}^{\\infty} \\int\_{0}^{2\\pi} k(|r-r'|) f(N \_{r',t}) dr'd\\theta, where N \_{r,t} is the population at location…

---

## [Monthly Math development meeting: 9/15/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-9-15-2022-10-am-et/28855)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 6\
**Last updated:** [September 15, 2022, 3:01pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-9-15-2022-10-am-et/28855 "2022-09-15T15:01:18Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, September 15, 2022, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additio…

---

## [Monthly Math development meeting: 8/18/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-8-18-2022-10-am-et/28574)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 7\
**Last updated:** [August 18, 2022, 2:59pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-8-18-2022-10-am-et/28574 "2022-08-18T14:59:32Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, August 18, 2022, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional…

---

## [Running Stan on the GPU with OpenCL: missing documentation page](https://discourse.mc-stan.org/t/running-stan-on-the-gpu-with-opencl-missing-documentation-page/28408)

<div class="topic-metadata">

**Author:** [@fabio](https://discourse.mc-stan.org/u/fabio)\
**Replies:** 2\
**Last updated:** [August 2, 2022, 4:50pm UTC](https://discourse.mc-stan.org/t/running-stan-on-the-gpu-with-opencl-missing-documentation-page/28408 "2022-08-02T16:50:56Z")

</div>

Dear stanimals, there is a broken link on the Running Stan on the GPU with OpenCL of the cmdstanr page which should point to the list of the parallelized functions. Should I file a GitHub issue in doc, or, math or in c…

---

## [Monthly Math development meeting: 7/21/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-7-21-2022-10-am-et/28280)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 1\
**Last updated:** [July 21, 2022, 12:09pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-7-21-2022-10-am-et/28280 "2022-07-21T12:09:53Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, July 21, 2022, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional t…

---

## [Monthly Math development meeting: 6/16/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-6-16-2022-10-am-et/27840)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 2\
**Last updated:** [June 16, 2022, 2:03pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-6-16-2022-10-am-et/27840 "2022-06-16T14:03:14Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, June 16, 2022, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional t…

---

## [Monthly Math development meeting: 5/19/2022, 10 am ET](https://discourse.mc-stan.org/t/monthly-math-development-meeting-5-19-2022-10-am-et/27515)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 5\
**Last updated:** [May 19, 2022, 2:58pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-5-19-2022-10-am-et/27515 "2022-05-19T14:58:02Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, May 19, 2022, at 10 am ET. This will last no more than one hour; if we need more time, we will schedule additional ti…

---

## [Help wanted on the Math library: clear out issues and PRs](https://discourse.mc-stan.org/t/help-wanted-on-the-math-library-clear-out-issues-and-prs/27305)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 0\
**Last updated:** [April 29, 2022, 3:58am UTC](https://discourse.mc-stan.org/t/help-wanted-on-the-math-library-clear-out-issues-and-prs/27305 "2022-04-29T03:58:08Z")

</div>

Hi all, It’s about time we do a serious cleanup of the Math repo: GitHub - stan-dev/math: The Stan Math Library is a C++ template library for automatic differentiation of any order using forward, reverse, and mixed mode…

---

## [Monthly Math development meeting: 4/21/2022, 10 am EDT](https://discourse.mc-stan.org/t/monthly-math-development-meeting-4-21-2022-10-am-edt/27217)

<div class="topic-metadata">

**Author:** [@syclik](https://discourse.mc-stan.org/u/syclik)\
**Replies:** 6\
**Last updated:** [April 21, 2022, 2:41pm UTC](https://discourse.mc-stan.org/t/monthly-math-development-meeting-4-21-2022-10-am-edt/27217 "2022-04-21T14:41:49Z")

</div>

We’ve been having monthly Math meetings on the third Thursday of the month. The next one is Thursday, April 21, 2022, at 10 am EDT. This will last no more than one hour; if we need more time, we will schedule additional…

[Next page](https://discourse.mc-stan.org/tag/math/42.md?match_all_tags=true&page=1&tags%5B%5D=math)
