Pointing Float, you turkey!!!

Dik T. Winter dik at zuring.UUCP
Sat Dec 21 13:19:25 AEST 1985


In article <661 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
(In a diatribe about english semantics about the word done)
>I cannot say 'gag me with a spoon' to C, however, for doing this--IMPORTANT
>DIFFERENCE!!  C does not forbid this operation being implemented in single
>which makes sense anyhow--doing it in double then throwing away the excess
>precision in order to fit the result into the destination float variable gains
>nothing in accuracy and loses much efficiency over an implementation in
>single.

Gag me with a spoon!
On one of the machines I regularly work with it makes quite a difference
whether a=a+1.0 is done in single or double precision (to be precise,
this is a CDC Cyber 170 series).  If a is only slightly more than -1.0,
single and double precision operations will give different results.
(Double will give correct results, yes, single not so.)
So, do I want this to be done in double?  NO.
It takes about 6 (7, 8?) times as long in double!
(Aaaah, what do you care about 625 nano-seconds?)
-- 
dik t. winter, cwi, amsterdam, nederland
UUCP: {seismo,decvax,philabs,okstate,garfield}!mcvax!dik



More information about the Comp.lang.c mailing list