From help-octave-request at bevo dot che dot wisc dot edu Thu Nov 13 10:53:14 2003 Subject: RE: 0^0 = ? From: "John W. Eaton" To: j dot e dot drews at att dot net Cc: help-octave at gnu dot org, "'Cong'" Date: Thu, 13 Nov 2003 10:51:28 -0600 On 13-Nov-2003, j dot e dot drews at att dot net wrote: | I know that by L'Htpital's Rule you should get: | | ln(y)=x*ln(x) = ln(x)/(1/x) so | | Lim x->0+ ln(x)/(1/x) = ( 1/x )/( -1/( x^2)) = | | Lim x->0+ (-x) = 0 | so ln(y) = 0 and then y=1. | | Maybe this is the reason for the behavior? The 0^0 == 1 behavior is part of the IEEE 754 standard for floating point arithmetic. The paper "What every computer scientist should know about floating point arithmetic" by David Goldberg provides a rationale for the behavior that is a bit different than above (it's at the end of a section titled "ambiguity"). To start with, I think you need to look at this as y^x, not x^x. A quick google search should turn up a copy of the paper if you want the details. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------