Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP Path: utzoo!watmath!clyde!cbosgd!gatech!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <2435@umcp-cs.UUCP> Date: Thu, 5-Dec-85 21:26:11 EST Article-I.D.: umcp-cs.2435 Posted: Thu Dec 5 21:26:11 1985 Date-Received: Sat, 7-Dec-85 03:25:38 EST References: <1087@lll-crg.ARpA> <4647@alice.UUCP> <618@ttrdc.UUCP> Organization: U of Maryland, Computer Science Dept., College Park, MD Lines: 21 In article <618@ttrdc.UUCP> levy@ttrdc.UUCP (Daniel R. Levy) writes: >In article <4647@alice.UUCP>, ark@alice.UucP (Andrew Koenig) writes: [`>>>' must be from 1087@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@umcp-cs ARPA: chris@mimsy.umd.edu