Ask Your Question
1

taylor expansion with arbritary precision numbers

asked 2014-07-11 08:58:26 +0100

Marco Caliari gravatar image

updated 2014-07-11 19:48:20 +0100

slelievre gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-11 14:35:20 +0100

kcrisman gravatar image

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)
edit flag offensive delete link more

Comments

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

Marco Caliari gravatar imageMarco Caliari ( 2014-07-14 10:34:12 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-07-11 08:58:26 +0100

Seen: 298 times

Last updated: Jul 11 '14