Arithmetic/Complex: Difference between revisions
Content added Content deleted
m (Fix ordering of Lambdatalk and Lang) |
(add RPL) |
||
Line 4,609: | Line 4,609: | ||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|RPL}}== |
|||
{{in}} |
|||
<pre> |
|||
(1.5,3) 'Z1' STO |
|||
(1.5,1.5) 'Z2' STO |
|||
Z1 Z2 + |
|||
Z1 Z2 - |
|||
Z1 Z2 * |
|||
Z1 Z2 / |
|||
Z1 NEG |
|||
Z1 CONJ |
|||
Z1 ABS |
|||
Z1 RE |
|||
Z1 IM |
|||
</pre> |
|||
{{out}} |
|||
<pre> |
|||
(3,4.5) |
|||
(0,1.5) |
|||
(-2.25,6.75) |
|||
(1.5,.5) |
|||
(-1.5,-3) |
|||
(1.5,-3) |
|||
63.4349488229 |
|||
1.5 |
|||
3 |
|||
</pre> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
<syntaxhighlight lang="ruby"> |
<syntaxhighlight lang="ruby"> |