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 451593FCBC for ; Tue, 2 Jul 2002 15:37:37 -0400 (EDT) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id g62Jbai28708 for axp-list@listman.redhat.com; Tue, 2 Jul 2002 15:37:36 -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 g62Jbaa28704 for ; Tue, 2 Jul 2002 15:37:36 -0400 Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id g62JRe912800 for ; Tue, 2 Jul 2002 15:27:40 -0400 Message-Id: <200207021927.g62JRe912800@mx1.redhat.com> Received: (qmail 28840 invoked by uid 0); 2 Jul 2002 19:37:29 -0000 Received: from zux165-165.adsl.green.ch (HELO there) (80.254.165.165) by mail.gmx.net (mp001-rz3) with SMTP; 2 Jul 2002 19:37:29 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Linus Gasser To: axp-list@redhat.com Subject: Re: Floating point on alpha - SOLUTION 1 Date: Tue, 2 Jul 2002 21:37:28 +0200 X-Mailer: KMail [version 1.3.1] References: <200207021310.JAA21609@technolust.cx> In-Reply-To: <200207021310.JAA21609@technolust.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: Yes, that did it! OK, it's not nice. I'll try the other alternatives, too. What's really not nice, it's a division with a non-initialised double. Not a test... F*CK with -miee I can divide by 0 w/o trouble! What the heck is this? I can have double a = 0, b = 1, c = 2; b = c / a; Someone wake me up! What is going on here? ineiti On Tuesday 02 July 2002 15:10, you wrote: > 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