Finding the Sine of Complex Number in Golang
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 sine of the specified complex number with the help of the Sin() 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 Sin() function.
func Sin(y complex128) complex128
Let us discuss this concept with the help of the given examples:
Result 1: (67.47891523845587-30.879431343588244i) Result 2: (-1254.1949676545178+805.3091464217314i) Result 3: (-461.3928755590023-296.25646574921427i)
Example 2 :
Complex Number 1: (1+2i) Sine 1: (3.165778513216168+1.9596010414216063i) Complex Number 2: (3+6i) Sine 2: (28.466112195402218-199.69451226216125i) Sum : (31.631890708618386-197.73491122073966i)