The function atan2 ⁡ ( y , x ) {\displaystyle \operatorname {atan2} (y,x)} first appeared in the programming language Fortran (in IBM's implementation FORTRAN-IV) in 1961. It was originally intended to return a correct and unambiguous value for the angle θ in converting from cartesian coordinates (x, y) to polar coordinates (r, θ).