title: How can I get MOD in Javascript to return a decimal correctly?
body: <p>A simple problem I'm working with is taking a time for a 300m run in seconds and converting them to a string so that it reads "9:99.99".  To get seconds, I do the following MOD operation:</p>
  
  <pre><code>sec = result % 60;
  </code></pre>
  
  <p>This doesn't work as expected unless the decimal portion is 0.5 (i.e. 60.5, 75.5, etc.).  Any other decimal gives me a result that's off by something that requires 12+ significant digits to express. </p>
  
  <p>For example, 64.55 % 60 gives me 4.5499999999999997 as a result.</p>
  
  <p>I know an easy solution would be to just split on the decimal and concatenate the result with the decimal places, but this just intrigues me.  What am I doing wrong, and is there a good way to fix this using MOD alone?</p>