Closed as not planned
Description
Bug report
Bug description:
As an example:
>>> import math
>>> n = math.atan2(-1.0, 4503599627370496.0)
>>> k = 2 * math.pi
>>> n
-2.220446049250313e-16
>>> k
6.283185307179586
>>> n % k
6.283185307179586
>>> n % k % k
0.0
>>>
This looks to be due to:
Lines 619 to 625 in 569fc68
On the first modulo we have
mod < 0
but mod + wx == wx
, so n % k == k
, and then on the second modulo we have fmod(wx, wx) == 0
, so n % k % k == 0
.
CPython versions tested on:
3.12
Operating systems tested on:
Linux