Article View: borland.public.jbuilder.java.language
Article #16370Re: 0.3-0.2=0.999999999998?
From: Harry Rowe
Date: Thu, 04 Mar 1999 00:00
Date: Thu, 04 Mar 1999 00:00
20 lines
1240 bytes
1240 bytes
-=(CyBerco)=- wrote in message <7blg56$2pl$1@zonnetje.NL.net>...
>Hi,
>
>Try the following:
>
>System.out.println("What is 0.3-0.2 ? : " + (0.3-0.2));
>
>How come? I sure didn't expect this outcome!
>
>Greetings,
>Berco.
>
Another reason is Java is not fully IEEE 754 compliant.
It and Microsoft compilers are quite broken when it comes
to numerical analysis.
Regards,
Harry
Technical Details
Message-ID:
<7blrko$b87$1@news.erinet.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7blg56$2pl$1@zonnetje.NL.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3b89176b465afef X-Google-Attributes: gidf74b3,public X-Google-Thread: f5d71,3b89176b465afef X-Google-Attributes: gidf5d71,public X-Google-Thread: 10a146,3b89176b465afef X-Google-Attributes: gid10a146,public From: "Harry Rowe" <hrowe@erinet.com> Subject: Re: 0.3-0.2=0.999999999998? Date: 1999/03/04 Message-ID: <7blrko$b87$1@news.erinet.com> X-Deja-AN: 451121221 References: <7blg56$2pl$1@zonnetje.NL.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 X-Complaints-To: usenet@news.erinet.com X-Trace: news.erinet.com 920547800 11527 207.90.117.88 (4 Mar 1999 11:43:20 GMT) Organization: Erinet Online Communications NNTP-Posting-Date: 4 Mar 1999 11:43:20 GMT Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.programmer