Arithmetic/Complex: Difference between revisions

Content added Content deleted
(→‎{{header|Ruby}}: Added demo of CMath lib)
m (→‎{{header|Sidef}}: modified code to work with Sidef 2.10)
Line 3,841:
a * b, # multiplication
-a, # negation
1c1.c / a, # multiplicative inverse
~a, # complex conjugate
a.abs, # abs
Line 3,847:
b.re, # real
b.im, # imaginary
].each { |c| say c };</lang>
{{out}}
<pre>4.14159+2.25i