Standard library / math/cmplx
cmplx.Cosh()
Complex hyperbolic cosine. Expected stdout: '1 0\n'.
Formal Syntax & Structure
go syntaxgo
func Cosh(x complex128) complex128Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | complex128 | First input operand (or sole input if unary). |
Return Value
complex128
Complex hyperbolic cosine.
Working Example
Example Snippetgo
package main
import ( "fmt" "math/cmplx")
func main() { z := cmplx.Cosh(0) fmt.Printf("%.6g %.6g\n", real(z)+0.0, imag(z)+0.0)}