[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: U2-darn few bugs...



It's a matter of definition, I think. The negative exponent is defined to be the reciprocal of the positive exponent. That is, x^(-n) = 1/(x^n). As to why this definition makes sense, here is one explanation:

http://faculty.ed.umuc.edu/~swalsh/Math%20Articles/Exponents.html

Another reason is that for n>0 and x>0, the function (or set of functions) y=n^x is continuous (if you graph it for any n, you get an unbroken line, with the y-axis as an asymptote), which is nice since y=x is also continuous (an unbroken straight line).

So you see, it's a cinch to translate negative integer exponents into code.

--
Carl Distefano
cld@xxxxxxxx