Arithmetic/Complex: Difference between revisions

Content added Content deleted
(+Icon+Unicon)
(added Go)
Line 678: Line 678:
unit_circle = exp(2*i*pi/n * (/ (j, j=0, n-1) /) )
unit_circle = exp(2*i*pi/n * (/ (j, j=0, n-1) /) )
end program cdemo2</lang>
end program cdemo2</lang>

=={{header|Go}}==
<lang go>package main
import "fmt"

func main() {
a := 1+1i
b := 3.14159+1.25i
fmt.Println(a + b)
fmt.Println(a * b)
fmt.Println(1 / a)
fmt.Println(-a)
}</lang>


=={{header|Groovy}}==
=={{header|Groovy}}==