Storing 0.07 as a double - impossible??? - page 2 12 New comment Mathy 2024.03.23 16:43 #11 Indeed, if we make double "X = 0.07", and we read in a Comment or a Print, it indicates: "X = 0.07000000000000001"! And this is a problem if we do calculations on this basis. The solution I found is to use the "float" type, which is shorter than "double", and there we have X = 0.07. Errors, bugs, questions precision problem with double MetaTrader 4 Platform update 12 New comment
Indeed, if we make double "X = 0.07", and we read in a Comment or a Print, it indicates: "X = 0.07000000000000001"!
And this is a problem if we do calculations on this basis.
The solution I found is to use the "float" type, which is shorter than "double", and there we have X = 0.07.