Peek/PokeFloat

BlitzMax Forums/BlitzMax Programming/Peek/PokeFloat

SB(Posted 2005) [#1]
I have some trouble with the PeekFloat and PokeFloat command.

there seams to be a tiny inaccuracy after storing a float in an bank.
On my machine the code below results in 0.200000003 instead of 0.200000000 as it normaly should.
Do I have to accept that a float stored to a bank bekomes stightly different after reading it? Why does that happen?

Local bnk:TBank = CreateBank(4)
PokeFloat(bnk,0,0.2)
Print PeekFloat(bnk,0)

Confused....

Thanks


Dreamora(Posted 2005) [#2]
Perhaps because 0.2 is just not possible with float accuracy :-)