axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-math] special functions


From: yigal
Subject: RE: [Axiom-math] special functions
Date: Sun, 29 Jan 2006 01:16:35 -0800

I made a small mistake but numerically important in my sloppy incomplete
gamma code here is a modified version that seems like its working:

x:Float;x:=20.0
a:Integer;a:=7
n : (Integer) -> List Polynomial Float;
n(y) == [y-1,address@hidden Polynomial Float;
numg : (Integer) -> List Polynomial Float; 
numg(1)== [1,1-a];
numg(i|i>1) == append(numg(i-1),n(i))@List Polynomial Float;
d : (Integer) -> List Polynomial Float;
d(y) == [x,address@hidden Polynomial Float; 
deng : (Integer) -> List Polynomial Float; 
deng(1)== [x,1];
deng(i|i>1) == append(deng(i-1),d(i))@List Polynomial Float;  
num := [numg.i.i for i in 1..];
den := [deng.i.i for i in 1..];
cf := continuedFraction(0,num,den)
ccf := convergents cf;
gam(i) == exp(-x)*x^a*ccf.i;
gamma(n,x) == factorial(n-1)*exp(-x)*reduce(+,[x^i/factorial(i) for i in
0..(n-1)]);

where
gam.15 = 0.1836881970 165365277
gamma(7,20.)=0.1836881970 165365277

thank you all for your previous help,

Yigal Weinstein





reply via email to

[Prev in Thread] Current Thread [Next in Thread]