Black dot fix, simplification and generalization

The acos() and acosf() separation is not needed, so I have removed the redundant functions.

I have also extended the domain checks to both cases FAST-MATH=ON and FAST-MATH=OFF so the domain checks will be performed in both.