<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 29 January 2013 19:06, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 1/29/2013 4:31 AM, Don wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since it got lost in the old thread on this topic, I'll repost my versions of<br>
floatToshort and shortToFloat, which are extremely fast (no unpredictable<br>
branches, no lookup tables) and respect the current rounding mode:<br>
</blockquote>
<br></div>
I was waiting on incorporating your improvements until after std.halffloat was merged into Phobos. This is because the old ones were easier to understand, and I wanted them in the repository history.<br>
<br>
</blockquote></div><br><br></div><div class="gmail_extra">I'm sure this was mentioned before, but what does halffloat have over std.numeric.CustomFloat?<br></div><div class="gmail_extra"><br><br clear="all"></div><div class="gmail_extra">
Thanks<br></div><div class="gmail_extra">-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>