[ChangeSet] Beta function...
David Bateman
David.Bateman at motorola.com
Tue Mar 18 08:50:50 CDT 2008
Ben Abbott wrote:
>
> 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
The attached version might be better as the reason I used the function
name xclgamma was that I was trying to have a function like
extern Complex xclgamma (double);
but that is not possible to use within the current mapper framework.. If
the input argument is complex, then I can keep the xlgamma name for the
function..
D.
--
David Bateman David.Bateman at motorola.com
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch7712
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080318/c75521af/attachment.ksh
More information about the Bug-octave
mailing list