🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #16376

Re: 0.3-0.2=0.999999999998?

#16376
From: Mr. Tines
Date: Thu, 04 Mar 1999 00:00
27 lines
1779 bytes
###

On Thu, 4 Mar 1999 09:27:39 +0100, in <7blg56$2pl$1@zonnetje.NL.net>
          "-=(CyBerco)=-" <Berco.Beute@EverMind.com> wrote.....

> 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!

Do yourself a favour and look out and read this article.

"What every Computer Scientist should know about Floating-Point Arithmetic"
ACM Computing Surveys, Vol 23 No. 1 March 1991

-- PGPfingerprint: BC01 5527 B493 7C9B  3C54 D1B7 248C 08BC --
 _______ {pegwit v8 public key =581cbf05be9899262ab4bb6a08470}
/_  __(_)__  ___ ___     {69c10bcfbca894a5bf8d208d001b829d4d0}
 / / / / _ \/ -_|_-<      www.geocities.com/SiliconValley/1394
/_/ /_/_//_/\__/___/@windsong.demon.co.uk      PGP key on page

### end pegwit v8 signed text
90e971179ef367c1a3bd773677bdcce274a15389e8fe093105e797cd1577
37ebdf51172ac9c8ad83046d4f1989e19427e96b24242603c14575e4687b
Technical Details
Message-ID: <03041999192939umw@windsong.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7blg56$2pl$1@zonnetje.NL.net>

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: Mr. Tines <tines@windsong.demon.co.uk>
Subject: Re: 0.3-0.2=0.999999999998?
Date: 1999/03/04
Message-ID: <03041999192939umw@windsong.demon.co.uk>
X-Deja-AN: 451289105
X-Mail2News-Path: news.demon.net!finch-post-10.mail.demon.net![158.152.107.88]
References: <7blg56$2pl$1@zonnetje.NL.net>
X-Trace: mail2news.demon.co.uk 920581248 mail2news:26049 mail2news mail2news.demon.co.uk
Organization: Ravna&Tines
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.programmer
X-Complaints-To: abuse@demon.net