Price fraction: Difference between revisions

K version added
(added Fantom example)
(K version added)
Line 852:
0.194047 -> 0.32
0.724852 -> 0.82</pre>
 
=={{header|K}}==
Translation of the J solution:
 
<lang K>
le:- 0.96 0.91 0.86 0.81 0.76 0.71 0.66 0.61 0.56 0.51 0.46 0.41 0.36 0.31 0.26 0.21 0.16 0.11 0.06 0.0
out: 1.00 0.98 0.94 0.90 0.86 0.82 0.78 0.74 0.70 0.66 0.62 0.58 0.54 0.50 0.44 0.38 0.32 0.26 0.18 0.1
 
pf:{out@_bin[le;-x]}'
</lang>
Output
<lang K>
pf 0.6094701 0.5003597 0.8512954 0.08951883 0.6868076
0.7 0.62 0.9 0.18 0.78
</lang>
 
=={{header|MUMPS}}==
<lang MUMPS>PRICFRAC(X)