-
Notifications
You must be signed in to change notification settings - Fork 145
Test: add precision tests for sphbesj #2958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the current test grid is uniform. Is it possible to add some extra-fine sample points near 0, like 0.01, 0.001, 0.0001, 0.00001...? (no necessarily a log grid with base 10)
|
I have added data points around 0 with a data range that spans from |
|
It seems sphbes.m still has some problems:
PS: if you feel writing a robust sphbes function is tedious and unnecessary, maybe removing those matlab/octave scripts is just fine. |
In precision tests, we typically require strict benchmark data for comparison. For instance, in scientific computation, we often consider the calculation results from commercial software as the gold standard, like Matlab or Mathematica. In this commit, we utilized Octave, an open source software, to generate the Bessel function data points.
sphbesjpassed the precision tests where the threshold is set to1e-12.Spherical_Besselfailed to pass the tests (especially whenl = 4the error rises to1e-6) thusTEST_F(Sphbes, SeriesAndRecurrence)is removed.