[Top][All Lists]

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

[Octave-bug-tracker] [bug #56453] chi2inv, gaminv, gammaincinv inaccurat

From: anonymous
Subject: [Octave-bug-tracker] [bug #56453] chi2inv, gaminv, gammaincinv inaccurate for small 1st argument
Date: Thu, 6 Jun 2019 16:39:10 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0


                 Summary: chi2inv, gaminv, gammaincinv inaccurate for small
1st argument
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 06 Jun 2019 08:39:08 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: Jerry W. Lewis
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Microsoft Windows



The following should be analytically true
  chi2inv(p,df) == gaminv(p,df/2,1)*2 == gammaincinv(p,df/2)*2

Consider chi2inv(p,2), which converges to 2*p as p approaches zero.

chi2inv(1e-15,2) returns 2.000000000000001e-15 for essentially machine
gaminv(1e-15,1,1)*2 returns 1.900000018803639e-15 for 1 figure accuracy; and
gammaincinv(1e-15,1)*2 returns 1.998401444325283e-15 for 3 figure accuracy.

chi2inv(p,2) for p<=1e-16 returns 1.490116119384766e-09 instead of 2*p;
gaminv(p,1,1)*2 for p<=1e-16 returns 2.980232238769531e-09 == chi2inv(p,2)*2
instead of 2*p; and
gammaincinv(1e-16,1)*2 returns 2.220446049250313e-16 for almost 1 figure

gammaincinv(p,1)*2 for p<=1e-17 returns -0 instead of 2*p.


Reply to this item at:


  Message sent via Savannah

reply via email to

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