[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Mark Dickinson
Mark Dickinson added the comment: Also, https://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero -- nosy: +mark.dickinson ___ Python tracker ___ ___

[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Tim Peters
Tim Peters added the comment: This won't be changed - it's a near-universally mandated behavior across relevant standards. Many years ago it wasn't, but Knuth changed minds when he wrote: """ We must define x^0=1 for all x, if the binomial theorem is to be valid when x=0 , y=0 , and/or x=-y

[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Jáchym Barvínek
Jáchym Barvínek added the comment: Sorry, It should be 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 1.0 of course. -- ___ Python tracker ___

[issue28529] 0 ** 0 should raise ArithmeticError

2016-10-25 Thread Jáchym Barvínek
New submission from Jáchym Barvínek: 0 ** 0 is mathematically undefined and equivalent to 0/0. 0/0 correctly raises ZeroDivisionError, but 0 ** 0 == 1. Also 0.0 ** 0 == 0 ** 0.0 == 0.0 ** 0.0 == 0.0. Similarly for math.pow. -- components: Interpreter Core messages: 279410 nosy: Jáchym