[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60528] special function: betaincinv
From: |
Paul Netsaver |
Subject: |
[Octave-bug-tracker] [bug #60528] special function: betaincinv |
Date: |
Wed, 5 May 2021 06:45:04 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 |
URL:
<https://savannah.gnu.org/bugs/?60528>
Summary: special function: betaincinv
Project: GNU Octave
Submitted by: netsaver
Submitted on: Wed 05 May 2021 10:45:01 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error or Warning
Status: None
Assigned to: None
Originator Name: Netsaver Paul
Originator Email:
Open/Closed: Open
Release: 6.2.0
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
OCTAVE 6.2
betaincinv(1e-6,1,3)
% test printouts from the called 'betainc' follow:
x = 0.0000000, a = 1, b = 3
x = 1.0000000, a = 1, b = 3
x = 0.5000000, a = 1, b = 3
x = 0.2500000, a = 1, b = 3
x = 0.1250000, a = 1, b = 3
x = 0.0625000, a = 1, b = 3
x = 0.0312500, a = 1, b = 3
x = 0.0156250, a = 1, b = 3
x = 0.0078125, a = 1, b = 3
x = 0.0039062, a = 1, b = 3
x = 0.0019531, a = 1, b = 3
x = 0.0009766, a = 1, b = 3
x = 0.0009766, a = 1, b = 3
x = -0.0000006, a = 1, b = 3
error: betainc: X must be in the range [0, 1]
error: called from
betainc at line 99 column 5
betaincinv>@<anonymous> at line 172 column 25
betaincinv>newton_method at line 236 column 15
betaincinv at line 181 column 14
MATLAB
betaincinv(1e-6,1,3)
ans = 3.333333e-07
out = betaincinv(p,m,n)
It is seen that the internal iterative procedure calls the direct beta
function with negative value of p and this cause the error.
It happens with p >= 1e-5 and m=1 and n>2 (not so uncommon values by the way,
e.g. p=1e-6, m=1, n=3 may happen in radar applications).
It seems that Matlab intercepts this case and get the results directly
dividing p by n: out = p/n.
Regards,
Paul Netsaver
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60528>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60528] special function: betaincinv,
Paul Netsaver <=