Message381573
Basically when squaring as a negative number, if it's a variable it acts like -3*-3 otherwise it acts like 3*-3.
For example:
>>> x = -3
>>> x ** 2
9
>>> -3 ** 2
-9
pow(-3, 2) seems to act like -3 * -3?
** 3 seems fine and both seems to act like -3*-3*-3.
>>> x = -3
>>> x ** 3
27
>>> -3 ** 3
-27
Will it be safe to use the ** 2 in Python? If I use a variable will it return the same value?
I only found this for the bug:
https://devforum.roblox.com/t/inconsistent-squaring-behavior/820028/
It looks like the exact same issue I'm having, but I still don't get it and it's not for Python. |
|
Date |
User |
Action |
Args |
2020-11-21 19:56:52 | JohnSmith11132 | set | recipients:
+ JohnSmith11132 |
2020-11-21 19:56:52 | JohnSmith11132 | set | messageid: <1605988612.3.0.228167402053.issue42428@roundup.psfhosted.org> |
2020-11-21 19:56:52 | JohnSmith11132 | link | issue42428 messages |
2020-11-21 19:56:52 | JohnSmith11132 | create | |
|