Re: Why is using single-precision slower than using double-precision

meissner@osf.org (Michael Meissner)
Thu, 24 Nov 1994 16:43:42 GMT

          From comp.compilers

Related articles
[12 earlier articles]
Re: Why is using single-precision slower than using double-precision dik@cwi.nl (1994-11-24)
Re: Why is using single-precision slower than using double-precision davidc@panix.com (David B. Chorlian) (1994-11-24)
Re: Why is using single-precision slower than using double-precision roedy@BIX.com (1994-11-30)
Re: Why is using single-precision slower than using double-precision tgl@netcom.com (1994-11-30)
Re: Why is using single-precision slower than using double-precision hebert@prism.uvsq.fr (1994-11-24)
Re: Why is using single-precision slower than using double-precision dekker@dutiag.twi.tudelft.nl (Rene Dekker) (1994-11-30)
Re: Why is using single-precision slower than using double-precision meissner@osf.org (1994-11-24)
| List of all articles for this month |

Newsgroups: comp.parallel,comp.arch,comp.compilers
From: meissner@osf.org (Michael Meissner)
Keywords: C, arithmetic
Organization: Open Software Foundation
References: <3aqv5k$e27@monalisa.usc.edu> <3avelu$nt7@mozart.convex.com>
Date: Thu, 24 Nov 1994 16:43:42 GMT

joelw@convex.convex.com (Joel Williamson) writes:


| Because all floating point arithmetic is done in double precision in C.


Under ISO C, this is not true. Calculations done solely in single
precision can be done in single or double (or long double) precision, at
the whim of the compiler. Under K&R C, all floating point calculations
were indeed done in double. This rule was mainly to simpify the compiler,
but also, the PDP-11 was one of the few machines of the day, that did
double precision faster than single precision. When I worked at Data
General, some of the machines produced had hardware single precision and
microcoded double precision....


I would say its time to update your reference books, after all the ISO C
standard is almost 4 years old, and the ANSI standard almost 5 years old.
Of course, since there is a technical correnda (spelling) winding its way
through the ISO process, you may want to wait for a bit longer. :-) --
Through 11/29: meissner@osf.org 617-621-8861 After 12/12:
meissner@cygnus.com


Old hackers never die, their bugs just increase.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.