complx.Exp() Function in Golang With Examples Last Updated : 28 Apr, 2020 Comments Improve Suggest changes Like Article Like Report complx.Exp() Function in Golang is used to returns e**x, the base-e exponential of x. Syntax: func Exp(x complex128) complex128 Here, x is the set of all complex numbers real as well as imaginary parts. Return Type: The return type of this function is a complex number. Example 1: C // Golang program to illustrate // the complx.Exp() Function package main // importing fmt and math/cmplx import ( "fmt" "math/cmplx" ) // Calling main method func main() { // using the function fmt.Printf("%.2f", cmplx.Exp(5 + 6i)) } Output: (142.50-41.47i) Example 2: C // Golang program to illustrate // the complx.Exp() Function package main // importing fmt and math/cmplx import ( "fmt" "math/cmplx" ) // Calling main method func main() { n := complex(7, 8) // using the function fmt.Printf("%.2f", cmplx.Exp(n)) } Output: (-159.56+1084.96i) Comment More infoAdvertise with us Next Article complx.Exp() Function in Golang With Examples P PranchalKatiyar Follow Improve Article Tags : Go Language Golang-Complex Similar Reads complx.Pow() Function in Golang With Examples complx.Pow() Function in Golang is used to find x**y, the base-x exponential of y. For this function, one need to import the "math/cmplx" package. Syntax: func Pow(x, y complex128) complex128 Pow(0, ±0) returns 1+0i Pow(0, c) for real(c)<0 returns Inf+0i if imag(c) is zero, otherwise Inf+Inf i Pa 1 min read complx.Inf() Function in Golang With Examples complx.Inf() Function in Golang is used to returns a complex infinity, complex(+Inf, +Inf). TO use this function one must need to import the "math/cmplx" package. Syntax: func Inf() complex128 Return Type: It returns a complex infinity. Example 1: C // Golang program to illustrate // the complx.Inf( 1 min read complx.Rect() Function in Golang With Examples complx.Rect() Function in Golang returns the complex number x with polar coordinates r, θ. It takes the float value as input and return complex number. This method belongs to complex package. Syntax: func Rect(r, θ float64) complex128; Here, r and θ are the complex numbers with flo 1 min read math.Expm1 Function() in Golang With Examples Go language provides inbuilt support for basic constants and mathematical functions to perform operations on the numbers with the help of the math package. You are allowed to find base-e exponential of the specified number minus 1, i.e., e**a -1 with the help of Expm1() function provided by the math 2 min read filepath.Ext() Function in Golang With Examples In Go language, path package used for paths separated by forwarding slashes, such as the paths in URLs. The filepath.Ext() function in Go language used to return the file name extension used by the specified path. The extension is the suffix beginning at the final dot in the final element of path; i 2 min read Like