Averages/Median: Difference between revisions
add RPL
(Added XPL0 example.) |
(add RPL) |
||
Line 3,638:
else return srtd[ceil(alen/2)] ok
</syntaxhighlight>
=={{header|RPL}}==
≪ '''SORT'''
DUP SIZE 1 + 2 /
DUP2 FLOOR GET ROT ROT CEIL GET + 2 /
≫ ''''MDIAN'''' STO
<code>SORT</code> became a standard RPL instruction in 1993, with the introduction of the HP-48G. For earlier RPL versions, users have to call the sorting program demonstrated [[Sorting algorithms/Bubble sort#RPL|here]].
=={{header|Ruby}}==
|