Re: Excel is faulty
- From: David C. Ullrich <dullrich@xxxxxxxxxxx>
- Date: Sun, 04 Jan 2009 14:06:57 -0600
On Sun, 4 Jan 2009 10:16:58 -0800 (PST), Mensanator
<mensanator@xxxxxxx> wrote:
On Jan 4, 11:00?am, David C. Ullrich <dullr...@xxxxxxxxxxx> wrote:
On Sun, 4 Jan 2009 08:42:25 -0800 (PST), Mensanator
<mensana...@xxxxxxx> wrote:
On Jan 4, 5:51?am, David C. Ullrich <dullr...@xxxxxxxxxxx> wrote:
On Sat, 3 Jan 2009 19:16:05 -0800 (PST), Mensanator
<mensana...@xxxxxxx> wrote:
On Jan 3, 7:22?pm, Ronald Bruck <br...@xxxxxxxxxxxx> wrote:
In article <q0qvl4hutkr77r9832mtssj5vo7896n...@xxxxxxx>, David C.
Ullrich <dullr...@xxxxxxxxxxx> wrote:
On Sat, 03 Jan 2009 11:58:09 -0800, Ronald Bruck <br...@xxxxxxxxxxxx>
wrote:
In article <bqpul4d1po3h36nia4r1rea28eacm1b...@xxxxxxx>, David C.
Ullrich <dullr...@xxxxxxxxxxx> wrote:
...
...The problem is not with Excel - floating-point numbers
are simply not exact.
Of course, what you say is true.
But when I saw the thread, I guessed it was referring to Excel's
well-known eccentricity,
? ?-1^2 = 1
How would that lead to a 15-place value for pi that's
only correct in the first ten places?
...
Nothing. ?I was just remarking that Excel DOES make errors (at least,
**I** consider it so non-standard as to be an error),
It's NOT an error if it does what it was defined to do.
"defined", hmm. Is this behavior specified in the docs?
Whether or not it's documented, it would be implied
by the algorithms, wouldn't it?
That's an interesting point of view.
So is non-Euclidean geometry.
Do you consider that an error?
Non-Euclidean geometry doesn't imply that every
algorthm is correct.
1. Any behavior is ok as long it's "defined" to work that way.
2. The way the thing actually works counts as a "definition".
I have no idea how many decimals of pi are known.
Say it's N. Here's my algorithm to print the first N+1
digits of pi:
def PrintFirstNPlusOneDigitsOfPi():
? print 'rutabaga'
What I mean by "print the first N+1 digits of pi"
should be implicit.
And the result of which is inconsistent.
Huh? How is the result "inconsistent"?
Here's a better Excel example.
A1:=-1^2 evaluates to 1
A3:=-1 B3:=A3^2 evaluates to 1
Compare to Python:
-1print -1**2
1i = -1
print i**2
Why is the result of a literal inconsistent with that
of a variable?
Huh? There's a variable with the value -1 here,
and there's no literal -1 in sight.
It's due to precedence rules involving
the evaluation of a literal. If the programmer actually
wanted -1 squared, he should have enclosed it in
parentheses.
1print (-1)**2
And one could always do
A1:=-(1^2)
in Excel to get -1 if that's what's intended. Using
parentheses in Excel to force correct precedence is
no different than using them in Python.
And I'll bet that doing things the "right" way creates
more bugs in Python programs than the "wrong" way does
in Excel. And the reason is because Excel is consistent
without parentheses and Python is not,
Your notion of consistency is very confused. There's
nothing the least bit "inconsistent" about what
Python's doing here.
even though
it's the "right" way.
David C. Ullrich
"Understanding Godel isn't about following his formal proof.
That would make a mockery of everything Godel was up to."
(John Jones, "My talk about Godel to the post-grads."
in sci.logic.)
.
- Follow-Ups:
- Re: Excel is faulty
- From: Mensanator
- Re: Excel is faulty
- References:
- Re: Excel is faulty
- From: David C . Ullrich
- Re: Excel is faulty
- From: Ronald Bruck
- Re: Excel is faulty
- From: David C . Ullrich
- Re: Excel is faulty
- From: Ronald Bruck
- Re: Excel is faulty
- From: Mensanator
- Re: Excel is faulty
- From: David C . Ullrich
- Re: Excel is faulty
- From: Mensanator
- Re: Excel is faulty
- From: David C . Ullrich
- Re: Excel is faulty
- From: Mensanator
- Re: Excel is faulty
- Prev by Date: Re: Excel is faulty
- Next by Date: Re: Excel is faulty
- Previous by thread: Re: Excel is faulty
- Next by thread: Re: Excel is faulty
- Index(es):
Relevant Pages
|