Xref: utzoo comp.edu:4247 sci.math:17070 sci.misc:4961 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uwm.edu!bionet!agate!stanford.edu!unix!hsdndev!cmcl2!lanl!cochiti.lanl.gov!jlg From: jlg@cochiti.lanl.gov (Jim Giles) Newsgroups: comp.edu,sci.math,sci.misc Subject: Cosine of Pi/2.0 (was: Subtle Math Questions) Message-ID: <22614@lanl.gov> Date: 25 Apr 91 15:41:37 GMT References: <2730@ttardis.UUCP> Sender: news@lanl.gov Organization: Los Alamos National Laboratory Lines: 18 mjo@ttardis.UUCP (Mike O'Connor) writes: > Well... on an HP-11 or 15, you can take the cosine of pi/2 and get > a number that is not zero. It's rather annoying. In 'radians' mode: The calculator is just being honest. There is no representable number which is exactly equal to pi/2. This means that there is no representable number for which the cosine is exactly zero. This is one of the first tests I make of a calculator: if it gives zero for cosine of _anything_ that can be represented, it probably has a bad cosine function. On the other hand, if your calculator has a 'degrees' mode for the trig functions, you _should_ get zero for the cosine of 90.0 degrees. Similarly for 'grads' mode. J. Giles