If you check the javadoc for Math.acos , you will see the following:
If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
So, there are two possibilities:
The numerator is larger than the denominator in absolute value, resulting in a fraction that exceeds 1.0. Therefore, arcoscosine will return NaN.
One of the square roots returns NaN. As seen from javadoc : If the argument is NaN or less than zero, then the result is NaN.
So, I would check your values ββfor the humerus, radius and ulna. Perhaps you either made a numerator too large (for example, using a floating point error), or you had a vector and not a scalar value for measuring bone tissue (which led to a negative rather than positive argument of the square root).
source share