I have a problem with the atan2 function.
I have 2 programs, one in C and one in Matlab. Both have an identical implementation.
My problem is that I am getting occasionally different values from the atan2 function in C and Matlab.
Matlab atan2= 2.8438364863237604
C atan2= 2.8438364863237608
So only the last digit is different (and not in all cases), but unfortunately, I would need the values to be identical.
Do you have any ideas it might be like this and how can I solve it?