you forgot the \n in the printf format string without it, next is written right after the end of the printf
Psk Il ven 2 feb 2024, 17:56 Juan Mamani <juanmamanichar...@gmail.com> ha scritto: > Hi everybody! > > I was checking consistency behavior of fmt.Printf with some basic > samples. And for my surprise never expected what I found. > > My context: > OS: Linux, debian 8,9,10,11 > Go version 1.21 > > What I was doing? Learning about fmt.Printf > Expecting fmt.Printf behavior be the same output for any use case. > > Source code: https://go.dev/play/p/oKifC9Lw-JO > > > Ouput: > g_x 15.925999599999999 > 15.91.6241.624 <----- for me this is freaking weird ouput > -------------- > x2: 1.624 > x2: 1.624 > x1: 15.9259996 > -------------- > j: 4 > k: 5 > p: 1.624 > > May be I found compiler bug? Can someone help me to figure out what is > going on. > > Thank you for your attention > > -- > 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/0b8e4c5a-ceef-49e8-8546-bcd51200ff35n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/0b8e4c5a-ceef-49e8-8546-bcd51200ff35n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAJNBTxL7zHtvtoms0kMuq9WTrffxJ_YyxCd-5Or%2Bv2YGbu2PeA%40mail.gmail.com.