ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/10/04:02:11.1

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: tagas96 AT hotmail DOT com (Taras)
Newsgroups: comp.os.msdos.djgpp,comp.lang.c++
Subject: Weird double problem?!
Date: 10 Apr 2002 00:38:03 -0700
Organization: http://groups.google.com/
Lines: 23
Message-ID: <142c67c0.0204092338.1ce7acb3@posting.google.com>
X-Trace: posting.google.com 1018424283 13975 (10 Apr 2002 07:38:03 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 10 Apr 2002 07:38:03 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi everyone,

Just doing some basic programming for maths, and something really
weird happened.  I'm using RHIDE 1.4.9 w/ djgpp 2.03.  I have this
line in my

  const double stepSize;
  stepSize = 0.1;

when i step through the program and watch the variable step size, when
is assigned the value of 0.1, in the watch window it says the value is
0.10000000000000001.  I don't think it has something to do with the 
displaying of the number, because when I store the result of
into an integer variable, the value of that variable is 9 (when it
should be
10) Does anyone know where the last digit came from?



- Raw text -

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