title: JavaScript pack integers and calculate arbitrary precision float:
body: <p>I need to do the following in JavaScript and so far been unable to find solutions to do it seamlessly:</p>
  
  <ul>
  <li>Grab two integers in a specific order and pack them like Python's struct module.</li>
  <li><p>This packed value, (bonus for supporting different endianness than host) will be turned into a 64 bit float (double). They must be arbitrary thus I might get an exponent representation of the integer (say, they could be 0xdeadbeef and 500):</p>
  
  <p>In exp form:
  1.0883076389305e-311
  1.0883076389305000 * 10 ^ - 311</p></li>
  <li><p>I need to convert it to the arbitrary precision, non-exponent form, so: </p>
  
  <p>0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000108830763893050000000000000000000000000000000000000000000000000000000000000000000000000000</p></li>
  <li><p>That number converted to a string :)</p></li>
  </ul>
  
  <p>I haven't found a way to do this in Javascript and I have to output some numbers like that which must support arbitrary precision, or at least, of a scale up to the 1024 exponent (or, say 400) of doubles.</p>
  
  <p>Thanks!!</p>
  
  <p>Note: I do need the "packing/unpacking' to be a faithful representation of those two numbers converted to a double/64bit float. But I don't care about, say, exporting to a string or raw buffer. As long as I get an arbitrary precision double representation for the double it's all fine.</p>