Go language provides inbuilt support for basic constants and mathematical functions for complex numbers with the help of the cmplx package. You are allowed to find the inverse hyperbolic cosine of the specified complex number with the help of Acosh() function provided by the math/cmplx package. So, you need to add a math/cmplx package in your program with the help of the import keyword to access the Acosh() function.
func Acosh(x complex128) complex128
Let us discuss this concept with the help of the given examples:
Result 1: (2.3830308809003298+1.1961255219693694i) Result 2: (3.181316253686062+2.4132370433090795i) Result 3: (2.8462888282083862-2.18786062347089i)
Example 2 :
Complex Number 1: (2+3i) Inverse hyperbolic cosine 1: (1.9833870299165355+1.0001435424737974i) Complex Number 2: (6+8i) Inverse hyperbolic cosine 2: (2.9964401392355113+0.9296901439918359i) Sum of inverse hyperbolic cosines : (4.979827169152047+1.9298336864656334i)
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.