Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Taylor seri...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 6 Topic 4019 of 4053
Post > Topic >>

Re: Taylor series FSIN, FCOS, FTAN

by "The Beez'" <hansoft@[EMAIL PROTECTED] > Apr 27, 2008 at 08:32 AM

On Apr 27, 12:30 pm, Albert van der Horst <alb...@[EMAIL PROTECTED]
>
wrote:
> For large values you should do range reduction. It amount to
> subtraction multiples of 2*pi and such. At least try to land
> in the [-PI, PI] interval.
> It is wise to at least take that from the sources I supplied. This
> greatly affects precision. If you omit range reduction, with your
> Taylor series, it still works in principle.
> For Chebychev it breaks down.

: REDUCE.2PI                   \ x
        PI*2                    \ x pi2
        FOVER FOVER F/          \ x pi2 x/pi2
        FLOOR                   \ x pi2 i(x/pi2)
        FOVER F*                \ x pi2 mod(x,pi2)
        FROT                    \ PI2 MOD(X,PI2) X
        FSWAP F-                \ PI2 MOD(X,PI2)
        FOVER 2E F/ FOVER       \ PI2 MOD PI MOD
        F< IF FSWAP F- ELSE FNIP THEN ;

I took this one from your source, but I'm unable to figure out what
you're trying to do at:

        FOVER 2E F/ FOVER       \ PI2 MOD PI MOD

Where does "2E" come from all of a sudden? And why isn't it converted
to a float before using it?

Hans Bezemer




 6 Posts in Topic:
Taylor series FSIN, FCOS, FTAN
"The Beez'" <  2008-04-26 04:12:45 
Re: Taylor series FSIN, FCOS, FTAN
Albert van der Horst <  2008-04-27 10:30:59 
Re: Taylor series FSIN, FCOS, FTAN
"The Beez'" <  2008-04-27 08:32:25 
Re: Taylor series FSIN, FCOS, FTAN
Albert van der Horst <  2008-04-27 17:04:51 
Re: Taylor series FSIN, FCOS, FTAN
"The Beez'" <  2008-04-27 08:45:45 
Re: Taylor series FSIN, FCOS, FTAN
"The Beez'" <  2008-04-28 02:33:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 1:29:34 CDT 2008.