Message-ID: <394042AA.4ED5973@home.com> From: Robin Johnson Organization: Orbit Computers X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en,af,es MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Rounding doubles to ints References: <39363d0a$0$8416$7f31c96c AT news01 DOT syd DOT optusnet DOT com DOT au> <39367A02 DOT 7EA47FC5 AT home DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 Date: Fri, 09 Jun 2000 01:04:08 GMT NNTP-Posting-Host: 24.113.36.103 X-Complaints-To: abuse AT home DOT net X-Trace: news1.rdc1.bc.home.com 960512648 24.113.36.103 (Thu, 08 Jun 2000 18:04:08 PDT) NNTP-Posting-Date: Thu, 08 Jun 2000 18:04:08 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com not neccesarily, say for example you have 4.0, which, rounded off, will still be 4.0 if you add .5 it will become 5.0 instead of 4.0 Olaf van der Spek wrote: > > "Robin Johnson" schreef in bericht > news:39367A02 DOT 7EA47FC5 AT home DOT com... > > To make it round up, add .4 to your number right before you round > > and to round down, subtract .4 > > Shouldn't that be + 0.5? -- Robin Hugh Johnson "Robbat2" QTOD: "I used to be an idealist, but I got mugged by reality." E-Mail : robbat2 AT orbis-terrarum DOT net ICQ# : 30269588 or 41961639 Home Page : http://www.orbis-terrarum.net Time Zone : Pacific Daylight (GMT - 8)