Skip to content

[6.38] [math] Add test and improve doxygen of finite difference methods#22841

Closed
root-project-bot wants to merge 5 commits into
root-project:v6-38-00-patchesfrom
root-project-bot:BP_6.38_pull_22823
Closed

[6.38] [math] Add test and improve doxygen of finite difference methods#22841
root-project-bot wants to merge 5 commits into
root-project:v6-38-00-patchesfrom
root-project-bot:BP_6.38_pull_22823

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #22823, requested by @hageboeck.

dpiparo and others added 5 commits July 17, 2026 09:48
(cherry picked from commit 2cebd26)
The standard second-order central, backward and forward differences
contained a mistake: a factor-of-4 error.
See finite different coefficients here: https://en.wikipedia.org/wiki/Finite_difference_coefficient

(cherry picked from commit 99c7a96)
Use a polynomial and its known derivatives to check the correctness of
the finite difference methods.

(cherry picked from commit 9851599)
The test failed without any consequences because it was always returning
0. Other "tests" in this file will need to be updated to check their
   outputs in the future.

Furthermore:
- The second derivatives are unstable with short, so remove it from the
  test.
- The targets for the second derivatives were wrong by a factor 4; fix.
- Due to rounding, finite differences on integers don't exactly hit the
  target. Allow a delta of 1.

(cherry picked from commit f3d03cb)
@dpiparo

dpiparo commented Jul 17, 2026

Copy link
Copy Markdown
Member

The 6.38 cycle is closed: https://root.cern/install/all_releases/

@dpiparo dpiparo closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants