Please rid me of this goto

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 23 20:22:11 PDT 2016


On 24.06.2016 04:36, Smoke Adams wrote:
> ....
>
> You do realize that e^(-1/t)^t is a counter example?
>
> e^(-1/t) -> 0 as t -> 0
> t -> 0 as t -> 0
> ....

That's not a counterexample to anything I said. ^ is discontinuous at 
(0,0) and indeed, you can force the limit to an arbitrary value by 
choosing the two expressions the right way. That's clear.

> but e^(-1/t)^t does not -> 1 as t-> 0, which is obvious since it/s 1/e.
>
> So, We can define 0^0 = 1 and maybe that is better than 2, but it is
> arbitrary in the sense that it's a definition. It may bear fruit but it
> is not necessarily meaningful.
> ...

It's meaningful in those cases where you want to use 0^0, and otherwise 
just don't use it.

> Suppose a person is running some numerical simulation that happens to be
> computing an a value for an equation that is essentially based on the
> above.

Then the numerical simulation is inherently broken. a^b takes on any 
arbitrary non-negative value in an arbitrary small region around (0,0) 
and is undefined at many points in such a region. (BTW: It would be fine 
with me if 0.0^^0.0 was NaN -- that's a completely different case than 
the one at hand: pow on integers.)

>
> ... break the laws of physics by
> arbitrarily defining something to be true when it is not.
> ...

Utter nonsense. (Also note that the 'laws of physics' typically give 
rise to piecewise analytic functions, and if you only consider analytic 
functions, 0 ^ 0 = 1 is actually the right answer.)


More information about the Digitalmars-d mailing list