I found some error in multiplication while using Octave. For instance look below.
Edit: It is not the same as 24.0000 = 24.0000. That is towards understanding why it happens. I am looking for a command or syntax to fix the number of digits in all varibales. Sort of a Global round off. I am facing issues with equality checks in my analysis because of this. And I did not face such issues in MATLAB. In matlab may be it is an issue with number representation. In octave it feels like it affects the solution.
Octave window:
>> b=3*19.05
b = 57.15000000000001
>> a=57.15
a = 57.15000000000000
>> a==b
ans = 0
Firstly why does this happen? I tried rounding off the variable using a code. However, many variables had such error. Now I really wonder how many such calculations went wrong. Or am I missing something here? I want to fix the number of digits of precision to say 6 or 10 or something. How do I do that for all variables. Something like a command in the beginning?