Golang builtin.imag() function example
package builtin
The imag built-in function returns the imaginary part of the input complex number
Golang builtin.imag() function usage example
package main
import "fmt"
func main() {
fmt.Println(imag(100 + 8i))
}
Output :
8
Reference :
Advertisement
Something interesting
Tutorials
+6.1k Java : Human readable password generator
+7.5k Golang : How to handle file size larger than available memory panic issue
+14.8k Golang : Find commonalities in two slices or arrays example
+7.8k Golang : Reverse a string with unicode
+10.5k Golang : Create matrix with Gonum Matrix package example
+8.9k Golang : Sort lines of text example
+7.5k Golang : Handling Yes No Quit query input
+4.6k JavaScript : Rounding number to decimal formats to display currency
+14k Golang : concatenate(combine) strings
+14.8k Golang : Adding XML attributes to xml data or use attribute to differentiate a common tag name
+15.6k Golang : Convert date format and separator yyyy-mm-dd to dd-mm-yyyy