Re: FPU test on RedHat7.1

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

 



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?

Thanks.


H.J.
#include <stdio.h>

int main( int argc,char * argv[ ] )
{

  double res, d;
  
  union {
    unsigned long long l;
    double d;
  } op1, op2;

  op1.l = 0x7fefffffffffffffLL;
  op2.l = 0x7ea0000000000000LL;

  d = 2097152;
  res = op1.d - d * op2.d;

  printf("%llx\n", res);
  printf("%20.10e\n", res);

}

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux