[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

610.0. "0^0 = ?" by KIRK::MCMENEMY (Michael G. McMenemy) Wed Nov 12 1986 04:39

    
In the last year or so I saw a dicussion in net.math about the correct
value for 0^0  (0**0).

The person who wrote the article was flaming at people who used the value of
1 as being the correct answer, instead of undefined or indeterminate.
    
I couldn't remember which answer was correct, so I tried to check some
utilties on the vax that would allow me to calculate 0^0. The following
are my results:

	VAX-BASIC	0^0		1
	DECALC		0^0		Undefined
	FORTRAN		0^0		call to OTS$ routine returned
						%MTH-F-UNDEXP error
	DEBUG		0^0		DEBUG-W-UNDEXPN error
	MAPLE (toolshed tool) 0^0	Undefined
	TI BASIC	0^0		1

From these comparisons, I thought that maybe BASIC implemenatations returned
the value 1 for some reason unknown to me. I then thought that although
0^0 is undefined maybe it's limit was 1.

The following is my proof that limit x^0 = 1 as x approaches 0.
---------------------------------------------------------------

let y = lim  x^0			! assignment
	x->0					

  ln y = ln [ lim x^0 ]			! take ln of both sides
		x->0

  ln y = lim [ ln x^0 ]			! move limit through function
	x->0

  ln y = lim [ 0 * ln x ]		! algebrea with exponents
	x->0				!                  
					!  r*ln(a) = ln(a)^r
			
As x goes to 0 , ln x goes to infinity, and 0 * infinity = 0

  ln y = 0

   ln(y)    0
  e	 = e 				! exponentiate each side

  y  =  1

lim x^0  =  1				! substitution
   x->0

---------------------------------------------------------------

Can someone tell me whether or not this proof is valid (correct) ?


			Thanks,
				Mike
T.RTitleUserPersonal
Name
DateLines
610.1BEING::POSTPISCHILAlways mount a scratch monkey.Wed Nov 12 1986 13:0146
    Re .0:
    
    > I then thought that although 0^0 is undefined maybe it's limit was 1. 
    
    There is no mathematical meaning to the statement "The limit of 0^0 is
    1.".
    
    Rather, you must say something like "The limit of x^0 is 1 (at 0)." or
    "The limit of 0^x is 0 (at 0, from above).".  Both of these are easy to
    prove, but neither is to be preferred for absolute reasons. 
    
    To some extent, functions exist naturally.  For example, when defining
    multiplication, it would be silly for us to use 2*2=4, 2*4=8, but
    2*3=7.  There IS such a function, but it is not terribly useful.  But
    this seeming correctness about defining multiplication does not extend
    to all points of all functions.  When defining functions, we should
    remember that WE are DEFINING them, not discovering them.  They are
    ours to do with as we wish.
    
    In the case of 0^0, it is probably best to leave it undefined.  Since
    it can be approached by limits in different ways, it can also be
    computed "accidentally" in different ways, with different expected
    results.  In this case, it is best to leave it undefined as a warning
    to those who come across it accidentally that they may have done
    something wrong.
    
    There are two problems with your proof, although the result is correct.
    First, there are problems with assigning y = lim (x->0) x^0 until you
    know something about the limit, like whether or not it exists.  Second,
    you cannot move the natural logarithm from outside the limit to inside
    unless it is continuous over the necessary region -- something you
    cannot know until you know more about the limit. 
    
    A better way to approach the limit is through the standard
    delta-epsilon definition.  Consider any epsilon greater than zero.  I
    will now show there is a delta such that, for any x <> 0 within
    (-delta, delta), |x^0 - 1| < epsilon.  Let delta = .5.  Clearly, for
    all x in (-.5, .5) other than 0, x^0 = 1.  Therefore, x^0 - 1 = 0, so
    |0| = 0, and 0 < epsilon.  Since this is the very definition of limit,
    the limit as x goes to zero of x^0 is 1.
    
    However, a similar proof would show that the limit as x approaches zero
    from above of 0^x is 0, since 0^x is 0 for positive x.
    
    
    				-- edp
610.2ENGINE::ROTHWed Nov 12 1986 13:559
    There was a kid in my 9'th grade math class that insisted that 0/0
    was well defined, out of context, and I don't think he was ever
    convinced otherwise by any arguments that were advanced to the contrary.

    I think he was like one of those trisectors, or circle squarers...

    At any rate, .-1 sums the situation up very well.

    - Jim
610.3TLE::BRETTWed Nov 12 1986 17:058
    Well now, EDP, you have hit the centre of a very big debate
    
    is mathematics INVENTED?, or DISCOVERED?
    
    I suspect the right answer is that axioms are invented, but the
    theorems are discovered.
    
    /Bevin
610.4Forcing to be continuous might be reasonableEAGLE1::BESTR D Best, Systems architecture, I/OFri Nov 14 1986 20:3511
  Incidentally, has someone reported to the RTL people that VAX BASIC
evaluates 0^0 as 1 ?  I suspect that this might be undesirable behavior
in an application program.  I think I'd rather see an error message
or get 0 as a result.

  Might an argument for the value of 0^0 be advanced on the basis of ensuring
the continuity of the function of two variables z=x^y ?  Such a
value would then ensure that some specified infinite series expansion
produce the right value if the series is terminated after certain number of
terms.  This is not to say that there is one right value, but that as
a practical computational matter a certain value should be chosen.
610.5No, no, no...MODEL::YARBROUGHMon Nov 17 1986 11:2718
> ... as a practical computational matter a certain value should be chosen.

I strongly disagree. The function X^Y is discontinuous at (0,0), and the
only reasonable treatment is to return an error condition for those 
arguments. If the RTL does something different it should be SPR'd.

The fact that there is confusion in this note about the 'value' of 0^0 is 
merely symptomatic of the confusion that exists among our customers. We 
have a moral obligation not to add to their confusion, nor to assign a 
value where such an assignment may lead to misinterpretation of the results 
of a calculation.

It hasn't happened yet, but I foresee the day when software suppliers will 
be held liable for errors in the results of mathematical function routines, 
as well as other 'standard' software. The business is getting too complex 
for customers to be able to deal with all such issues themselves; they MUST 
be able to trust their suppliers. For us to breach that trust at this stage 
of the game is unprofessional, at least.
610.6CLT::GILBERTeager like a childMon Nov 17 1986 15:163
I *have* seen 0^0 defined in some math articles to simplify the exposition.
It's a bad idea for a programming language to define it as anything other
than an exception.
610.7Could some standard define a value for 0**0?NOBUGS::AMARTINAlan H. MartinMon Nov 17 1986 15:239
Does anyone know of any programming language standards (or math function
standards) which define a non-exceptional value for 0**0?  I don't recall
any, but they exist, it would explain some of the gullible implementations
listed earlier.

I would assume that if a programming language defined a value for 0**0,
it is more likely a sign of an unsophisticated implementation model or
careless defining group than a deliberate act.
				/AHM/THX
610.8JON::MORONEYWelcome to the MachineMon Nov 17 1986 17:5310
re .7:  If 0^0 isn't considered "undefined", it should be defined as 1, since
several functions approach 1 asymptocially as the function approaches 0^0.

For example, x^0=1 by definition, and  lim  x^x=1 as well.
                                      x->0+

re .4:  No, 0^0 should NOT be 0, it should be either considered 1 or
"undefined". 0^0=0 is mathematically wrong, period.

-Mike
610.9Anything works.CHOVAX::YOUNGBack from the Shadows Again,Mon Nov 17 1986 19:3810
    Re .8:
    
    	As I recall functions approaching 0^0 can be made to approach
    ANY real value as their limit.  Things like this happen a lot around
    discontinuities.  Thats one reason why they are undefined.
    
    	Therefore, there are functions that approach 0 as they come
    closer to 0^0.
    
    -- Barry
610.10CLT::GILBERTeager like a childTue Nov 18 1986 00:4916
610.11if not undefined, then 1 (:-))TLE::KNOWLESKeith Knowles, VAX Code GeneratorWed Apr 08 1987 01:544
    .0 made the statement that 0 * infinity = 0.  Is this correct??
    I thought this result would be undefined.
    
    -- Keith
610.12CLT::GILBERTeager like a childWed Apr 08 1987 03:359
    Zero times anything is zero.  However, in that step of the proof,
    I'd have done...

  ln y = lim [ 0 * ln x ] = lim [ 0 ] = 0
	x->0               x->0

    ... since for any x > 0, [ 0 * ln x ] is well-defined, and zero.
    That is, the multiplication by zero should probably have been done
    before taking the limit of ln x.
610.13Well, *-ing any number by infinity gives infinityTLE::KNOWLESKeith Knowles, VAX Code GeneratorFri Apr 10 1987 21:3714
    CDC 6600 class machines used to multiply 0.0 by <infinite> and return
    <undefined>.  This doesn't prove anything, but since this behaviour
    isn't obvious, they must have had some kind of reason for doing
    it.  My memory is very hazy on this -- someone correct me if I'm
    making this up but if you multiplied <non-zero> by <infinite>, you
    got <infinite>.  I seem to recall that the specific combination
    of zero and infinity gave you the special result case <undefined>.
    That seems fairly intentional.
    
    Neither does this prove anything, but this result makes sense to
    me too.  Multiplication just isn't well-defined with special numbers
    like infinity.
    
    -- Keith
610.14CLT::GILBERTeager like a childFri Apr 10 1987 22:096
>   CDC 6600 class machines used to multiply 0.0 by <infinite> and return
>   <undefined>.

    Makes sense.  How's the hardware supposed to know whether you really
    meant Zero, or you had some underflow or cancellation or whatnot so
    that the 0.0 is *supposed* to represent some miniscule non-zero number?
610.15TLE::KNOWLESKeith Knowles, VAX Code GeneratorFri Apr 10 1987 22:301
    I'm going to check my imagination against the assembler manual tonight.
610.16I know CDC machines, too.JON::MORONEYLight the fuse and RUN!Sat Apr 11 1987 00:2527
Here's a "multiplication table" for the CDC machines like the 730 (based
on the 6400, like the 6600 was):


  X | -R    -I    -#    -0    +0    +#    +I    +R
----------------------------------------------------
 -R | +R    +I    +R    +I    -I    -R    -I    -R
 -I | +I    +I    +I    +I    -I    -I    -I    -I
 -# | +R    +I    +#    +0    +0    -#    -I    -R
 -0 | +I    +I    +0    -0    +0    +0    -I    -I
 +0 | -I    -I    +0    +0    +0    +0    +I    +I
 +# | -R    -I    -#    +0    +0    +#    +I    +R
 +I | -I    -I    -I    -I    +I    +I    +I    +I
 +R | -R    -I    -R    -I    +I    +R    +I    +R

Key:  R means infinity "range".  I means indefinite.  # is "ordinary" numbers.
0 is 0, of course.  All numbers can be signed (including 0, since this is a
ones complement machine.   I may be wrong on the behavior of -0* -0, I believe
the only way to produce -0 is -0* -0.  This is from memory.

The machine has no floating underflow, if you multiply 2 numbers small enough,
you get +0.  This isn't usually a problem since the exponents range from
about 10** -310 to 10**322 or so.  The machine uses a 60 bit word, with a 48
bit mantissa (47 bits of precision since the MSB is always 1, unlike VAX which
drops that bit), 1 sign bit, 1 exponent sign, and 10 bits of exponent.

-Mike
610.17TLE::BRETTMon Apr 13 1987 13:1113
    Since 0 really meant "very small", and infinity meant "very large"
    the result is undefined since the machine can't tell whether the
    very small was very much smaller than the very large was very large,
    if you get my drift.
    
    For example 	10E-1000*10E1000000 = 10E1000
       			0.0     *  infinity = infinity
       			10E-1000000*10E1000 = 10E-1000
       			0.0     *  infinity = 0.0
    
    and because of this ambiguity, they choose "undefined" as the answer.
    
    /Bevin