Price fraction: Difference between revisions
Content added Content deleted
(→{{header|Python}}: Whoops!) |
|||
Line 966: | Line 966: | ||
0.7 0.62 0.9 0.18 0.78 |
0.7 0.62 0.9 0.18 0.78 |
||
</lang> |
</lang> |
||
=={{header|Mathematica}}== |
|||
<lang Mathematica>PriceFraction[x_]:=Piecewise[{{.1, 0 <= x < 0.06}, {.18, x < .11}, {.26,x < 0.16}, |
|||
{.32, x < .21}, {.38, x < .26}, {.44, x < 0.31}, {.5, x < .36}, |
|||
{.54, x < .41}, {.58, x < .46}, {.62, x < .51}, {.66, x < .56}, |
|||
{.70, x < .61}, {.74, x < .66}, {.78, x < .71}, {.82, x < .76}, |
|||
{.86, x < .81}, {.90, x < .86}, {.94, x < .91}, {.98, x < .96}}, 1]</lang> |
|||
=={{header|Mercury}}== |
=={{header|Mercury}}== |