From octave-maintainers-request at bevo dot che dot wisc dot edu Thu Feb 1 22:00:32 2001 Subject: Re: ISO C++ and Octave From: "John W. Eaton" To: Mumit Khan Cc: octave-maintainers at bevo dot che dot wisc dot edu, khan@xraylith.wisc.edu Date: Thu, 1 Feb 2001 22:00:26 -0600 On 1-Feb-2001, Mumit Khan wrote: | On Thu, 1 Feb 2001, John W. Eaton wrote: | | > Nope. That looks pretty bad. Sort of like | > | > octave:6> sin (pi) | > ans = 1.2246e-16 | > | > (would it really hurt to make this a special case?). | | I must confess that I don't have a opinion either way that I | can back up. On one hand, we certainly can't expect exact | precision from finite precision numerics, but on the other | hand, users of software such as Octave may have come to expect | certain "nice-ness". Don't know ... I don't plan to add special cases like this to Octave. I was just wondering out loud why if we define M_PI, the libraries don't check for a few special cases. I don't see how it would hurt anything, but maybe someone knows better. Perhaps because it would be tougher to guarantee that sin (N*pi) == 0 for all N = 0, 1, 2, ... jwe