# taylor expansion with arbritary precision numbers

Hi,

if I define a function with arbritary precision numbers (e.g., f=0.123456789123456789*log(1+x)) and then compute its Taylor expansion (f.taylor(x,0,5)) it seems to me that the coefficients are given in double precision, whereas if I compute them (e.g., by derivative(f,x,5)(x=0)/factorial(5)) they are in original precision. First of all, am I right or is it only a visualisation difference? If I'm right, is it possible to compute the Taylor expansion with the original precision?

Cheers,

Marco

edit retag close merge delete

Sort by ยป oldest newest most voted

f.taylor() sends things to Maxima, and does not keep precision. I believe this does.

sage: f.series(x,5)
0.12345678912345679*x + (-0.061728394561728395)*x^2 + 0.041152263041152263*x^3 + (-0.030864197280864197)*x^4 + Order(x^5)

more

Thanks, it works, And in order to get the coefficients? f.series(x,5).coefficients() seems to me in double precision.

( 2014-07-14 03:34:12 -0500 )edit