Article: AMD's Jaguar Microarchitecture
By: Michael S (already5chosen.delete@this.yahoo.com), April 7, 2014 1:34 am
Room: Moderated Discussions
TREZA (no.delete@this.ema.il) on April 6, 2014 3:47 pm wrote:
> Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on April 6, 2014 2:48 pm wrote:
> > Extended precision as implemented in x87 is a huge mess. It even causes 32 and 64-bit
> > FP to return inconsistent and incorrect results. Nowadays it means 128-bits, not 80.
> >
> A mess because there is no separate instructions like FADDs, FADDd,
> FADDe, which makes programs prone to double rounding ?
There are no separate instructions, but there is precision control field in the control word, so, as long as you don't change precision very often, you (or your compiler) can avoid double rounding at very relatively small performance penalty.
The real problem is more exotic - x87 precision control can reduce the precision of mantissa, but it can't reduce the range of exponent. So, results of x87 computations with single or double precision remain the same as specified by IEEE only as long as you stay within official range. Which sounds nearly impossible in practice.
>
> The Motorola 68881/2 did not have that problem, IIRC.
> (The whole x87 instruction set is a joke anyway)
>
> Wilco (Wilco.Dijkstra.delete@this.ntlworld.com) on April 6, 2014 2:48 pm wrote:
> > Extended precision as implemented in x87 is a huge mess. It even causes 32 and 64-bit
> > FP to return inconsistent and incorrect results. Nowadays it means 128-bits, not 80.
> >
> A mess because there is no separate instructions like FADDs, FADDd,
> FADDe, which makes programs prone to double rounding ?
There are no separate instructions, but there is precision control field in the control word, so, as long as you don't change precision very often, you (or your compiler) can avoid double rounding at very relatively small performance penalty.
The real problem is more exotic - x87 precision control can reduce the precision of mantissa, but it can't reduce the range of exponent. So, results of x87 computations with single or double precision remain the same as specified by IEEE only as long as you stay within official range. Which sounds nearly impossible in practice.
>
> The Motorola 68881/2 did not have that problem, IIRC.
> (The whole x87 instruction set is a joke anyway)
>