[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65230] Poor accuracy of betaln for most input
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #65230] Poor accuracy of betaln for most inputs due to catastrophic cancellation |
Date: |
Tue, 30 Jan 2024 11:38:42 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65230>
Summary: Poor accuracy of betaln for most inputs due to
catastrophic cancellation
Group: GNU Octave
Submitter: None
Submitted: Tue 30 Jan 2024 04:38:42 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 30 Jan 2024 04:38:42 PM UTC By: Anonymous
The betaln(a, b) function is currently implemented as gammaln (a) + gammaln
(b) - gammaln (a + b). This seems to have reasonable accuracy when the ratio
a/b is near 1, but all accuracy is lost due to catastrophic cancellation as
the ratio becomes more extreme. For most inputs, such as betaln(2^62, 2^6), 0
is returned.
My current workaround is to use the gsl_sf_lnbeta function from the gsl
package. This function can provide an error estimate in its second output
argument. The error estimates seem reasonably small for most inputs I've
tried.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65230>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65230] Poor accuracy of betaln for most inputs due to catastrophic cancellation,
anonymous <=