Standard library / math/cmplx

cmplx.Cot()

Complex cotangent; poles occur where sine vanishes. Expected stdout: '0.642093 0\n'.

Formal Syntax & Structure

go syntaxgo
func Cot(x complex128) complex128

Parameters & Attributes

NameTypeDescription
xcomplex128First input operand (or sole input if unary).

Return Value

complex128

Complex cotangent; poles occur where sine vanishes.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math/cmplx")
func main() {  z := cmplx.Cot(1)  fmt.Printf("%.6g %.6g\n", real(z)+0.0, imag(z)+0.0)}
Go Reference