Lookup table seems silly when you can take advantage of the floating point format. In C, I think you can more or less just do something like:<p><pre><code>    uint64_t e = (1023-mj) &lt;&lt; 52; 
    double exp = *((double*) &amp;e)

</code></pre>
edit: Whether or not there&#x27;s a way to express that in Scala, I don&#x27;t know...