<div dir="ltr">Hi Levente,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 3, 2014 at 3:08 PM, Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 1 Dec 2014, Eliot Miranda wrote:<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I was assuming that any of add or subtract positive or negative zero, or multiply or divide by 1.0 would do the trick. Why wouldn't this be<br>
adequate?<br>
</blockquote>
<br></span>
I think "x + 0.0" is adequate, but unnatural. It reminds me of javascript's typecast hacks.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ah, I see. Hang on. There is no support for SmallFloat64 on 32-bit Spur.<br>
Only in a 64-bit image/on a 64-bit Spur VM will you be able to create<br>
instances of SmallFloat64. And so far I only have this working in the VM<br>
simulator. I've yet to try and create a real VM, and even then it will<br>
only be a Stack VM.<br>
</blockquote>
<br></span>
Wouldn't it be possible to support them in a 32-bit VM? Aren't object headers the same in both VMs? Or is it because of the difference in alignment?</blockquote><div><br></div><div>SmallFloat64 is an immediate tagged representation, like SmallInteger, so they fit within an object pointer and have no header. In 64-bit Spur there is a 3-bit tag, leaving 61 bits. SmallFoat64 steals 3 bits from the 11-bit exponent to donate to the tags, representing a full double precision floating-point value that is restricted to the ~ +/-10^+/-38 range. There's really no practical way to shoe-horn a usable range of 64-bit float into a 30-bit value. Its possible but so few values would fit that the effort would be counter-productive. DOes this make sense now?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888"><br>
<br>
Levente</font></span><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>