I tried to turn an int to a float using
Code: Select all
temp_float = temp_int;
eg. 0 - 10 works fine
11 comes out as 10.99991
12 comes out as 11.99991 etc
however 15,16,20 (plus several other seemingly random numbers) work fine.
Could anyone explain why some numbers are inaccurate, and is there a better way to do it.
Regards
David