Hacker News new | ask | show | jobs
by enriquto 830 days ago
> x87 is just a really weird and funky instruction set that's best left in the gutter of history

hmmm, can you use the long doubles in sse or avx? They are glorious, and as far as I see from playing with godbolt, they still require dirtying your hands with the x87 stack.

1 comments

The 80bit float? Not as far as I'm aware. However, it's fairly trivial to represent a 127bit float with 2 64bit floats. And with the nature of AVX/SSE, you don't really take much of a performance hit for doing that as you are often operating on both parts of the double with the same instruction.
Do you know if there's language support for that? Are there obscure gcc options that make "long double" be quadruple precision floats?
You can just use standard C _Float128 type https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
Which language?

For C++, there's this: https://en.cppreference.com/w/cpp/types/floating-point