Consider this code
import (
\"fmt\"
\"math/big\"
)
func main() {
var b1,b2,b3,bigSum big.Float
b1.SetFloat64(25.3)
b2.SetFloat64(76.2)
b1.S
Println
determines whether the value implements the Stringer
interface. If it does then it will call the String()
to get formatted value. big.Float
implements it for pointer receiver so you have to pass a reference. Otherwise Println
will detect that it's a struct and print all of it's fields using reflection