Date: Fri, 10 Oct 1997 17:34:04 -0400 (EDT) From: Chuck Robey <chuckr@glue.umd.edu> To: Terry Lambert <tlambert@primenet.com> Cc: Glenn Johnson <gjohnson@nola.srrc.usda.gov>, freebsd-hackers@FreeBSD.ORG Subject: Re: Floating point exceptions Message-ID: <Pine.BSF.3.96.971010173132.11671G-100000@localhost> In-Reply-To: <199710102149.OAA15093@usr08.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10 Oct 1997, Terry Lambert wrote: > > I've got a calculation intensive (simulation) application that I run that > > aborts with a Floating Point Exception error under FreeBSD -current. I can run > > this application just fine under Linux, but of course I want to run it under > > FreeBSD (so I can replace Linux). My understanding is that FreeBSD traps > > FPE's. Is there a way for me to change the FreeBSD source code to mask FPE's > > rather than trap them? Better yet, can I do that for a specific application at > > compile time? Your assistance is greatly appreciated. > > Fix: Correct the code to not generate exceptions > Bad fix: fpsetmask( 0); > Worst fix: signal( SIGFPE, SIG_IGN); Terry, I figured if he understood his application's math well enough to do the first fix, he'd have done it without asking us. Your worst case fix doesn't have to be that way, he could set up a signal catcher, so that he could identify which calculations are killing him, then maybe fix the code from there. That's what I'd likely do, if I couldn't spot the original killing calculation. Disagree? > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD (301) 220-2114 | version 3.0 current -- and great FUN! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971010173132.11671G-100000>