Hint:
Shift your angles to values between -180 and +180 first using the ang() command.
Manual site:
http://www.conitec.net/beta/avar-ang.htm