home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / programm / 6616 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.5 KB  |  32 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!weyrich!orville
  3. From: orville%weyrich@uunet.uu.net (Orville R. Weyrich)
  4. Subject: Re: I want NaN and Inf to crash program.  Is this possible?
  5. Message-ID: <1992Nov22.073943.2912@weyrich.UUCP>
  6. Sender: orville@weyrich.UUCP (Orville R. Weyrich)
  7. Reply-To: uunet.uu.net!weyrich!orville
  8. Organization: Weyrich Computer Consulting
  9. References: <1emagvINNclf@gap.caltech.edu>
  10. Date: Sun, 22 Nov 92 07:39:43 GMT
  11. Lines: 19
  12.  
  13. In article <1emagvINNclf@gap.caltech.edu> brooke@cco.caltech.edu (Brooke Paul Anderson) writes:
  14. >I want my programs to crash if some operation results in NaN or Inf.
  15. >Is it possible for me to do this or for me to set some sort of trap?
  16. >I don't know why gcc is set up so that it continues execution when a
  17. >NaN or Inf shows up -- this is a real pain in the ass.
  18.  
  19. I at least prefer it that way -- it allows incomplete information to be
  20. propagated when that makes sense; the programmer can test for normal
  21. numerics at strategic points in the program and if need be shut the program 
  22. down gracefully.
  23.  
  24. orville
  25.  
  26. --------------------------------------   **************************************
  27. Orville R. Weyrich, Jr.                        Weyrich Computer Consulting
  28. Certified Data Processor                     POB 5782, Scottsdale, AZ 85261
  29. Certified Systems Professional                   Voice: (602) 391-0821
  30. Certified Computer Programmer            Internet: orville%weyrich@uunet.uu.net
  31. --------------------------------------   **************************************
  32.