From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lacrosse.corp.redhat.com (host154.207-175-42.redhat.com [207.175.42.154]) by listman.redhat.com (Postfix) with ESMTP id BBCA42F2DC for ; Tue, 9 Oct 2001 18:23:36 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.44.254]) by lacrosse.corp.redhat.com (8.9.3/8.9.3) with ESMTP id SAA10160 for ; Tue, 9 Oct 2001 18:23:36 -0400 Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id f99MNaN28127 for ; Tue, 9 Oct 2001 18:23:36 -0400 Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f99MNaP13459 for axp-list@listman.redhat.com; Tue, 9 Oct 2001 18:23:36 -0400 Received: from MyLaptop.GatWorks.com (pool-141-155-109-28.ny5030.east.verizon.net [141.155.109.28]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f99MNZg13454 for ; Tue, 9 Oct 2001 18:23:35 -0400 Received: from voicenet.com (localhost.localdomain [127.0.0.1]) by MyLaptop.GatWorks.com (8.11.2/8.11.2) with ESMTP id f99MMY203896 for ; Tue, 9 Oct 2001 18:22:35 -0400 Message-ID: <3BC378AA.84B9824B@voicenet.com> Date: Tue, 09 Oct 2001 18:22:34 -0400 From: Uncle George Organization: GatWorks.com X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: denormalized FP numbers causing exceptions References: <200110092103.f99L3FR21275@gtedhcp-60.inetarena.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.redhat.com id f99MNZg13454 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: try cc -mieee all denorns are trapped. the -mieee option sets u with the ieee standards of float numbers & exception handling. u should be aware that there is a cost, as denorms are processed via kernel software. but at least u keep goin' /gat "Robert M. Riches Jr." wrote: > On Redhat 7.1, default GCC version 2.96, I'm getting floating > exceptions on what appear to be denormalized numbers. The code > is the Bow (or rainbow) information retrieval toolkit, and it's > blowing up in the following code: > > double scores_sum = 0; > for (ci = 0; ci < barrel->cdocs->length; ci++) > scores_sum += scores[ci]; > > It appears whenever an input to the '+=' operator is less than > 10^300, 10^308, or so, I get the floating exception. At least > one of the numbers is around 1, so the tiny numbers could be > rounded to zero and it wouldn't affect the final result. I > suppose I could try to add code to change an array element to > zero if it was less than about 10^290, but this may hit the same > exception as the addition attempt. > > Is there a compiler option to either not generate denormalized > numbers or to handle them gracefully? > > Thanks. > > Robert Riches > richesr1@inetarena.com > rriches@cse.ogi.edu > > _______________________________________________ > Axp-list mailing list > Axp-list@redhat.com > https://listman.redhat.com/mailman/listinfo/axp-list