🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1342

Re: Questions about NCEG

#1342
From: Andrew P. Mullhaupt
Date: Thu, 31 May 1990 03:10
21 lines
1542 bytes
In article <1990May29.193451.6533@twinsun.com>, eggert@twinsun.com (Paul Eggert) writes:
> There are ways to say the IEEE numbers in ANSI C + IEEE 754:
> 	#define infinity (1e300*1e300)
> This lets you say some things portably that you can't say with hex contants,

Will this work if the compiler supports IEEE extended format for 
constants? Or would this preclude ANSI C compliance? The constant
1e600 is not out of extended range. You might replace 1e300 in your
example by a larger number, but then what about the compilers which
_don't_ use extended? Both behaviors are permitted by IEEE arithmetic.

A conditional compilation solution is possible only if you can 
ensure that the appropriate symbol will be defined. Once you've
been reduced to that, you should use the hex constant method, on the
grounds that even on the same hardware, different compilers, or even
different preprocessors for the same compiler may handle the constant
arithmetic differently, but the floating point representation is 
less likely to change.

Later,
Andrew Mullhaupt
Technical Details
Message-ID: <1008@s6.Morgan.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!mstan!amull
References: <15519@bfmny0.UU.NET> <73.UUL1.3#5109@pantor.UUCP> <1990May29.193451.6533@twinsun.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!uunet!mstan!amull
From: amull@Morgan.COM (Andrew P. Mullhaupt)
Newsgroups: comp.std.c
Subject: Re: Questions about NCEG
Summary: Really?
Message-ID: <1008@s6.Morgan.COM>
Date: 31 May 90 03:10:15 GMT
References: <15519@bfmny0.UU.NET> <73.UUL1.3#5109@pantor.UUCP> <1990May29.193451.6533@twinsun.com>
Organization: Morgan Stanley & Co. NY, NY
Lines: 21