Price fraction: Difference between revisions

Tweak
(Added zkl)
(Tweak)
Line 2,739:
}</lang>
<lang zkl>fcn convert2(price){ // shifting the fractional part to the integer portion
var vert=T(0100.10, 0180.18, 0260.26, 0320.32, 0380.38, 0440.44, 0500.50, 0540.54, 0580.58, 0620.62,
0660.66, 0700.70, 0740.74, 0780.78, 0820.82, 0860.86, 0900.90, 0940.94, 0980.98, 1001.00);
0.01* vert[(price*100-1)/005];
}</lang>
<lang zkl>T(0.7388727, 0.8593103, 0.826687, 0.3444635, 0.0491907).apply(convert) .println();
T(0.7388727, 0.8593103, 0.826687, 0.3444635, 0.0491907).apply(convert2).println();</lang>
{{out}}
Anonymous user