Jump to content

Getting the number of decimal places: Difference between revisions

add RPL
m (Peak moved page Getting the number of decimals to Getting the number of decimal places: "decimal places" is the appropriate term in English)
(add RPL)
Line 884:
<pre>
4
</pre>
 
=={{header|RPL}}==
≪ DUP MANT →STR SIZE SWAP XPON - 2 - 0 MAX
≫ ''''NDEC'''' STO
≪ { 12 120 12.345 12.345677 1.23E-20 1.23E20 } → cases
≪ { } 1 cases SIZE '''FOR''' j
cases j GET '''NDEC''' + '''NEXT'''
≫ ≫ ''''TASK'''' STO
{{out}}
<pre>
1: { 0 0 3 6 22 0 }
</pre>
 
1,151

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.