The code `atan2(sin(x),cos(x))`

achieves the same computation as `fabs(x,2*pi())`

. The manual warns that `fabs()`

can induce sampling issues; would the same issues apply to the atan2 version?

# Atan2 vs fabs

**avehtari**#2

Warning is due to possible discontinuity in gradient. The same applies for any function which may produce discontinuity in gradient.

Gotcha. I have nil training in calculus; presumably `atan2(sin(x),cos(x))`

has a discontinuous gradient?