<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2017-04-12 17:42 GMT+02:00 Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">SmallFloats still support word access via basicAt:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">| a x y |</div><div class="gmail_extra">x := 0.5.</div><div class="gmail_extra">a := {x at: 1. x at: 2}.</div><div class="gmail_extra">y := BoxedFloat64 new.</div><div class="gmail_extra">y at: 1 put: (a at: 1).</div><div class="gmail_extra">y at: 2 put: (a at: 2).</div><div class="gmail_extra">y := y * 1.0.</div><div class="gmail_extra">{x. x class. a. y. y class} {0.5 . SmallFloat64 . #(1071644672 0) . 0.5 . SmallFloat64}</div><div class="gmail_extra"><br></div><div class="gmail_extra">So to serialize you just use the words. And to deserialize you just create a BoxedFloat. If you want to normalize the boxed float you do some arithmetic operation on it. But boxed floats work fine for any value, it's just a space optimization.</div></div></blockquote></div><br>Nice trick. Thank's</div></div>