linux-mips
[Top] [All Lists]

Re: FPU test on RedHat7.1

To: "H . J . Lu" <hjl@lucon.org>
Subject: Re: FPU test on RedHat7.1
From: Carsten Langgaard <carstenl@mips.com>
Date: Mon, 26 Nov 2001 10:22:40 +0100
Cc: linux-mips@oss.sgi.com
References: <3BFD1BA7.C4490465@mips.com> <20011122103930.A2007@lucon.org> <3BFE6327.986D490C@mips.com> <20011124112547.A22621@lucon.org>
Sender: owner-linux-mips@oss.sgi.com
"H . J . Lu" wrote:

> On Fri, Nov 23, 2001 at 03:54:31PM +0100, Carsten Langgaard wrote:
> > The file sysdeps/ieee754/dbl-64/e_remainder.c seems to have changed since
> > glibc-2.2.2.
> > I have attached the glibc-2.2.2 remainder file, which seems to work
> > better.
> >
>
> I believe it is a MIPS FPU related issue. glibc tries to do
>
> 1.7976931348623157e+308 - 8.5720688574901386e+301 * 2097152
>
> and expects -1.9958403095e+292. However, on mips, I got -inf. Could you
> please look into it?

I believe this is ok, 8.5720688574901386e+301 * 2097152 is greater than
1.7976931348623157e+308 (which is the highest floating point number you can
represent).
So 1.7976931348623157e+308 - 8.5720688574901386e+301 * 2097152 do give -Inf on
(I guess) all other architectures than i386, which have a double extended (80
bit / 64 bit mantisse) precision.

I have tried the same calculation on a Sun (Sparc) and it also gives -Inf.
So I guess the problem is in the e_remainder function.


>
> Thanks.
>
> H.J.
>
>   ------------------------------------------------------------------------
>
>    ieee.cName: ieee.c
>          Type: Plain Text (text/plain)

--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com




<Prev in Thread] Current Thread [Next in Thread>