08/26/2009, 08:38 PM
(08/26/2009, 08:08 PM)bo198214 Wrote: Are you talking about recentering the Abel function or about my method of shift-conjugation of the original function? Computing the Carleman matrix of exp at some other place than 0 is unexpectedly more time consuming, as I already mentioned. 100 terms take perhaps 10-20 min at my place. While 400 at 0 takes perhaps 5min (without your acceleration method of course)How are you computing the Carleman matrix? I use iterative matrix multiplication, so it takes only slightly more time to move the development point. I've been doing 250 term matrices in only a couple minutes, give or take. Here is some SAGE code I've been using.
Code:
def Carleman(field, expr, x, size):
carl = matrix(field, size+1, size+1);
mulm = matrix(field, size+1, size+1);
cof = taylor(expr, x, 0, size).coeffs();
for rrow in xrange(size+1):
for ccol in xrange(len(cof)):
col2 = cof[ccol][1]+rrow;
if col2 < size+1:
mulm[rrow, col2] = field(cof[ccol][0]);
vec = vector(field, size+1);
vec[0] = field(1);
carl[0] = vec;
for ii in xrange(size):
vec = vec * mulm;
carl[ii+1] = vec;
return carl;
# Small test run
Flt = ComplexField(27);
size = 5;
shft = Flt(1, 0);
x = var('x');
Cf = Carleman(Flt, e^(x+shft)-shft, x, size)
print Cf;
# Calculate the Abel function
Flt = ComplexField(512);
size = 250;
shft = Flt(1, 0);
time Cf = Carleman(Flt, e^(x+shft)-shft, x, size);
# time CI = Carleman(Flt, x, x, size);
CI = MatrixSpace(RR, size+1, size+1).identity_matrix();
M = Cf.submatrix(1,0,size,size) - CI.submatrix(1,0,size,size);
time A = vector(Flt, M.solve_left(vector(Flt, [1] + [0 for kk in xrange(size-1)]))[0]);
print A.change_ring(CC)[0:20];Output:
Code:
[ 1.000000 0 0 0 0 0]
[ 1.718282 2.718282 1.359141 0.4530470 0.1132617 0.02265235]
[ 2.952492 9.341549 12.05983 8.945981 4.699514 1.925110]
[ 5.073214 24.07712 50.12800 62.18783 53.35036 34.82992]
[ 8.717212 55.16170 158.4776 278.1409 340.3287 314.9432]
[ 14.97863 118.4792 434.1022 987.6331 1582.217 1922.546]
Time: CPU 52.15 s, Wall: 52.51 s
Time: CPU 20.40 s, Wall: 20.41 s
(0.915948856840961, -0.208605479751221, -0.0545257718234947,
0.0713217792410870, -0.0199817585842940, -0.0110084938578771,
0.0119893515581789, -0.00267961632960444, -0.00264867908203897,
0.00236244492078691, -0.000354279433811006, -0.000647870949133354,
0.000488726691175665, -0.0000401511878585745, -0.000157929045310358,
0.000108539033152715, -2.24888735429443e-6, -0.0000505453252195363,
0.0000483511387610123, -0.0000269817432526313)Note that I used a ComplexField. A RealField would have sufficed and would have been faster, but this shows that we can now easily step away from the real line if we wanted to.
~ Jay Daniel Fox

