Linux MIPS Architecture development
 help / color / mirror / Atom feed
* FPU test on RedHat7.1
@ 2001-11-22 15:37 Carsten Langgaard
  2001-11-22 18:39 ` H . J . Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Langgaard @ 2001-11-22 15:37 UTC (permalink / raw)
  To: H . J . Lu, linux-mips

[-- Attachment #1: Type: text/plain, Size: 467 bytes --]

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



[-- Attachment #2: fpu_test.cc --]
[-- Type: text/plain, Size: 326 bytes --]

#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);

}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-26 10:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-22 15:37 FPU test on RedHat7.1 Carsten Langgaard
2001-11-22 18:39 ` H . J . Lu
2001-11-23 14:54   ` Carsten Langgaard
2001-11-24 19:25     ` H . J . Lu
2001-11-26  9:22       ` Carsten Langgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox