Thanks for the answers. I wasn't interested as much in fixed decimal
solutions as understanding why what appeared to be the same floating-point
math on the surface was returning different results.
I also posted this question on Stack Overflow and I think the answers there
are pretty comprehensi
Why are the following unequal in Go? Is this a bug, or is it by design? If
it's by design, why does this occur and is this type of behavior documented
anywhere?
https://play.golang.org/p/itEV9zwV2a
package main
import (
"fmt"
)
func main() {
x := 10.1
fmt.Println("x == 10.1: