Re: Python compilers?

From: Harry George (harry.g.george_at_boeing.com)
Date: 05/19/04


Date: Wed, 19 May 2004 14:17:17 GMT

Svein Ove Aas <svein+usenet01@brage.info> writes:

> Mitja wrote:
>
> > Thorsten Kampe <thorsten@thorstenkampe.de>
> > (news:1mklty031ke5a.dlg@thorstenkampe.de) wrote:
> >> * Tor Iver Wilhelmsen (2004-05-18 17:26 +0100)
> >>> Grant Edwards <grante@visi.com> writes:
> >>>
> >>>> Dude, didn't you take high-school math? 1/3 _is_ 0.33333...
> >>>
> >>> No, because at some point you will stop writing 3's, either out of
> >>> boredom, exhaustion or because you need to pee. At that instant, you
> >>> introduce a rounding error, making 3 * 1/3 = 0.99999999999... instead
> >>> of 1.0
> >>
> >> Must have been a long time since you went to school... 1/3 is
> >> /exactly/ 0.3...: http://mathworld.wolfram.com/RepeatingDecimal.html
> >>
> >
> > Even worse....
> > 0.999999999999999999999... is exactly 1 :)
>
> Only for infinite counts of '9', and computers don't do infinity.

We need to stop randomly mixing exact math with computer
implementations (and approximations) thereof.

"<digit><digit>..." is the accepted ASCII rendition of the repeating
overbar, and thus explicitly means "on to infinity". 0.99... exactly
equals 1.

If you want to shift the discussion to computer implementations then
that is a different story. We can talk binary representations of
decimal fractions, and the value of rationals as a useful
representation.

But why not also complain that Python does not have a complete
representation of pi. After all, the value of pi is known to well
beyond the IEEE 80-bit or 64-bit or whatever that an implementation
provides. Even if we did mp math and did really long pi
representations, they would of course not be exact. "e" isn't handled
completely either. Why not complain about those?

We don't complain because the available values are "good enough".
IEEE 764 64-bit reals (internally handled as IEEE 764 80-bit) are
good-enough for most numerical needs. I'll admit, the US debt needs
some extended precision :-( but most numerical analysis gets by with
epsilons under 1e-14.

Hey, while we are on the subject of exact representation, what's with
multithreading? My computer has only one CPU. What's going on
here???? It's a lie, a LIE I tell you...

-- 
harry.g.george@boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 342-0007


Relevant Pages

  • Re: The spinoza papers: design of the extra-precision number object 2
    ... doesnt terminate, which cause practical problems, e.g in representation ... that we have an exact number. ... Limiting the precision doesn't change this claim. ... including quantum uncertainty represented as ...
    (comp.programming)
  • Re: Why cant I xor strings?
    ... a representation that does have parts and order etc. ... It's a matter of interpretation. ... I said they do represent _exact_ values, ... >who operates with "floats represent a value and have an error range around ...
    (comp.lang.python)
  • Re: Converting from Microsoft Binary Format floats to Python Float
    ... >floating point numbers, In a previous thread, Bengt Richter posted ... >that for one of the examples, the conversion isn't exact. ... not seeing a full representation of the two values. ...
    (comp.lang.python)
  • Re: ifstream bug in VS2005 Beta2 & Platform SDK
    ... So 3/25 and 7/40 are exact. ... Just about all languages use IEEE as the representation. ... What you have is a binary approximation, ... But converting the other way is inexact. ...
    (microsoft.public.vc.stl)
  • Re: Real value of c = 299733463.58589089 ?
    ... The value of pi in base pi is 10 and the exact value of the base is pi, ... Pedant point: ... is not a normalized representation (much like one would ... If you know you are an idiot, and we know you are an idiot, and each ...
    (sci.physics)