Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Christian Iseli <chris@ludwig-alpha.unil.ch>
To: axp-list@redhat.com
Subject: Re: Floating point on alpha
Date: Tue, 02 Jul 2002 15:01:28 +0200	[thread overview]
Message-ID: <200207021301.PAA06721@ludwig-alpha.unil.ch> (raw)
In-Reply-To: Your message of "Tue, 02 Jul 2002 14:10:58 +0200." <200207021410.58761.ineiti@gmx.net>

ineiti@gmx.net said:
> I have a general question for alphas: from time to time when I try to
> compile  a program for my alpha (PC164), I run into problems with
> doubles. For example

> {
> 	double a;

> 	if ( a ){
> 		printf( "love\n" );
> 	} else {
> 		printf( "peace\n" );
> 	} } 

Ah, well.  If your whole point is avoid a crash, you can always try:

#include <signal.h>
static void myHandler(int i)
{
  signal(i, myHandler);
}

And add this near the start of the main program:

  signal(SIGFPE, myHandler);

But then again, it might be better to actually fix the code...

Cheers,
					Christian





  parent reply	other threads:[~2002-07-02 13:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-02 12:10 Floating point on alpha Linus Gasser
2002-07-02 12:33 ` Doug Trainor
2002-07-02 14:03   ` Linus Gasser
2002-07-02 14:22     ` Joerg Bruehe
2002-07-02 13:01 ` Christian Iseli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-02 13:10 Peter Petrakis
2002-07-08 22:54 Donsbach, Jeff
2002-07-09  2:42 ` Alvin Starr
read-only archive

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