Hi,

Can anyone explain the below?
(When printing out b with %.20f it prints 1.20999999999999996447)

Thanks

package main

import "fmt"

func main() {
a, b := 1.1*1.1, 1.21
fmt.Println(a == b)          // true
fmt.Println(1.1*1.1 == 1.21) // false
}



-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to