title: Converting hexadecimal to float in JavaScript
body: <p>I would like to convert a number in base 10 with fraction to a number in base 16.</p>
  <pre><code>var myno = 28.5;
  
  var convno = myno.toString(16);
  alert(convno);
  </code></pre>
  <p>All is well there. Now I want to convert it back to decimal.</p>
  <p>But now I cannot write:</p>
  <pre><code>var orgno = parseInt(convno, 16);
  alert(orgno);
  </code></pre>
  <p>As it doesn't return the decimal part.</p>
  <p>And I cannot use parseFloat, since per MDC, the syntax of parseFloat is</p>
  <pre><code>parseFloat(str);
  </code></pre>
  <p>It wouldn't have been a problem if I had to convert back to int, since parseInt's syntax is</p>
  <pre><code>parseInt(str [, radix]);
  </code></pre>
  <p>So what is an alternative for this?</p>
  <p>Disclaimer: I thought it was a trivial question, but googling didn't give me any answers.</p>
  <p><sub><em><a href="https://stackoverflow.com/questions/5055635/converting-fractions-into-hexadecimal">This question</a> made me ask the above question.</em></sub></p>