Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!ucsd!ucbvax!lsr-vax.UUCP!lmo From: lmo@lsr-vax.UUCP ("Lance M. Optican - LMO") Newsgroups: comp.sys.sgi Subject: trig functions Message-ID: <9011131959.AA11389@> Date: 13 Nov 90 19:59:27 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 60 ----- Begin Included Message ----- From uunet!vmb.brl.mil!info-iris-request Tue Nov 13 03:06:31 1990 Return-Path: Received: from uunet.UUCP by (4.1/SMI-4.0) id AA21136; Tue, 13 Nov 90 03:06:20 EST Received: from VMB.BRL.MIL by uunet.uu.net (5.61/1.14) with SMTP id AA15087; Tue, 13 Nov 90 01:37:08 -0500 Received: from vmb.brl.mil by VMB.brl.MIL id aa10955; 13 Nov 90 0:36 EST Received: from vgr.brl.mil by VMB.BRL.MIL id aa10926; 13 Nov 90 0:23 EST Received: from ucbvax.Berkeley.EDU by VGR.BRL.MIL id aa06765; 13 Nov 90 0:10 EST Received: by ucbvax.Berkeley.EDU (5.63/1.42) id AA06726; Mon, 12 Nov 90 21:10:44 -0800 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-iris@brl.mil (info-iris@brl.mil) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 12 Nov 90 15:48:57 GMT From: "Allan R. Wilks" Organization: AT&T Bell Laboratories, Murray Hill NJ Subject: trig functions Message-Id: <11609@alice.att.com> Sender: uunet!BRL.MIL!info-iris-request To: info-iris@BRL.MIL Status: R Is it reasonable to expect the cosine of (exactly) 0 to be (exactly) 1? $ cat > a.c < main() { printf("%g\n", 1.0-cos(0.0)); } ! $ cc a.c -lm $ a.out 1.11022e-16 $ cc a.c -lm43 $ a.out 0 Allan R. Wilks AT&T Bell Labs allan@research.att.com ----- End Included Message ----- It is reasonable to expect the maht library to perform well! I tried Allan Wilks program on both Sun/3 and Sun/4 machines, and they both gave "0" as the difference between 1.0 and cos(0.0). Who at SGI is responsible for the math library? What standards of compatibility are enforced with other machine architectures? ---------------------------------------------------+----------------------- Lance M. Optican | uunet!lsr-vax!lmo National Eye Institute, NIH, Bethesda, MD | (301) 496-3549 ---------------------------------------------------+-----------------------