www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/04/22:17:43

Newsgroups: comp.os.msdos.djgpp
From: abostick AT netcom DOT com (Alan Bostick)
Subject: Re: floats v doubles myth
Message-ID: <abostickE53xJL.80E@netcom.com>
Organization: Arrogant Opinions 'R' Us
References: <32f2a072 DOT 17736424 AT news DOT ionsys DOT com> <32f3a643 DOT 25054189 AT news DOT ox DOT ac DOT uk> <Jyj5XLAaMk9yEwb1 AT foobar DOT co DOT uk>
Date: Wed, 5 Feb 1997 01:59:45 GMT
Lines: 21
Sender: abostick AT netcom12 DOT netcom DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Paul Shirley <Paul AT foobar DOT co DOT uk DOT chocolat> writes:

>On Intel processors only use doubles if you need the precision.

Or if you need the greater range in the exponent.  Or if you don't want 
to get tripped up by errors that accumulate when the data is constantly 
being changed back and forth between float and double as you use math 
functions. Or if you don't like being taken by surprise by unexpected
behavior because you forgot that the compiler presumes that non-integral
constants are doubles unless you tell it otherwise.  Or . . .

Intel Schmintel.  Because of how C and C++ and their standard libraries
have evolved, a programmer should by default use doubles rather than
floats unless both she knows what she's doing and she has a compelling
reason to do so.

-- 
Alan Bostick               | My conclusion is that this is most likely an 
                           | exceptionally well executed fake. It remains the
mailto:abostick AT netcom DOT com | most authentic alien image that I have ever seen.
news:alt.grelb             |      Whitley Strieber
http://www.alumni.caltech.edu/~abostick

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019