🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: 0.3-0.2=0.999999999998?

#16312
From: Moxy
Date: Tue, 09 Mar 1999 00:00
14 lines
1138 bytes
Why does the computer round the figure down instead of up?

-=(CyBerco)=- 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!
>
> Greetings,
> Berco.
Technical Details
Message-ID: <36E544DB.AC81A9AC@istnett.com>
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: 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: Moxy <moxpearl@istnett.com>
Subject: Re: 0.3-0.2=0.999999999998?
Date: 1999/03/09
Message-ID: <36E544DB.AC81A9AC@istnett.com>
X-Deja-AN: 453033222
Content-Transfer-Encoding: 7bit
References: <7blg56$2pl$1@zonnetje.NL.net>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@swbell.net
X-Trace: typhoon01.swbell.net 920999556 207.193.222.199 (Tue, 09 Mar 1999 09:12:36 PDT)
Organization: SBC Internet Services
MIME-Version: 1.0
NNTP-Posting-Date: Tue, 09 Mar 1999 09:12:36 PDT
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.programmer