Skip to content

Commit 4d3be09

Browse files
committed
Merge commit '8f326d14599d3030c626c46532d8e8534c1cdbec' into HEAD
2 parents 970e930 + 8f326d1 commit 4d3be09

3,411 files changed

Lines changed: 354765 additions & 314259 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*.py text diff=python
55
*.tex text diff=tex
66
lib/** binary
7+
lib/eigen_5.0.1/STAN_CHANGES.md -binary text diff=markdown

.github/workflows/header_checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
runs-on: windows-latest
2727

2828
steps:
29-
- uses: actions/checkout@v6
30-
- uses: actions/setup-python@v6
29+
- uses: actions/checkout@v7
30+
- uses: actions/setup-python@v7
3131
with:
3232
python-version: '3.x'
3333

@@ -52,7 +52,7 @@ jobs:
5252
runs-on: ubuntu-latest
5353

5454
steps:
55-
- uses: actions/checkout@v6
55+
- uses: actions/checkout@v7
5656

5757
- name: Run header tests
5858
run: |
@@ -63,7 +63,7 @@ jobs:
6363
runs-on: ubuntu-latest
6464

6565
steps:
66-
- uses: actions/checkout@v6
66+
- uses: actions/checkout@v7
6767

6868
- name: Run header tests
6969
run: |

.github/workflows/main.yml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
runs-on: ${{ matrix.os }}
2626
strategy:
2727
fail-fast: false
28+
max-parallel: 5
2829
matrix:
2930
os: [windows-11-arm, windows-latest, ubuntu-24.04-arm]
3031
config: [
@@ -36,31 +37,21 @@ jobs:
3637
]
3738

3839
steps:
39-
- uses: actions/checkout@v6
40-
- uses: actions/setup-python@v6
40+
- uses: actions/checkout@v7
41+
- uses: actions/setup-python@v7
4142
with:
4243
python-version: '3.x'
4344

4445
- name: Download and Install Rtools45
4546
if: runner.os == 'Windows'
46-
run: |
47-
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
48-
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
49-
50-
# Installation will hang if the toolchain is already installed
51-
if (-Not $(Test-Path -Path "C:/$RTOOLS")) {
52-
Invoke-WebRequest `
53-
-Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
54-
-OutFile "$RTOOLS.exe"
55-
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
56-
}
57-
58-
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
59-
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
47+
uses: r-lib/actions/setup-r@v2
48+
with:
49+
r-version: 'release'
6050

6151
- name: Build Math libs
6252
shell: pwsh
6353
run: |
54+
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
6455
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
6556
Add-Content make\local "STAN_THREADS=true`n"
6657
make -f make/standalone math-libs -j2
@@ -82,36 +73,28 @@ jobs:
8273
runs-on: ${{ matrix.os }}
8374
strategy:
8475
fail-fast: false
76+
max-parallel: 5
8577
matrix:
8678
os: [windows-11-arm, windows-latest, ubuntu-24.04-arm]
8779
group: [1, 2, 3, 4, 5]
8880

8981
steps:
90-
- uses: actions/checkout@v6
91-
- uses: actions/setup-python@v6
82+
- uses: actions/checkout@v7
83+
- uses: actions/setup-python@v7
9284
with:
9385
python-version: '3.x'
9486

9587
- name: Download and Install Rtools45
9688
if: runner.os == 'Windows'
97-
run: |
98-
$ARCH = if ('${{ matrix.os }}' -eq 'windows-11-arm') { 'aarch64' } else { 'x86_64' }
99-
$RTOOLS = if ('${{ matrix.os }}' -eq 'windows-11-arm') { "rtools45-$ARCH" } else { 'rtools45' }
100-
101-
# Installation will hang if the toolchain is already installed
102-
if (-Not $(Test-Path -Path "C:/$RTOOLS")) {
103-
Invoke-WebRequest `
104-
-Uri https://github.com/r-hub/rtools45/releases/download/latest/$RTOOLS.exe `
105-
-OutFile "$RTOOLS.exe"
106-
Start-Process -FilePath "$RTOOLS.exe" -ArgumentList "/INSTALL /VERYSILENT /SUPPRESSMSGBOXES" -Wait
107-
}
108-
109-
echo "C:/$RTOOLS/usr/bin;C:/$RTOOLS/$ARCH-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
110-
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
89+
uses: r-lib/actions/setup-r@v2
90+
with:
91+
r-version: 'release'
92+
11193

11294
- name: Build Math libs
11395
shell: pwsh
11496
run: |
97+
echo "$(pwd)/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
11598
Add-Content make\local "CPPFLAGS=-w -Wno-psabi -Wno-misleading-indentation`n"
11699
Add-Content make\local "STAN_THREADS=true`n"
117100
make -f make/standalone math-libs -j2

RELEASE-NOTES.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
Stan Math Library Release Notes
22

3+
======================================================================
4+
v5.3.0 (19 May 2026)
5+
======================================================================
6+
7+
- Improved the embedded Laplace approximation. (#3250, #3286, #3297, #3281)
8+
- Added `yule_simon_lcdf`, `yule_simon_cdf`, and `yule_simon_rng`. (#3276, #3283, #3285)
9+
- Added quantile function for student-t distribution. (#3211)
10+
- Added `trace_dot(A, B)`. (#3310)
11+
- Improved the robustness of `gamma_lccdf`. (#3275, #3272, #3292, #3296)
12+
- Set thread QoS to USER_INITIATED on Apple Silicon. (#3278)
13+
- Updated tests to ensure they properly clean up memory. (#3293)
14+
- Fixed typos in error messages, code comments. (#3295)
15+
- Documented parameter 'y' in apply_scalar_binary. (#3284)
16+
- Jenkins: change how gh-pages branch gets re-built. (#3316)
17+
- Jenkins: improved error handling of parallel distribution tests. (#3307)
18+
- Updated OpenCL C++ to use v2025.07.22. (#3298)
19+
- Updated cpplint to 2.0.2. (#3294)
20+
321
======================================================================
422
v5.2.0 (13 January 2026)
523
======================================================================

doxygen/contributor_help_pages/getting_started.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,15 @@ The values of `x` have the same shape as `x`.
660660
661661
### Values and adjoint extensions to Eigen
662662
663-
The matrix and vector autodiff types come with an extra `.val()` and `.adj()`, member functions called `.val_op()` and `.adj_op()`.
664-
These `*_op()` member functions are used as a workaround for a bug in Eigen where transpose expressions will be inaccessible because of an incorrect const reference.
665-
See [here](https://github.com/stan-dev/math/issues/2653) for the details and other information for when this workaround is needed.
663+
By default, `.val()` and `.adj()` return a `CwiseUnaryView` when the matrix/vector is non-`const`,
664+
and returns a `CwiseUnaryOp` when the matrix/vector is `const`. The exception is that
665+
calling `.val()` on a matrix/vector of `var` types will always return a `CwiseUnaryOp`, as the
666+
underlying value is always `const`.
667+
668+
However, using a `CwiseUnaryView` in some Eigen operations (e.g., multiplication, transposition)
669+
can result in a compilation error. To workaround this, the `.val_op()` and `.adj_op()` member
670+
functions have been added to explicitly request a `CwiseUnaryOp` regardless of whether the
671+
matrix/vector is `const` or not.
666672
667673
The member functions `.val()` and `.val_op()` return expressions that evaluate to the values
668674
of the autodiff matrix.

doxygen/doxygen.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ SEARCH_INCLUDES = YES
22922292

22932293
INCLUDE_PATH = ./ \
22942294
lib/tbb_2020.3/include \
2295-
lib/eigen_3.4.0 \
2295+
lib/eigen_5.0.1 \
22962296
lib/sundials_6.1.1/include \
22972297
lib/sundials_6.1.1/src/sundials \
22982298
lib/opencl_v2025.07.22 \

lib/eigen_3.4.0/.gitignore

Lines changed: 0 additions & 38 deletions
This file was deleted.

lib/eigen_3.4.0/.gitlab-ci.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

lib/eigen_3.4.0/.gitlab/issue_templates/Bug Report.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

lib/eigen_3.4.0/.gitlab/issue_templates/Feature Request.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)