Article View: borland.public.jbuilder.java.language
Article #16292Re: 0.3-0.2=0.999999999998?
From: Roedy Green
Date: Fri, 05 Mar 1999 00:00
Date: Fri, 05 Mar 1999 00:00
23 lines
1845 bytes
1845 bytes
On Fri, 5 Mar 1999 10:37:51 -0500, "Harry Rowe" <hrowe@erinet.com> wrote: >However, I was thinking that if Java allowed >the 10 byte double extended, gave the >programmer access to different IEEE >rounding modes, and did some sub-expression >handling differently, then perhaps the program >below would evaluate to true? You would have to ask someone more familiar with the details. My experience is I wrote ORGASM years ago, a postfix assembler for the 8087 floating point chip. If I recall correctly, all that would happen with the guard mode bits is you would compute your 0.1 a few more places, but the binary compare would still come up unequal. Floating point equality is for all practical purposes a meaningless operation. For the JAVA GLOSSARY and the CMP Utilities: <http://mindprod.com> -- Roedy Green, Canadian Mind Products -30-
Technical Details
Message-ID:
<36e50393.155247814@news.bctel.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7blg56$2pl$1@zonnetje.NL.net> <7blrko$b87$1@news.erinet.com> <36e2c538.73748634@news.bctel.ca> <7botpj$geu$1@news.erinet.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5d71,3b89176b465afef X-Google-Attributes: gidf5d71,public X-Google-Thread: 10a146,3b89176b465afef X-Google-Attributes: gid10a146,public X-Google-Thread: f74b3,3b89176b465afef X-Google-Attributes: gidf74b3,public From: roedy@mindprod.com (Roedy Green) Subject: Re: 0.3-0.2=0.999999999998? Date: 1999/03/05 Message-ID: <36e50393.155247814@news.bctel.ca> X-Deja-AN: 451619611 Content-Transfer-Encoding: 7bit References: <7blg56$2pl$1@zonnetje.NL.net> <7blrko$b87$1@news.erinet.com> <36e2c538.73748634@news.bctel.ca> <7botpj$geu$1@news.erinet.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bctel.net X-Trace: news.bctel.net 920654386 209.53.13.103 (Fri, 05 Mar 1999 09:19:46 PDT) Organization: Canadian Mind Products MIME-Version: 1.0 NNTP-Posting-Date: Fri, 05 Mar 1999 09:19:46 PDT Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.programmer