It's believed that such functions are best computed/approximated as continued
fractions:

-- http://people.math.sfu.ca/~cbm/aands/page_263.htm

FriCAS can do this nicely ;-)

>> Gamma.input
)r Gamma

CF==>Complex Float
F(1,a)==1$CF
F(n,a)== if even? n then (n/2-a::CF) else (n-1)/2
G(n,x)== if even? n then 1$CF else x::CF
sF(a)==[F(n,a) for n in 1..]
sG(x)==[G(n,x) for n in 1..]

GAMMA(a,x,k)==
  A:=sF(a)@Stream CF
  B:=sG(x)@Stream CF
  g:=continuedFraction(0,A,B)
  app:=approximants(g)
  x^a*exp(-x)*app.k

-- k: k'th approximation
GAMMA(1.0,2.0,100)
GAMMA(3.0,5.5,100)
GAMMA(3.8,2.4,100)
GAMMA(10,12.123,100)
GAMMA(5,2::CF,100)

-- Check here https://www.danielsoper.com/statcalc/calculator.aspx?id=23




On 18.06.2018 11:30, 'Nasser M. Abbasi' via FriCAS - computer algebra system 
wrote:
> I gave up. 
> 
> How can I persuade Fricas to please print a _numerical_ value for say 
> Gamma[2,3]
> ?   What is the magic trick? 
> 
> in Mathematica, I just add "N"
> 
> In[33]:= N[Gamma[5,2]]
> Out[33]= 22.7363
> 
> I tried
> 
> (16) -> Gamma(5.0,2.0)     
>    (16)  Gamma(5.0,2.0)
>                                                       Type: Expression(Float)
> 
> and
> 
> Gamma(5.0,2.0)::Float 
>    Cannot convert the value from type Expression(Float) to Float .
> 
> and
> 
> eval(Gamma(5.0,2.0)) 
>    (17)  Gamma(5.0,2.0)
>                                                       Type: Expression(Float)
> 
> This is so frustrating. It works on the one argument Gamma
> 
> (18) -> Gamma(5.0)                             
>    (18)  23.9999999999_9999999999_99998
>                                                                   Type: Float
> 
> But not on the 2 argument Gamma
> )display op Gamma
> 
> [2] (D1,D1) -> D1 from FunctionalSpecialFunction(D2,D1)
>             if D2 has Join(COMPAR,INTDOM) and D1 has FS(D2)
> 
> Thank you
> --Nasser
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email
> to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/fricas-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to