correct and expand atan2 rewriting as arg