Predeclared type

Go float32 type

IEEE 754 binary32 floating-point type; 24 bits of significand precision including the implicit leading bit for normal values. Many decimals cannot be represented exactly. Example output: '16777216'.

Formal Syntax & Structure

go syntaxgo
float32

Working Example

Example Snippetgo
package main
import (  "fmt")
func main() {  var x float32 = 16777216  x++  fmt.Printf("%.0f\n", x)}
Go Reference