Skip to content

Commit 8c1f011

Browse files
committed
Ver 0.39.10
2 parents a5547f9 + 571d93f commit 8c1f011

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "peroxide"
3-
version = "0.39.9"
3+
version = "0.39.10"
44
authors = ["axect <[email protected]>"]
55
edition = "2018"
66
description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax"

RELEASES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Release 0.39.10 (2025-07-11)
2+
3+
- Fixed a bug in the adaptive step size control for all embedded Runge-Kutta methods.
4+
- Corrected the `BU` coefficient vector for the 7th order solution in the `RKF78` implementation.
5+
16
# Release 0.39.9 (2025-07-10)
27

38
- Change implementation of Gauss-Legendre 4th order method

src/numerical/ode.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl<BU: ButcherTableau> ODEIntegrator for BU {
324324
error = error.max(dt * s.abs())
325325
}
326326

327-
let factor = (self.tol() * dt / error).powf(0.2);
327+
let factor = (self.tol() / error).powf(0.2);
328328
let new_dt = self.safety_factor() * dt * factor;
329329
let new_dt = new_dt.clamp(self.min_step_size(), self.max_step_size());
330330

@@ -1102,7 +1102,7 @@ impl ButcherTableau for RKF78 {
11021102
// BU_i = BE_i (8th order) - ErrorCoeff_i
11031103
// ErrorCoeff_i = [-41/840, 0, ..., 0, -41/840 (for k11), 41/840 (for k12), 41/840 (for k13)]
11041104
const BU: &'static [f64] = &[
1105-
41.0 / 420.0, // 41/840 - (-41/840)
1105+
0.0,
11061106
0.0,
11071107
0.0,
11081108
0.0,
@@ -1112,9 +1112,9 @@ impl ButcherTableau for RKF78 {
11121112
9.0 / 35.0,
11131113
9.0 / 280.0,
11141114
9.0 / 280.0,
1115-
41.0 / 420.0, // 41/840 - (-41/840)
1116-
-41.0 / 840.0, // 0.0 - (41/840)
1117-
-41.0 / 840.0, // 0.0 - (41/840)
1115+
0.0,
1116+
41.0 / 840.0,
1117+
41.0 / 840.0,
11181118
];
11191119

11201120
// Coefficients for the 8th order solution (used for error estimation)

0 commit comments

Comments
 (0)