delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
From: | "Alan Didey" <a_didey AT hotmail DOT com> |
Newsgroups: | comp.os.msdos.djgpp,comp.lang.c++ |
Subject: | Re: Weird double problem?! |
Date: | Wed, 10 Apr 2002 14:47:42 +0100 |
Lines: | 14 |
Message-ID: | <a91uk3$u6n$1@newsg4.svr.pol.co.uk> |
References: | <142c67c0 DOT 0204092338 DOT 1ce7acb3 AT posting DOT google DOT com> <15Ss8.263184$q2 DOT 31204 AT sccrnsc01> <m37j7eqwv6 DOT fsf AT 12-234-128-39 DOT client DOT attbi DOT com> |
NNTP-Posting-Host: | modem-212.change-management-shark.dialup.pol.co.uk |
X-Trace: | newsg4.svr.pol.co.uk 1018461635 30935 62.137.10.212 (10 Apr 2002 18:00:35 GMT) |
NNTP-Posting-Date: | 10 Apr 2002 18:00:35 GMT |
X-Complaints-To: | abuse AT theplanet DOT net |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Micah Cowan" <micah AT cowan DOT name> wrote in message news:m37j7eqwv6 DOT fsf AT 12-234-128-39 DOT client DOT attbi DOT com... [snipped discussion about the woes of floating point and the differences between base-10 and base-2] > If you *need* exactly exact numbers, then store them as a pair of > integers. After all, both 1/10 and 1/3 are exactly representable in > the form in which you find them written in this sentence ;) You can use the boost::rational template class to provide operators and so forth for them to save doing all the work yourself.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |