3 ms·
The same x86 instructions are used for arithmetic on float/double/extended types; the difference is a precision setting in the x87 control word.
by cperciva 6y ago
The same x86 instructions are used for arithmetic on float/double/extended types; the difference is a precision setting in the x87 control word.
- cozzyd 6y agoWell in most cases I've looked at generated assembly (not that often), the xmm registers are used even for scalar operations, which I thought was the default option for gcc on x86-64, but I suppose it might differ on different systems (or perhaps 32-bit mode was used for some reason).
- cperciva 6y agoRight, if you're using xmm regs you're getting double or single precision. Sometimes the x87 regs get used and that's when "accidentally computed with extra precision and then double-rounded" comes up.