constexpr float HalfToFloat(uint16_t h) { long m = 0x400; long e = h / m % 32; long s = h >> 15; return ((h % m + m << e ^ -s) + s) * (e > 0) * 0x1p-25f; } // no support for inf or nan; subnormals flushed to zero. static_assert(sizeof(long) == 8);
-
Show this thread
Replying to @twoscomplement
return tbl1[h&const1]*tbl2[h>>const2];
3:40 PM - 18 Aug 2018
0 replies
0 retweets
5 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.