Jump to content
  • Advertisement
Sign in to follow this  
JohnnyCode

Maclaurin series for reciprocal function

This topic is 1346 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wonder what would be Maclaurin polynome aproximating f(x)=1/x function, starting at x=0 and going to good accuracy of large x values (10000+). Coulld I even achieve this with reasonable amount of degrees? (like 9 or 11th degree). I am going to jump to this soon but your suggestions would help me so much.

Share this post


Link to post
Share on other sites
Advertisement

That's not defined at x = 0 ;)

 

You'll have to use the Taylor series approximation around a suitable point (probably x = 1).

 

What's wrong with just using 1/x? It's going to be a lot more efficient than calculating a power series expansion...

 

EDIT: It also has a very narrow radius of convergence ( abs(1-x) < 1 when centred on 1). So it's pretty much useless... See http://www.wolframalpha.com/input/?i=taylor+series+1%2Fx+a%3D1&lk=4

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites

 

You'll have to use the Taylor series approximation around a suitable point (probably x = 1).

Thanks, I think it would be good to start from 1.0 to aproximate, thanks a lot.

The thing is that I would want to find a reciprocal of a number between 0.000001 to high values like 100000.0 of floating range from 24 bit to like 16 bit. Is reciprocal function unlikely to aproximate like that?

 

I have used tylor series for goniometric functions on PI perioda being extremly exact at very low degree of polynome , I would so love to have it for 1/x fucntion on large scale of defintion.

Share this post


Link to post
Share on other sites

The interval of convergence is too small.

 

Are you using floating point or fixed point, I don't understand what you mean by this: of floating range from 24 bit to like 16 bit.

 

Using 1/x is going to be a lot more accurate than a (poor) approximation which is what the Taylor Series expansion about 1 will give you. Some functions aren't approximated very well at all by Taylor Series (of which McLaurin series is just a special case), e.g. sqrt(x).

 

Or you could use the Laurent Series, f(x) = x-1  biggrin.png

Share this post


Link to post
Share on other sites

1/x and x1/2 . Nice to meet you. We are the most used and demanded curves in universe and forget about aproximating us silly brat, even around a small interval! Even in 16 bit floating resolution! (whe-whee-whaaaa!aaa!whaaa! sad.png )

Edited by JohnnyCode

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!