RosettaCodeData/Task/Arithmetic-Complex/Common-Lisp/arithmetic-complex-2.lisp

18 lines
170 B
Common Lisp

> (+ #c(0 1) #c(1 0))
#C(1 1)
> (* #c(1 1) 2)
#C(2 2)
> (* #c(1 1) #c(0 2))
#C(-2 2)
> (- #c(1 1))
#C(-1 -1)
> (/ #c(0 2))
#C(0 -1/2)
> (conjugate #c(1 1))
#C(1 -1)