<script> var n = 200.0000; n *= 10000; for (var i = 0; i < 100; i++) { document.write(i + " - " + (n/10000).toFixed(4) +"<br>"); n /=2; } </script>