RfD: Ambiguity in FATAN2

forth

    Next

  • 1. Any Interest in an Harris RTX2000?
    I was involved in a project that started out using an RTX2000 by Harris Semiconductor. The RTX was designed out when Harris announced the "not for new design" status of the chip. I have here and wish to sell to an interested person: 2 RTX development boards made by VME each with a RTX2000GI-10 they come along with the Forth development system and Harris C compiler. Anybody want to make me an offer? David Lincer
  • 2. Vereinstreffen in Mé»±chen
    Hallo zusammen, das letzte Mal habe ich in Oberschleieim beim Chinesen am Forth-Treffen teilgenommen. Da ich jetzt aber schon lger nicht mehr war und einige wieder den Gran Sasso bevorzugen wollten, bin ich mir jetzt nicht sicher, wo das nhste Forth-Treffen stattfinden wird. Ist es wieder beim Gran Sasso oder ganz woanders? Der Termin wird ja noch der gleiche sein ...

Re: RfD: Ambiguity in FATAN2

Postby georgeahubert » Wed, 25 Mar 2009 20:28:55 GMT

On Mar 24, 10:41m,  XXXX@XXXXX.COM  (Anton Ertl)



W32F gives the same (assuming the precision is set to 14). Since pi
cannot be represented exactly shouldn't it be the closest
approximations of pi and -pi, allowing for rounding).


George Hubert

Re: RfD: Ambiguity in FATAN2

Postby David N. Williams » Wed, 25 Mar 2009 21:53:56 GMT


 > On Mar 24, 10:41 am,  XXXX@XXXXX.COM  (Anton Ertl)


 >> [...]
 >>
 >> And on Gforth (which uses C's atan2):
 >> -1e 0e fatan2 f.
 >>
 >> outputs
 >>
 >> -1.5707963267949
 >>
 >> and I guess that Gforth is not the only one.
 >>
 >
 > W32F gives the same (assuming the precision is set to 14). Since pi
 > cannot be represented exactly shouldn't it be the closest
 > approximations of pi and -pi, allowing for rounding).

Right.  This is what actually happens in fatan2-test.fs, where,
as I mentioned in a reply to Bernd, the values of pi and its
fractions used actually turn out to be "exactly rounded", at
least in some systems.  That includes pfe and gforth.

I'm not sure to what extent that much accuracy should be
required.  For example, is fatan2 usually that good over its
whole range?

-- David



Return to forth

 

Who is online

Users browsing this forum: No registered users and 39 guest