🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2483

Re: More on Small floating point constants are doubles?

#2483
From: Eugene Brooks
Date: Tue, 28 Mar 1989 18:15
13 lines
1279 bytes
In article <8903280946.AA14743@marvin.moncam.uucp> mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson) writes:
>
>Dave Hanson points out that I can get float constants rather than doubles by appending an "F".
>
>I should have explained further ... ;-). I'm in the unfortunate position of having to keep
>my code in a state where it can be compiled by ANSI and non-ANSI compilers. Adding
>#ifdef __STDC round prototypes etc is bearable, but conditionally compiling a "f" after
>all the floating point constants would get silly. Thus I'd like that option.
Then use "(float)1.2" to get a float constant.  This is portable to the old
compilers and in fact was the way to get the job done on quite a few of them.


brooks@maddog.llnl.gov, brooks@maddog.uucp
Technical Details
Message-ID: <22654@lll-winken.LLNL.GOV>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!lll-winken!vette!brooks
References: <15894@princeton.Princeton.EDU> <8903280946.AA14743@marvin.moncam.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!lll-winken!vette!brooks
From: brooks@vette.llnl.gov (Eugene Brooks)
Newsgroups: gnu.gcc.bug
Subject: Re: More on Small floating point constants are doubles?
Message-ID: <22654@lll-winken.LLNL.GOV>
Date: 28 Mar 89 18:15:39 GMT
References: <15894@princeton.Princeton.EDU> <8903280946.AA14743@marvin.moncam.uucp>
Sender: usenet@lll-winken.LLNL.GOV
Reply-To: brooks@maddog.llnl.gov (Eugene Brooks)
Distribution: gnu
Organization: Lawrence Livermore National Laboratory
Lines: 13