[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Axiom-math] special functions
From: |
Bill Page |
Subject: |
RE: [Axiom-math] special functions |
Date: |
Thu, 26 Jan 2006 22:18:27 -0500 |
Yigal,
On January 26, 2006 6:19 PM you wrote:
>
> Yes, I didn't realize the power of Axiom, I simply made the
> function,
>
> gamma(n,x) == factorial(n-1)*exp(-x)*
> reduce(+, [x^i/factorial(i) for i in 0..(n-1)])
>
> which was adapted from the example function in the book,
>
> f(n) == reduce(*,[i for i in 2..n])
>
> sorry for the lame question I am just beginning to use Axiom,
>
I don't think your question was "lame" at all. The evaluation
of the incommplete Gamma function as a floating point value is
something that *should* be built in to Axiom.
In general I think even Axiom's treatment of Gamma is a little
"uneven". In fact the whole area of special functions in Axiom
is due for a major overhaul... See for example:
http://wiki.axiom-developer.org/6WrongIntegrationResult
http://wiki.axiom-developer.org/130SpecialFunctionIntegerDoesntReturnExpress
ionInteger
Anyway, here is another "one-liner" for Gamma, more or less
equivalent to the function you wrote, which illustrates some
of the other "power" of Axiom:
gamma2(a,z) ==
integrate(exp(-t)*t^(a-1),
t=(z::POLY FRAC INT)..%plusInfinity)::Expression Float
Regards,
Bill Page.