Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!husc6!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Fortran computes cosine 300 times faster than C (on Sun3) Keywords: Fortran, C, cosine, speed Message-ID: <9824@smoke.BRL.MIL> Date: 8 Mar 89 21:11:22 GMT References: <765@uceng.UC.EDU> <16279@mimsy.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 9 In article <16279@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >`COS' is an intrisinc function in Fortran. ... Three other contributions to the difference in running time are: (a) C's cos() computes a double-precision value. (b) The C code required conversion from double to single precision for the assignment. (c) C's semantics required that the multiplications be performed in double precision.