thank you, I have work it out:
s := "12938219483923483000" bigFloatS,_ := common.StringToBigfloat(bigFloatS) bigIntS, accuracy := f.Int(nil) fmt.Printf("bigIntS:%v, accuracy:%v",bigIntF,accuracy) // bigIntF:12938219483923483000, accuracy:Exact On Friday, September 7, 2018 at 7:00:20 PM UTC+8, Jan Mercl wrote: > > On Fri, Sep 7, 2018 at 12:51 PM Shiming Liu <coding...@gmail.com > <javascript:>> wrote: > > > Hi you guys, do you know how to convert big.Float to big.Int, I have > searched with google and searched in this group, but don't found valuable > info. > > (*big.Float) Int() does that: https://golang.org/pkg/math/big/#Float.Int > > -- > > -j > -- 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.