Inaccurate float multiplication: 0.0001 * 3.0 = 0.00030000000000000003
I apologize if this is documented somewhere. I looked but couldn't find it.
$number1 = 0.0001 * 1
$number2 = 0.0001 * 2
$number3 = 0.0001 * 3
notify{"$number1 $number2 $number3":}
Notice['0.0001 0.0002 0.00030000000000000003']
I thought this might be an integer to float conversion issue but I get the same result with:
$number1 = 0.0001 * 1.0
$number2 = 0.0001 * 2.0
$number3 = 0.0001 * 3.0
notify{"$number1 $number2 $number3":}
Notice[0.0001 0.0002 0.00030000000000000003]
I'm not very good at math, but this doesn't look right =)
Does anyone have a solution for getting consistent and accurate results?