float vs. double

rgenter at bbn-labs-b.arpa rgenter at bbn-labs-b.arpa
Thu Jan 9 00:07:46 AEST 1986


     If you are worried about 1.0 being a double constant and forcing the
addition to be in double precision, then do:

	a = a + 1.0F;

as specified in the ANSI C draft.
--------
Rick Genter 				BBN Laboratories Inc.
(617) 497-3848				10 Moulton St.  6/506
rgenter at bbn-labs-b.ARPA			Cambridge, MA   02238
...!{decvax,linus}!bbncca!rgenter



More information about the Comp.lang.c mailing list