-
Notifications
You must be signed in to change notification settings - Fork 69
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
A straightforward translation of Fukushima's code for elliptic functions #2201
Conversation
|
||
// An auxiliary message used to represent tabulated data. Useful for tests that | ||
// verify precomputed results. The arguments and values are to be interpreted | ||
// by the test. |
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.
.proto files are cheap, and we are using this for only one table; just give it fields m, u, s, c, d (or more verbose names as appropriate).
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.
Proto are not so cheap when it comes to compilation time. Furthermore, this proto will be used in the next PR to test the integrals. I'm keeping it as is for now, we can revisit when we have more use cases. (It's not like it's really error-prone: if you swap m
and u
for instance, the test is going to fail all over the place.)
numerics/elliptic_functions.hpp
Outdated
|
||
void Gscd(double const u, double const mc, double& s, double& c, double& d); | ||
|
||
double Elk(double const mc); |
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.
No const in the declaration for parameters passed by value:
void Gscd(double u, double mc, double& s, double& c, double& d);
double 🦌(double mc);
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.
Done.
Complete with a unit test and a benchmark.