Carpet

Carpet

2M Downloads

Rounding Issues with /script run command

Sar4h-3 opened this issue ยท 1 comments

commented

I was calculating something with the /script run command, because i was too lazy to calculate it in my head and noticed a strange rounding bug in version 1.4.14.
If i use script run 7*0.2 I get " 1.4000000000000001 " instead of 1.4. it seems to be a little issue, but it may cause big problems when in right circumstances.
The same bug is true with 7*0.1 ( 0.7000000000000001 )

commented

This is how floating point math "works".

For an explanation see: https://0.30000000000000004.com/