News for hackers. Stuff that matters.
Re:Float Self-Tagging by skybrian on Thursday November 28, 2024 @01:51AM (#42263029)
A small minority, but apparently it includes all the floats you’re likely to use. It seems the insight is that you only need 8 bits of exponent in most cases. (And single-precision floating point only has 8 bits of exponent.)

Most double-precision floats are never used because they have high exponents.

Re:Float Self-Tagging by pansa2 on Thursday November 28, 2024 @08:53AM (#42265259)
> A small minority, but apparently it includes all the floats you’re likely to use.

Sorry, I meant a small minority need to be boxed - all the floats you're likely to use can remain unboxed.

Re:Float Self-Tagging by bee_rider on Friday November 29, 2024 @12:45AM (#42271178)
Got take, but a double with only 8 bits of exponent actually seems kind of nice, you get the extra precision but it can be cast down to a single and you only lose precision; you don’t have values that are outside the range of singles.