在Go语言中查找复数的反双曲正弦
在Go语言中,有内置函数可以查找复数的反双曲正弦。反双曲正弦是一个数学函数,它返回复数的反双曲正弦值。在本文中,我们将讨论如何在Go语言中查找复数的反双曲正弦。
语法
在Go语言中查找复数的反双曲正弦的语法如下:
func Asinh(z complex128) complex128
Asinh()函数接受一个复数作为参数,并返回该数的反双曲正弦。
示例1:查找复数的反双曲正弦
让我们考虑以下示例来查找复数的反双曲正弦:
package main
import (
"fmt"
"math/cmplx"
)
func main() {
// Creating a complex number
z := complex(4, 3)
// Finding the inverse hyperbolic sine of the complex number
asinh := cmplx.Asinh(z)
// Displaying the result
fmt.Println("Inverse Hyperbolic Sine of", z, "is", asinh)
}
输出
Inverse Hyperbolic Sine of (4+3i) is (2.305509031243477+0.6339838656391765i)
示例2:查找负复数的反双曲正弦
让我们考虑以下示例来查找负复数的反双曲正弦:
package main
import (
"fmt"
"math/cmplx"
)
func main() {
// Creating a complex number
z := complex(-5, -12)
// Finding the inverse hyperbolic sine of the complex number
asinh := cmplx.Asinh(z)
// Displaying the result
fmt.Println("Inverse Hyperbolic Sine of", z, "is", asinh)
}
输出
Inverse Hyperbolic Sine of (-5-12i) is (-3.257054943061329-1.1749515338392524i)
示例3:查找纯虚数的反双曲正弦
让我们考虑以下示例来查找纯虚数的反双曲正弦:
package main
import (
"fmt"
"math/cmplx"
)
func main() {
// Creating a complex number
z := complex(0, 7)
// Finding the inverse hyperbolic sine of the complex number
asinh := cmplx.Asinh(z)
// Displaying the result
fmt.Println("Inverse Hyperbolic Sine of", z, "is", asinh)
}
输出
Inverse Hyperbolic Sine of (0+7i) is (2.6339157938496336+1.5707963267948966i)
结论
在本文中,我们讨论了如何使用内置的Asinh()函数在Go语言中查找复数的反双曲正弦。我们还提供了一些示例来帮助您理解如何使用此函数查找不同类型复数的反双曲正弦。
广告
数据结构
网络
关系数据库管理系统 (RDBMS)
操作系统
Java
iOS
HTML
CSS
Android
Python
C语言编程
C++
C#
MongoDB
MySQL
Javascript
PHP