Previously there was a check doing a >= check against quarter pi to forward a cosine request to a sine (and vice versa). Effectively if we did cos(pi/4) we'd try to fix this by doing sin(pi/2 - pi/4) - this of course is sin(pi/4). Unfortunately, sin would detect this and then forward it back to cos causing an infinite loop.
Fixes #584
Previously there was a check doing a
>=
check against quarter pi to forward a cosine request to a sine (and vice versa). Effectively if we didcos(pi/4)
we'd try to fix this by doingsin(pi/2 - pi/4)
- this of course issin(pi/4)
. Unfortunately,sin
would detect this and then forward it back tocos
causing an infinite loop.