RosettaCodeData/Task/Arithmetic-Complex/Common-Lisp/arithmetic-complex-2.lisp
Ingy döt Net 764da6cbbb CDE
2013-04-10 16:57:12 -07:00

17 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)