Predeclared type
Go complex64 type
Complex type with float32 real and imaginary components. Use complex to combine two float32 values; real and imag extract the components. Example output: '2 3'.
Formal Syntax & Structure
go syntaxgo
complex64Working Example
Example Snippetgo
package main
import ( "fmt")
func main() { var z complex64 = 2 + 3i fmt.Println(real(z), imag(z))}