Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!mips!apple!olivea!mintaka!bloom-beacon!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.lang.c Subject: Re: floating point multiplication BUG in C (cc compiler) Message-ID: <1990Oct22.085123.10009@athena.mit.edu> Date: 22 Oct 90 08:51:23 GMT References: <1348@banach.ACA.MCC.COM> <1990Oct20.231726.3249@zoo.toronto.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: Massachusetts Institute of Technology Lines: 14 In article <1990Oct20.231726.3249@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes: >In general, you should use `double' for all floating-point arithmetic >you care about, unless speed or storage is critical and you have done >a careful analysis of the tradeoffs involved. On some newer machines, double is faster. 2 examples: the 68881 (used with the 680x0 and the IBM RT), and the IBM RS 6000. This is because the hardware does only high precision calculations, and must take extra cycles to round to single precision if that is what you ask for by using type float instead of double. -- John Carr (jfc@athena.mit.edu)