🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3087

Re: I want NaN and Inf to crash program. Is this possible?

#3087
From: Orville R. Weyrich
Date: Sun, 22 Nov 1992 07:39
19 lines
1564 bytes
In article <1emagvINNclf@gap.caltech.edu> brooke@cco.caltech.edu (Brooke Paul Anderson) writes:
>I want my programs to crash if some operation results in NaN or Inf.
>Is it possible for me to do this or for me to set some sort of trap?
>I don't know why gcc is set up so that it continues execution when a
>NaN or Inf shows up -- this is a real pain in the ass.

I at least prefer it that way -- it allows incomplete information to be
propagated when that makes sense; the programmer can test for normal
numerics at strategic points in the program and if need be shut the program 
down gracefully.

orville

--------------------------------------   **************************************
Orville R. Weyrich, Jr.                        Weyrich Computer Consulting
Certified Data Processor                     POB 5782, Scottsdale, AZ 85261
Certified Systems Professional                   Voice: (602) 391-0821
Certified Computer Programmer            Internet: orville%weyrich@uunet.uu.net
--------------------------------------   **************************************
Technical Details
Message-ID: <1992Nov22.073943.2912@weyrich.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!weyrich!orville
References: <1emagvINNclf@gap.caltech.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!weyrich!orville
From: orville%weyrich@uunet.uu.net (Orville R. Weyrich)
Subject: Re: I want NaN and Inf to crash program.  Is this possible?
Message-ID: <1992Nov22.073943.2912@weyrich.UUCP>
Sender: orville@weyrich.UUCP (Orville R. Weyrich)
Reply-To: uunet.uu.net!weyrich!orville
Organization: Weyrich Computer Consulting
References: <1emagvINNclf@gap.caltech.edu>
Date: Sun, 22 Nov 92 07:39:43 GMT
Lines: 19