[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] [bug #54998] Bugs in gsl_sf_hyperg_2F1

From: Ludvig af Klinteberg
Subject: [Bug-gsl] [bug #54998] Bugs in gsl_sf_hyperg_2F1
Date: Fri, 9 Nov 2018 19:42:26 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36


                 Summary: Bugs in gsl_sf_hyperg_2F1
                 Project: GNU Scientific Library
            Submitted by: ludvigak
            Submitted on: Sat 10 Nov 2018 12:42:24 AM UTC
                Category: Accuracy problem
                Severity: 3 - Normal
        Operating System: 
                  Status: None
             Assigned to: None
             Open/Closed: Open
                 Release: 2.5
         Discussion Lock: Any



For some reason hyperg_2F1_reflect computes the wrong value when c-a-b is
integer, and a and b are of opposite signs, e.g.

gsl_sf_hyperg_2F1_e(-0.25, 0.25, 1.0, 0.9, &r)
=> 0.8800433809321181 (should be 0.92058925138209276)

I don't have access to Moshier, so I can't tell if it's due to the
"reflection" method or just a bug. However, hyperg_2F1_series appears to
compute the correct value for these cases, so a workaround is to use that when
a and b are of opposite signs: 

This appears to fix some of the issues mentioned in bugs #39056, #32306,

In addition, the fix introduced in commit
9163448f5e0bfa3591a2535c16a2e37386b91171 could use some amendment. First, it
uses a stopping criterion of two terms, not the three that Pearson recommends.
Second, the new stopping criterion doesn't associate an error estimate with
the new termination criteria. This gives an error estimate of O(1) when it's

gsl_sf_hyperg_2F1_e(-0.25, 0.25, 1, 0.25, &r)
=> val=0.9833426507751653, err=1.0000000000000049

This can be fixed as:


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]