[issue6188] Error Evaluating float(x) ** float(y)

Mark Dickinson report at bugs.python.org
Wed Jun 3 15:30:51 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

This is not a bug:  Python's operator precedence rules mean that the 
expression

  -6.276479035564047 ** -5.7974497499584849

is treated as:

  -(6.276479035564047 ** -5.7974497499584849).

>>> a = -6.276479035564047
>>> b = -5.7974497499584849
>>> a ** b != -6.276479035564047 ** -5.7974497499584849
True
>>> a ** b == (-6.276479035564047) ** -5.7974497499584849
True

----------
nosy: +marketdickinson
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6188>
_______________________________________


More information about the Python-bugs-list mailing list