On Sun, 2021-02-14 at 13:19 -0800, Santhosh Kumar T wrote: > When I print both values, they print exactly same. so I am assuming > no precision lost for this specific example 123.4. > but still Cmp returns non-zero.
This is not a good assumption to make, and is refuted by the result of Cmp. https://play.golang.org/p/ROr6cHMzWIf -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5635a54d86152c7617fdb05c9fe8b94b2040c9e0.camel%40kortschak.io.