[ChangeSet] Beta function...
Ben Abbott
bpabbott at mac.com
Tue Mar 18 06:43:38 CDT 2008
On Mar 18, 2008, at 6:37 AM, David Bateman wrote:
> Ben Abbott wrote:
>>
>> On Mar 17, 2008, at 3:40 PM, Ben Abbott wrote:
>>
>>> On Monday, March 17, 2008, at 02:56PM, "Jorge Londoño"
>>> <jmlon at yahoo.com> wrote:
>>>> I just happen to jump into a problem that require me to compute the
>>>> Beta function with negative arguments.
>>>> If you look at the definition of the beta function, for example
>>>> here:
>>>
>>
>> I replaced gammaln(x) with log(gamma(x)), modified the help text to
>> reflect that inputs must be real, and added a few extra tests.
>>
>> Ben
>
> Is that the right (TM) thing to do, as Marco says it increases the
> risk
> of overflows? Shouldn't we rather get lgamma to work correctly for
> negative arguments. What about something like the attached patch
> instead?
>
> D.
>
I agree that changing lgamma is more proper!
Thanks
Ben
More information about the Bug-octave
mailing list