Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!sgi!rpw3@rigden.wpd.sgi.com From: rpw3@rigden.wpd.sgi.com (Rob Warnock) Newsgroups: comp.arch Subject: Re: sin(pi) (Was: Re: bizarre instructions) Message-ID: <87778@sgi.sgi.com> Date: 27 Feb 91 08:02:06 GMT References: <15485@lanl.gov> <3028@charon.cwi.nl> <1991Feb26.175315.9719@linus.mitre.org> Sender: guest@sgi.sgi.com Reply-To: rpw3@sgi.com (Rob Warnock) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 32 In article <1991Feb26.175315.9719@linus.mitre.org> bs@linus.mitre.org (Robert D. Silverman) writes: +--------------- | In article <3028@charon.cwi.nl> jurjen@cwi.nl (Jurjen NE Bos) writes: | :People owning a HP28 or HP48 know this. This calculator indeed delivers 0 for | :sin(pi), and 0.0548036651488 for sin(3.14159265359). Note that the latter | :value is correct to 12 digits. | | Huh??? sin(3.14159265359) = .05480366... ???? | This value is so far off as to be unbelievable. | When I punch sin(pi) into my HP I get -2.0676154e-13. +--------------- (*ouch*) I fell into this trap, too, for a second. Then it hit me: If your calculator is in "degrees" mode, then of course you will get .0548037-, which is correct. "Pi degrees" ~= 3.1416/57.296 ~= .0548311+ radians. And of course, for small x, sin(x) ~= x. In "radians" mode, my Casio calculator says sin(pi) is 0. +--------------- | I would not TRUST a calculator that actually returned 0.0 +--------------- Well, some calculators display 0 when all significant digits are zero and all but the last guard digit are also zero. It keeps from scaring the naive. I've gotten used to it... -Rob