mathcad "acos" giving an imaginary angle, please help ?
- July 29, 2019
- 2 replies
- 3243 views
Dear all,
I am using the direction cosines to find angle (or rather, the change in angle) along a curve at specific points.
But when the first part is a straight line, the change in angle should be zero (cos(theta) = 1.000) but mathcad is giving me cos(theta) = 1.00000000000000000000000000000000000000000000000001 or something and because of this, when I use the "acos" function, I am getting imaginary angles.
Currently I just added a 10^-20 to the denominator and the problem seemed to go away (maybe). But is there any way I can avoid this altogether ?
The calculation sheet is attached below. Please dont mind the extreme decimal values for the "y" variables. I am reading them from a curve and so they are like that :).
Many thanks in advance !
Warm Regards,
Aravind.




