Go Data Type Float64 Convert to Float32
package main// ww w. j a va 2s . c o m import ( "fmt" "reflect" ) func main() { var f32 float32 = 10.4242 fmt.Println(reflect.TypeOf(f32)) f64 := float64(f32) fmt.Println(reflect.TypeOf(f64)) f64 = 9876.987654321 fmt.Println(f64) f32 = float32(f64) fmt.Println(f32) }