🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: 0.3-0.2=0.999999999998?

#16240
From: Tudor Holton
Date: Thu, 11 Mar 1999 00:00
37 lines
2497 bytes
May I ask how my suggestion is based on base 10?

All I'm suggesting is that there should be an option to use the DX:AX
combination to imply a 'decimal point' (or base 2 point) and represent a
fixed value, rather than just dividing 1 by AX to get the fraction.

Please correct me if this is wrong, I have not 'officially' been taught
the low-down on floating point numbers, I've merely picked up what I
could to get me by.

Tudor

Roedy Green wrote:

> On Thu, 04 Mar 1999 23:57:30 +1100, Tudor Holton
> <tudor@alphalink.com.au> wrote:
>
> >I've never understood why we can't just represent numbers after the
> >decimal place as the size in reverse.  e.g. 16.16 would be A:3D  (or
> >16:61 in decimal)
>
> Mike Cowlishaw (The inventor of Rexx and NetRexx) would agree with
> you.  He has been lobbying for floating point hardware to be
> redesigned to work in base 10 rather than base 2 to avoid these
> anomalies.  People are used to .3333... + .66666 = .9999 but they
> don't expect 0.1 to behave the same way.
>
> I disagree.  Binary arithmetic is faster and simpler.  The repeaters
> just move to different places.  You can't get rid of them.  If you
> want absolute precision, use scaled integer arithmetic which is many
> times faster that floating point (e.g. integer pennies for currency,
> with a decorative decimal point inserted for display).
>
> For the JAVA GLOSSARY and the CMP Utilities: <http://mindprod.com>
> --
> Roedy Green,  Canadian Mind Products
> -30-
Technical Details
Message-ID: <36E786F7.19B382B0@alphalink.com.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7blg56$2pl$1@zonnetje.NL.net> <36DE833A.DFA9E627@alphalink.com.au> <36e3c58e.73834728@news.bctel.ca>

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: f74b3,3b89176b465afef
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10a146,3b89176b465afef
X-Google-Attributes: gid10a146,public
From: Tudor Holton <tudor@alphalink.com.au>
Subject: Re: 0.3-0.2=0.999999999998?
Date: 1999/03/11
Message-ID: <36E786F7.19B382B0@alphalink.com.au>
X-Deja-AN: 453716902
Content-Transfer-Encoding: 7bit
References: <7blg56$2pl$1@zonnetje.NL.net> <36DE833A.DFA9E627@alphalink.com.au> <36e3c58e.73834728@news.bctel.ca>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@news.alphalink.com.au
X-Trace: news.alphalink.com.au 921179335 10955 202.161.96.117 (11 Mar 1999 19:08:55 GMT)
Organization: Alphalink
Mime-Version: 1.0
NNTP-Posting-Date: 11 Mar 1999 19:08:55 GMT
Newsgroups: borland.public.jbuilder.java.language,comp.lang.java,comp.lang.java.programmer