Arithmetic/Complex: Difference between revisions
m
→{{header|Sidef}}: updated code and output
m (→{{header|Sidef}}: updated code and output) |
|||
Line 4,257:
=={{header|Sidef}}==
<lang ruby>var a = 1:1
var b = 3.14159:1.25
[ a + b, # addition
a * b, # multiplication
-a, # negation
a.abs, # abs
a.sqrt, # sqrt
Line 4,275:
-1-i
0.5-0.5i
1.4142135623730950488016887242097
1.09868411346780996603980119524068+0.45508986056222734130435775782247i
3.14159
1.25</pre>
|