Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Carsten Langgaard <carstenl@mips.com>
To: "H . J . Lu" <hjl@lucon.org>, linux-mips@oss.sgi.com
Subject: FPU test on RedHat7.1
Date: Thu, 22 Nov 2001 16:37:11 +0100	[thread overview]
Message-ID: <3BFD1BA7.C4490465@mips.com> (raw)

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

}

             reply	other threads:[~2001-11-22 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-22 15:37 Carsten Langgaard [this message]
2001-11-22 18:39 ` FPU test on RedHat7.1 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BFD1BA7.C4490465@mips.com \
    --to=carstenl@mips.com \
    --cc=hjl@lucon.org \
    --cc=linux-mips@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox