From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 276 invoked from network); 30 Nov 1998 09:04:47 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 30 Nov 1998 09:04:47 -0000 Received: from rzcomm1.rz.tu-bs.de (root@rzcomm1.rz.tu-bs.de [134.169.9.107]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id EAA23111 for ; Mon, 30 Nov 1998 04:02:43 -0500 From: y0000218@rzsrv2.rz.tu-bs.de Received: from ppp393.ts.rz.tu-bs.de (ppp393.ts.rz.tu-bs.de [134.169.243.93]) by rzcomm1.rz.tu-bs.de (8.8.6/8.8.6) with ESMTP id KAA26729 for ; Mon, 30 Nov 1998 10:02:30 +0100 (MET) Received: from alpha.utopia (ppp393.ts.rz.tu-bs.de [192.168.0.1]) by ppp393.ts.rz.tu-bs.de (8.9.0/8.8.7) with ESMTP id IAA24959 for ; Mon, 30 Nov 1998 08:16:11 GMT Date: Mon, 30 Nov 1998 08:16:11 GMT Message-Id: <199811300816.IAA24959@ppp393.ts.rz.tu-bs.de> Subject: Re: Floating point problems Heinz Ulrich Stille wrote: : Hi! : What's wrong with the following program? : main() { : double x = 1.0; : x *= 1e-310; : } : This results in a floating point exception on my Ruffian (for values : somwhere between 1e-300 and 1e-325, independent of kernel and compiler), : but not on any intel. The assembler output seems to indicate that the : two values are just loaded into registers and multiplied. : What is going on? This looks _very_ familiar - I had the same problem, same range of numbers. It still reproducibly FP-exeptions on a RH 5.2 system here. I think its weird, and noone could plausibly tell me why yet. -mieee works, also fixing my code so it doesnt produce such small numbers did it. Could any guru tell me _why_ this code crashes? Just doing anything with a number around 1e-310 raises an FP exception, smaller _and_ larger numbers dont. Olaf -- "The number of Unix installations Olaf Schnapauff, has grown to 10, with more expected." O.Schnapauff@tu-bs.de - The Unix Programmer's Manual,1972 http://www.tu-bs.de/~c0033014/ See Web page and keyservers for pgp public key