Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Oct 1997 15:14:00 -0400 (EDT)
From:      Chuck Robey <chuckr@glue.umd.edu>
To:        Glenn Johnson <gjohnson@nola.srrc.usda.gov>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Floating point exceptions
Message-ID:  <Pine.BSF.3.96.971010151210.11671E-100000@localhost>
In-Reply-To: <199710101907.OAA09470@millenia.srrc.usda.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10 Oct 1997, Glenn Johnson wrote:

> I hope this is the appropriate list.
> 
> 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.

It makes a signal occur, SIGFPE.  All you have to do is decide what you
want to do when the exception occurs.  You could ignore it, or set up a
function to catch it, and maybe print an error, set a flag, I don't know
how your software works.

> -- 
> Glenn Johnson                     
> USDA-ARS-SRRC                      Phone: (504) 286-4252 
> 1100 Robert E. Lee Boulevard       FAX:   (504) 286-4217 
> New Orleans, LA 70124              e-mail: gjohnson@nola.srrc.usda.gov
> 
> 
> 
> 

----------------------------+-----------------------------------------------
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.971010151210.11671E-100000>