octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60682] betainc is inaccurate


From: Michele Ginesi
Subject: [Octave-bug-tracker] [bug #60682] betainc is inaccurate
Date: Fri, 28 May 2021 12:36:54 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

Follow-up Comment #1, bug #60682 (project octave):

This can be easily solved by computing the three cases (a=1,b=1), (a=1, b!=1)
and (a!=1, b=1) separately and using the continued fractions only on
non-trivial cases.
I attach the diff implementing this change.

Coincidentally, test <*34405> now would fail. However, the new behavior is
Matlab compatible. Before the change

betainc (0.5, 1, Inf)
>> NaN

now

betainc (0.5, 1, Inf)
>> 1

which is the same answer given by Matlab (2020a)

(file #51492)
    _______________________________________________________

Additional Item Attachment:

File name: betainc_trivial.diff           Size:3 KB
    <https://file.savannah.gnu.org/file/betainc_trivial.diff?file_id=51492>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60682>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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