Re: Forth PARANOIA
- From: "Ed" <nospam@xxxxxxxxxxx>
- Date: Mon, 25 May 2009 14:09:07 +1000
BruceMcF wrote:
On May 24, 9:52 pm, "Ed" <nos...@xxxxxxxxxxx> wrote:
Marcel Hendrix wrote:
...
I also fixed a second bug ( 0^0 should be 1 ).
The ability to turn nothing into something is surely the province of
the Gods and delusional engineers. For mere mortals, the most we
could hope for is:
0 ^ anyvalue = 0
However even this is more convention than legal math (i.e. what to
do in an impossible situation without aborting).
Yes, but anyvalue ^ 0 = 1
Since
(anyvalue)^8 = (anyvalue)^(8+0) = (anyvalue^8)x(anyvalue^0)
so (anyvalue^0) must be a multiplicative identity, which for every
number other than exactly 0 can only be 1.
Another reason that 0^0 is taken to be 1 that is especially relevant
to floating point is that (0+delta)^0=1 for all delta, including delta
arbitrarily small. Therefore there is an infinite number of real
numbers all represented by fp 0.0 for which (0.0)^0 is, in fact,
exactly 1. Since from delta approaching zero from both the negative
and positive side, (0+delta)^0 is exactly 1, equating 0^0 to zero
introduces a needless discontinuity.
I'm not a mathematician so I leave it to the experts to prove or
disprove. If mathematics determines a computation to be illegal
then it is an error and 'discontinuous' no matter what.
In that case, I'd prefer a 0 result which can signal 'error' and is
testable, rather than a 1 which could result from a valid computation.
As regards zero and its powers, here's a reference:
http://mathforum.org/library/drmath/view/55764.html
.
- Follow-Ups:
- Re: Forth PARANOIA
- From: Andrew Haley
- Re: Forth PARANOIA
- From: BruceMcF
- Re: Forth PARANOIA
- References:
- Re: Forth PARANOIA
- From: Krishna Myneni
- Re: Forth PARANOIA
- From: Marcel Hendrix
- Re: Forth PARANOIA
- From: Ed
- Re: Forth PARANOIA
- From: BruceMcF
- Re: Forth PARANOIA
- Prev by Date: Re: Forth PARANOIA
- Next by Date: Re: Forth PARANOIA
- Previous by thread: Re: Forth PARANOIA
- Next by thread: Re: Forth PARANOIA
- Index(es):
Relevant Pages
|
Loading