Decimals and other numbers

Marko Rauhamaa marko at pacujo.net
Fri Jan 9 04:31:09 EST 2015


Chris Angelico <rosuav at gmail.com>:

> I'm not a mathematical expert, so I don't quite 'get' this. How does
> this justify 0**0 being equal to 0.5?

Many operations like this are defined in terms of some very strong
argument of uniqueness. Ultimately, the key point is safety in
mathematical deductions. One minimal requirement would be:

         lim        f(x, y)
   (x, y) -> (0, 0)

must be defined (See <URL: http://en.wikipedia.org/wiki/Limit_of_a_func
tion#Functions_of_more_than_one_variable>).

If you get sloppy, there is a real risk of terrible logical mistakes and
wrong results. I think having 0**0 return a value is as irresponsible as
having 0/0 return a value.

(The very same principle is used to define 0+0 and 0*0 as well.)


Marko



More information about the Python-list mailing list