GNU Scientific Library - Bugs: bug #53876, gsl_sf_hyperg_2F1_renorm missing...
You are not allowed to post comments on this tracker with your current authentication level.
bug #53876: gsl_sf_hyperg_2F1_renorm missing factor
Submitter: | Charles Hussong <chussong> | ||
Submitted: | Fri 11 May 2018 02:08:22 AM UTC | ||
Category: | Accuracy problem | Severity: | 3 - Normal |
Operating System: | Status: | None | |
Assigned to: | None | Open/Closed: | Open |
Release: |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
No changes have been made to this item
Powered by Savane 3.13-f8d8.
Corresponding source code
Hello,
I apologize for the poor formatting; I hope this report is simple enough that it isn't too offensive.
I was surprised today to see gsl putting out a wrong answer for the renormalized hypergeometric function. The behavior is easily observed with the following call from one of my unit tests: gsl_sf_hyperg_2F1_renorm(1, 2, -3, 0.4). This returns 2572.02, but the correct answer is 65.8436.
Upon further inspection, the cause is pretty clear: the case in question begins on line 843 of specfunc/hyperg_2F1.c, where an appeal is made to Abramowitz and Stegun (15.1.2) [see http://people.math.sfu.ca/~cbm/aands/page_556.htm]; this is perfectly valid, but the subsequent code omits the z^(m+1).
I would offer a patch for this directly, but I'm certain I'd do the error handling incorrectly; if not for this concern, simply changing the first argument on line 863 from "sg F.val" to "sg pow(x, -c+1) * F.val" would give the right answer.
Please let me know if there is any further assistance I can provide.
Best regards,
Charles