Abs returns the absolute value (also called the modulus) of x.
package main import ( "fmt" "math/cmplx" ) func main() { fmt.Printf("%.1f", cmplx.Abs(3+4i)) }