C Floating point arithmetic
Chris Torek
chris at umcp-cs.UUCP
Fri Dec 6 12:26:11 AEST 1985
In article <618 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
>In article <4647 at alice.UUCP>, ark at alice.UucP (Andrew Koenig) writes:
[`>>>' must be from 1087 at lll-crg.ARpA]
>>> float a, b;
>>>
>>> a = b + 1.0; /* Gets done in double ... */
>>Nah, gets done in single ...
>On a 3B20S running Sys5 Release 2:
[it is done in double]
You just need a better compiler :-). On a 4.3BSD (Beta) Vax with
the `-f' flag to the C compiler, it is done in single precision;
and the compiler generates a `.float' (single precision) constant.
With a tip of the hat (if I had a hat) to Donn Seeley,
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list