When multiplying golang float64 values with integers the result contains high precison error values due to the way floating point numbers are stored. Here is a code snippet that shows the problem I am referring to
package main
import (
"fmt"
)
func main() {
var l float64 = 0.2
fmt.Println("Hello, playground",l*6)
}
The result is
Hello, playground 1.2000000000000002
Here is the play link for the same playground
Is there a standard/best practise to round of the error ?