[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #53876] gsl_sf_hyperg_2F1_renorm missing factor
From: |
Charles Hussong |
Subject: |
[Bug-gsl] [bug #53876] gsl_sf_hyperg_2F1_renorm missing factor |
Date: |
Thu, 10 May 2018 22:08:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 |
URL:
<http://savannah.gnu.org/bugs/?53876>
Summary: gsl_sf_hyperg_2F1_renorm missing factor
Project: GNU Scientific Library
Submitted by: chussong
Submitted on: 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:
Discussion Lock: Any
_______________________________________________________
Details:
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
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53876>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] [bug #53876] gsl_sf_hyperg_2F1_renorm missing factor,
Charles Hussong <=