mapping integers 1-max onto 100 integers from 1-1,000,000 : <p>I need to map a Java integer from the range 1-max to the range 1-1,000,000, but only using 100 particular (non-linear) values in the destination range.  The 100 values are:<br>
1-10 (so the first 10 values map to themselves)<br>
then by 5's: 15, 20, 25 ... to 100<br>
then by 50's: 150, 200, 250 ... to 1,000<br>
and so on, the final values being 900,000 &nbsp;950,000 and 1,000,000<br>
I can't quite get my head around anything more elegant than a bag of nested if/else-if's.<br>
The solution is not time/cycle sensitive.</p>
