2 ms·
The coprocessor uses 80-bit floats, that’s more than double precision. It even has a special instruction, fldpi, to get π in the full precision: https://www.fel
by Const-me 6y ago
The coprocessor uses 80-bit floats, that’s more than double precision. It even has a special instruction, fldpi, to get π in the full precision: https://www.felixcloutier.com/x86/fld1:fldl2t:fldl2e:fldpi:fldlg2:fldln2:fldz https://www.felixcloutier.com/x86/fld1:fldl2t:fldl2e:fldpi:f...
- olliej 6y agoIt does however completely bollocks up all the subsequent trigonometry functions. Even intel says not to use them. Also alas, 80bit is a bit of a misnomer - when comparing to the more regular ieee754 representations, it’s actually fp79 :D
- jart 6y agoIntel's Manual says to use FLDPI. The x87 FPU represents pi internally at extended-extended-precision, so it's more like fp82 :D Were you thinking about the argument reduction gotcha? http://galaxy.agh.edu.pl/~amrozek/AK/x87.pdf http://galaxy.agh.edu.pl/~amrozek/AK/x87.pdf
- olliej 6y agoFldpi only loads the register, rounding according to the current rounding mode, so you still only have 63 bits of precision when you load the value. For intermediate calculations it incorporates the internal extended pi via the GRS bits. And yeah the train wreck of argument reduction was my reference