Theta5==theta_4 has a false and true value Why doesn't theta3==theta_2 show True in the second, sixth, and seventh? I don't understand at all.
python
Determining whether floating point values are the same is not recommended because of the small numerical error that occurred during the calculation.
First of all, to check if the expected results were not produced due to a small numerical error,
print(theta5-theta_2)
Check out the results.
When determining whether floating points are the same, define a small value as epsilon=0.0001 and determine if the difference in numbers is less than this value. Epsilon may vary from case to case.
© 2024 OneMinuteCode. All rights reserved.