home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!comp.vuw.ac.nz!newshost.wcc.govt.nz!kosmos.wcc.govt.nz!mckay_g
- From: mckay_g@kosmos.wcc.govt.nz
- Newsgroups: comp.sys.acorn.tech
- Subject: Re: Suppressing floating point errors in C
- Date: 8 Jan 93 23:32:17 NZST
- Organization: Welligton City Council, Public Access.
- Lines: 21
- Message-ID: <1993Jan8.233217.1@kosmos.wcc.govt.nz>
- References: <memo.845760@cix.compulink.co.uk>
- NNTP-Posting-Host: kosmos.wcc.govt.nz
-
- In article <memo.845760@cix.compulink.co.uk>, pmoore@cix.compulink.co.uk
- (Paul Moore) writes:
- > The following code, when compiled, generates a stack backtrace,
- > and the program exits with status zero. How do I get the program
- > to continue to the "return 0"? (Note: I KNOW ignoring FP errors
- > is not good in the general case - in this case, and in the "real"
- > case where this is a problem for me, the naff value in d is never
- > used, and so is harmless.)
-
- [ Program deleted to overcome a stupid limitation of this silly news
- reader where you have to write more lines than you quote!]
-
- The way I would overcome this problem is to change the FPU status/control
- register to prevent what ever type of FP errors you wish to ignore. The only
- problem with this is that you would have to remember these registers and
- restore them when you exit your program or if it is running under the wimp,
- every time you call wimp_poll.
-
- Rob.
-
-
-