linux-mips
[Top] [All Lists]

FPU test on RedHat7.1

To: "H . J . Lu" <hjl@lucon.org>, linux-mips@oss.sgi.com
Subject: FPU test on RedHat7.1
From: Carsten Langgaard <carstenl@mips.com>
Date: Thu, 22 Nov 2001 16:37:11 +0100
Sender: owner-linux-mips@oss.sgi.com
The attached tests fails on my RedHat7.1 system, but works fine on my
old HardHat5.1.
Anyone got any idea.

compile:
g++ -o fpu_test fpu_test.cc

/Carsten

--
_    _ ____  ___   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


#include <math.h>
#include <stdio.h>

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

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

  op1.l = 0x7fefffffffffffff;
  op2.l = 0x0000000000000001;  

  printf("%llx %llx\n", op1.l, op2.l);
  
  res = remainder(op1.d, op2.d);

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

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