On 1/29/2013 4:31 AM, Don wrote: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.
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: