From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id 661F33F36B for ; Tue, 2 Jul 2002 09:10:06 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g62DA5b21524 for axp-list@listman.redhat.com; Tue, 2 Jul 2002 09:10:05 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g62DA5a21520 for ; Tue, 2 Jul 2002 09:10:05 -0400 Received: from technolust.cx (technolust.cx [66.92.82.226]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g62D0B911101 for ; Tue, 2 Jul 2002 09:00:11 -0400 Received: (from nobody@localhost) by technolust.cx (8.9.3/8.8.7) id JAA21609; Tue, 2 Jul 2002 09:10:03 -0400 Date: Tue, 2 Jul 2002 09:10:03 -0400 Message-Id: <200207021310.JAA21609@technolust.cx> From: "Peter Petrakis" To: axp-list@redhat.com Subject: Re: Floating point on alpha X-Mailer: Open WebMail 1.51 20011122 X-OriginatingIP: 155.212.145.172 (alphadriven) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com X-Reply-To: voodoo@alphadriven.org List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: Well, Adding '-mieee' to your compile flags will solve the FPE however you may be better off to cast the comparison to an (int). Testing for the positive case doesn't require 64 bits of precision ;-P . Peter > 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 > 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 > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list -- www.alphadriven.org