Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site alice.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!alice!ark From: ark@alice.UucP (Andrew Koenig) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <4647@alice.UUCP> Date: Tue, 3-Dec-85 11:53:42 EST Article-I.D.: alice.4647 Posted: Tue Dec 3 11:53:42 1985 Date-Received: Thu, 5-Dec-85 05:19:37 EST References: <1087@lll-crg.ARpA> Organization: Bell Labs, Murray Hill Lines: 8 > float a,b; > > a = b + 1.0; /* Gets done in double because 1.0 is a double. > Gag me with a spoon. */ Nah, gets done in single because the compiler realizes that 1.0 has the same representation in single and double, and therefore that the result of the addition will be the same.