Re: Forth PARANOIA



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



.



Relevant Pages

  • Re: Multiplication of Reals and Zero in programming languages
    ... currently most of them suck at least as badly as the languages themselves.) ... I am by no means a mathematician, but it seems to me that the correct ... type of those expressions really ought to be an integral type since, ... multiplied by zero should yield the result zero ...
    (sci.math)
  • Re: Basic Query from Oppenheim/ Schafer
    ... with the Kronecker delta. ... There really ought to be a concise way of expressing that -- perhaps once you accept that a dirac delta always implies integration, you can then accept that it also sometimes implies taking the limit of bobas well. ...
    (comp.dsp)
  • Re: Basic Query from Oppenheim/ Schafer
    ... with the Kronecker delta. ... engineer who is even more anal than me, ... (Similar to probability and Probability Distribution Functions.) ...
    (comp.dsp)
  • Re: Basic Query from Oppenheim/ Schafer
    ... with the Kronecker delta. ... engineer who is even more anal than me, ... Fourier series coefficients), it will find it's way into the ...
    (comp.dsp)
  • Re: A little lesson for sqrt(144) year olds.
    ... | "Androcles" wrote in message ... |> A mathematician replied "not integers, ... and by reducing the time to almost zero we ... t = x/c outbound. ...
    (sci.math)

Loading