-
Notifications
You must be signed in to change notification settings - Fork 3
I added a wrapper lib for Gil Segura Temme maths...
Edward Smith-Rowland edited this page Aug 11, 2019
·
1 revision
I added a wrapper lib for Gil-Segura-Temme maths with the following signatures:
- double scorer_gi(double x);
- double scorer_hi(double x);
- double parab_cylinder_u(double a, double x);
- double parab_cylinder_v(double a, double x);
- double pgamma(double a, double x);
- double qgamma(double a, double x);
- double tor_harmonic_p(unsigned int l, unsigned int m, double x);
- double tor_harmonic_q(unsigned int l, unsigned int m, double x);
- double pro_sph_harmonic_p(unsigned int l, unsigned int m, double x);
- double pro_sph_harmonic_q(unsigned int l, unsigned int m, double x);
- double obl_sph_harmonic_r(unsigned int l, unsigned int m, double x);
- double obl_sph_harmonic_t(unsigned int l, unsigned int m, double x);
I believe distribution functions like pgamma and qgamma might be better off not to return single numbers but should return both p and q. Invariably, you have to compute both and if one is tiny - near a machine epsilon or less - (often q) you'll just lose information with the P function. So I'm thinking of adding:
- gamma_cdf_t gamma_cdf(double a, double x);
- double inv_gamma_cdf(double a, gamma_cdf_t pq);
Where gamma_cdf_t is a pair basically. I just need to figure out how I want the API to look. Maybe a generic cdf_t, maybe just std::pair and be done...
Of course, I'm not done with any of these functions in the library yet.