From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,9e636c8c1728563 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2002-12-05 21:49:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!washdc3-snf1!news.gtei.net!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!37d89e9d!not-for-mail From: rob@evrtwa1-ar5-4-65-015-110.evrtwa1.dsl-verizon.net (Robert M. Riches Jr.) Newsgroups: comp.os.linux.alpha Subject: Re: Q: floatingpoint exceptions References: <87isy8yv5n.fsf@new.home-net.stg> Organization: none-at-all Reply-To: rm.riches@verizon.net Message-ID: User-Agent: slrn/0.9.6.4 (Linux) Date: Fri, 06 Dec 2002 05:49:17 GMT NNTP-Posting-Host: 4.65.15.110 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1039153757 4.65.15.110 (Fri, 06 Dec 2002 00:49:17 EST) NNTP-Posting-Date: Fri, 06 Dec 2002 00:49:17 EST Xref: archiver1.google.com comp.os.linux.alpha:6688 On 6 Dec 2002, Michal Jaegermann wrote: >Torsten Zirzlaff wrote: >> >> Any idea what is wrong that I receive with several programs a >> floatingpoint exception? These are not programs written by me, but >> programs from my distro (Debian 3.0) e.g. glplanet. >> >> Often those programs are graphics related, but not in every case. On >> my intel box they behave and run smoothly. > >Intel FPU allows you to get away with things like dividing by zero, or >something pretty close to it. On Alpha running full speed floating >point exceptions are inexact and cannot be restarted hence attempts to >divide by zero are deadly. You can workaround that by using -mieee flag >while compiling. This has a performance hit but unless you are really >taking care how a floating point arithmetic is peformed this can be the >only practical option. Graphics stuff is pretty infamous for playing >loose with a floating point. > >Look in gcc docs for descriptions of '-mieee', '-mieee-with-inexact' >and '-mieee-conformant' for more details. In response to a bug report I had filed or commented on, somebody at Redhat (possibly Mike Harris, but I'm not certain) stated that _all_ Redhat packages are compiled with -mieee just to avoid exceptions that shouldn't be fatal. I think the issue I had filed was that taking the log() of a large negative number (less than roughly 610, IIRC) would otherwise produce a denormallized number, and taking the exp() of that would bomb. Anyway, using -mieee would seem to put one in pretty good company. Robert Riches rm.riches@verizon.net