math: clean up inverse trigonometric functions