Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to make Taylor expansion with fixed numerical precision?

Following command

f(x)=sin(x)
taylor(f,x,1.0,2)

shows result:

x |--> -0.4207354924039483*(x - 1.0)^2 + 0.5403023058681398*x + 0.30116867893975674

The presion has too many bits, what I want is 3 bits, such as:

x |--> -0.420*(x - 1.0)^2 + 0.540*x + 0.301

How to do it?

Thanks for your help.

How to make Taylor expansion with fixed numerical precision?

Following command

f(x)=sin(x)
taylor(f,x,1.0,2)

shows result:

x |--> -0.4207354924039483*(x - 1.0)^2 + 0.5403023058681398*x + 0.30116867893975674

The presion precision has too many bits, what I want is 3 bits, such as:

x |--> -0.420*(x - 1.0)^2 + 0.540*x + 0.301

How to do it?

Thanks for your help.

How to make Taylor expansion with fixed numerical precision?

Following command

f(x)=sin(x)
taylor(f,x,1.0,2)

shows result:

x |--> -0.4207354924039483*(x - 1.0)^2 + 0.5403023058681398*x + 0.30116867893975674

The precision of result has too many bits, what I want is 3 bits, such as:

x |--> -0.420*(x - 1.0)^2 + 0.540*x + 0.301

How to do it?

Thanks for your help.