[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 80-bit subnormals printed incorrectly on Debian 11 M68K



In article <87pmvbobbn.fsf@igel.home>,
  Andreas Schwab <schwab@linux-m68k.org> wrote:

> On Jul 21 2021, Nelson H. F. Beebe wrote:

> > The Intel IA-64 Application Developer's Architecture Guide, May 1999,
> > (Order Number: 245188-001) on page 5-1, in Table 5-1 has
> >
> >>> ...
> >>>     Total memory format width (bits)          32       64       80     128
> >>>     Exponent bias                           +127    +1023   +16383  +16383

> That are the biases for normalized numbers.  What does it say about
> denormalized numbers?  Note that the i387 format does not allow for a
> biased exponent of zero when the explicit integer bit is one, unlike the
> m68881 format.

As this has been discussed in the GNU MPFR mailing-list a few days ago,
I've found that https://www.nxp.com/docs/en/reference-manual/M68000PM.pdf
(MOTOROLA M68000 FAMILY – Programmer's Reference Manual) confirms the
difference with the i387 format:

Page 1-18, Section 1.6.1 "Normalized Numbers" says:

  In extended precision, the mantissa's MSB, the explicit integer bit,
  can only be a one (see Figure 1-13); and the exponent can be zero.

and Section 1.6.2 "Denormalized Numbers" says:

  In extended precision, the mantissa's MSB, the explicit integer bit,
  can only be a zero (see Figure 1-14).

So on m86k, emin is one less the Intel x87 emin, and the printf output
is correct.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: