Fixed bug in atan_ps where condition was not handled correctly.