How can I avoid floating point errors when converting float's to int's.
For example the following code prints: 0.5499999999999972 when I wound expect it to print 0.55.
package main
import "fmt"
func main() {
x := 100.55
fmt.Println(x - float64(int(x)))
}
Output:
0.5499999999999972