[Python-ideas] Python Numbers as Human Concept Decimal System
Chris Angelico
rosuav at gmail.com
Sun Mar 9 03:46:21 CET 2014
On Sun, Mar 9, 2014 at 12:58 PM, Mark H. Harris <harrismh777 at gmail.com> wrote:
> hi Steven, that's a straw man. Your argument presumes that False is a
> surprise. I am
> not in the least surprised. As, I am also not surprised by this:
>
>>>> dscale(32)
> 10100
>>>> d(1)/3
> Decimal('0.33333333333333333333333333333333') <=== not a surprise,
> expected
>>>> d(1)/3 + d(1)/3 +d(1)/3
> Decimal('0.99999999999999999999999999999999') <=== not a surprise either,
> quite expected
>>>>
I was trying to construct a proof from memory that would support this
case, but I got tangled, so I cheated and went to Wikipedia for
something similar.
Let's start with two variables, a and b, which we shall suppose are equal.
# Postulation? Or is this called an axiom? I don't remember.
a = b
# Wave hands vigorously and conclude that:
a = 0
Are you surprised? Probably. Normally, two variables being equal
doesn't prove the value of either. Without knowing what actual
handwaving went on in there, that is and should be a surprising
result. Now, here's the handwaving, spelled out in full:
# As above, start here
a = b
# Multiply both sides by a
aa = ba
# Subtract bb (aka b squared, ASCII-friendly) from both sides
aa - bb = ba - bb
# Factor (both sides separately)
(a + b) (a - b) = b (a - b)
# Cancel out the multiplication by (a - b)
a + b = b
# Subtract b from both sides
a = 0
And there you are. To be unsurprised by the result, you have to know
exactly what happened in between, and how it's different from the
conventional rules of mathematics. Someone who already understands all
that may well not be surprised, but someone who's expecting sane
real-number arithmetic is in for a shock.
ChrisA
More information about the Python-ideas
mailing list