math: Remove slow paths from asin and acos [BZ #15267]