Go convert float to a string
s := fmt.Sprintf("%f", 123.456) // s == "123.456000"
Go convert float to a string
s := fmt.Sprintf("%f", 123.456) // s == "123.456000"
golang convert string to float
const bitSize = 64 // Don't think about it to much. It's just 64 bits.
floatNum, err := strconv.ParseFloat("123.45", bitSize)
fmt.Println(fmt.Sprintf("%f", floatNum))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us