Implementing Half Floats in D

Iain Buclaw ibuclaw at ubuntu.com
Tue Jan 29 14:27:08 PST 2013


On 29 January 2013 19:06, Walter Bright <newshound2 at digitalmars.com> wrote:

> On 1/29/2013 4:31 AM, Don wrote:
>
>> Since it got lost in the old thread on this topic, I'll repost my
>> versions of
>> floatToshort and shortToFloat, which are extremely fast (no unpredictable
>> branches, no lookup tables) and respect the current rounding mode:
>>
>
> 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.
>
>

I'm sure this was mentioned before, but what does halffloat have over
std.numeric.CustomFloat?


Thanks
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130129/c3be90a8/attachment-0001.html>


More information about the Digitalmars-d mailing list