//calc bug issue
LadyCailinBot opened this issue ยท 2 comments
WORLDEDIT-3372 - Reported by zhenyie
//calc 1+1.11
= 2.11000000000003
//calc 1+1.111
= 2.110999999999998
it's bug?
Comment by wizjany
this is just how numbers work on computers. if you're interested you can see the math behind it here: https://docs.python.org/2/tutorial/floatingpoint.html#representation-error
as noted, the "solution" is to round the output, but that requires significant digit calculation to display correctly, and still doesn't solve inaccuracies through intermediate calculations.