Golang builtin.complex() function example
package builtin
The complex built-in function constructs a complex value from two floating-point values. The real and imaginary parts must be of the same size, either float32 or float64 (or assignable to them), and the return value will be the corresponding complex type (complex64 for float32, complex128 for float64).
Golang builtin.complex() function usage example
package main
import "fmt"
func main() {
fmt.Println(complex(100, 8))
}
Output :
(100+8i)
Reference :
Advertisement
Something interesting
Tutorials
+6.3k Golang : Selection sort example
+19.1k Golang : When to use public and private identifier(variable) and how to make the identifier public or private?
+21.3k Golang : Create and resolve(read) symbolic links
+8.1k Golang : HTTP Server Example
+13.8k Golang : Convert spaces to tabs and back to spaces example
+10.2k Golang : How to profile or log time spend on execution?
+5.6k Fix fatal error: evacuation not done in time problem
+8.8k Golang : Executing and evaluating nested loop in html template
+6.7k Golang : Experimental emojis or emoticons icons programming language
+14.6k Golang : Missing Bazaar command
+15.9k Golang : Get current time from the Internet time server(ntp) example
+13.7k Golang : Activate web camera and broadcast out base64 encoded images