The expression you have used with the arc cosine function has a value out of the range of – 1.0 to +1.0.