[Scilab-Dev] Incomplete Gamma function
Michaël Baudin
michael.baudin at scilab.org
Fri Jul 30 15:23:06 CEST 2010
Hi,
Thanks Calixte for this suggestion.
I created the bug report :
http://bugzilla.scilab.org/show_bug.cgi?id=7647
with a proposal for an implementation of the gammainc function.
The gammainc implementation from Stixbox is therefore to be
updated :
http://forge.scilab.org/index.php/p/stixbox/issues/102/
There are numerical issues to be taken into account with
this function, and this is why the optional "tail" argument is important.
Best regards,
Michaël Baudin
calixte a écrit :
> Le jeudi 29 juillet 2010 à 18:58 +0200, calixte a écrit :
>
>> Hello Mathieu,
>>
>> gammainc(x,y) is equivalent to 1-cdfpoi("PQ",y-1,x) or gammainc(x,y)=Q
>> where Q is obtained with [P,Q]=cdfpoi("PQ",y-1,x).
>> Since cdfpoi is a built-in function, the performances are better :
>>
>>
>
> Or better gammainc(x,y) is equivalent to cdfgam("PQ",x,y,1)...
>
> 'help cdfgam' should help you.
>
> Calixte
>
>
>> -->tic();for i=1:1000;gammainc(3.1,4.2);end;toc()
>> ans =
>>
>> 1.144
>>
>> -->tic();for i=1:1000;1-cdfpoi("PQ",3.2,3.1);end;toc()
>> ans =
>>
>> 0.017
>>
>> Best regards,
>>
>> Calixte
>>
>> Le jeudi 29 juillet 2010 à 01:37 +0200, OLIVIER Mathieu a écrit :
>>
>>> Hi,
>>>
>>> I needed the Incomplete Gamma function, as it was not available in
>>> Scilab, I've developed my own one, based onto the NUMERICAL RECIPES.
>>>
>>> This functions works and gives sames results than the one from MATLAB
>>> (with my own tests).
>>>
>>> So I would like to submit this function, perhaps this one could be added
>>> in a future version of Scilab or help to made a "Scilab version".
>>>
>>> Regards
>>>
>>> Mathieu OLIVIER
>>>
>>>
>>
>
>
>
--
Michaël Baudin
Ingénieur de développement
michael.baudin at scilab.org
-------------------------
Consortium Scilab - Digiteo
Domaine de Voluceau - Rocquencourt
B.P. 105 - 78153 Le Chesnay Cedex
Tel. : 01 39 63 56 87 - Fax : 01 39 63 55 94
More information about the dev
mailing list