Hi
I am trying to just set a numeric value to a variable and then read the variable but i get strange results
Why i get that results from Variable A? I don't do any calculation there, i just set the value to 3.44. Why i get 3.440000057220459?
Then i Round the value of variable A with 2 fractional digits only and set it to variable B. How is it possible to get that result again? Round2 function doesn't work?
I am trying to just set a numeric value to a variable and then read the variable but i get strange results
B4X:
Dim A As Float
Dim B As Float
A=3.44
Msgbox(A,"A") 'gives 3.440000057220459
B = Round2(A,2)
Msgbox(B,"B") 'gives again 3.440000057220459
Why i get that results from Variable A? I don't do any calculation there, i just set the value to 3.44. Why i get 3.440000057220459?
Then i Round the value of variable A with 2 fractional digits only and set it to variable B. How is it possible to get that result again? Round2 function doesn't work?
Last edited: