home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aix / 11333 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  1.3 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!charnel!csusac!cdsac!scotte
  2. From: scotte@cdsac.uucp (L. Scott Emmons)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: Divide by Zero trapping
  5. Message-ID: <Nov05.162951.20392@cdsac.uucp>
  6. Date: 5 Nov 92 16:29:51 GMT
  7. References: <1992Nov3.183201.16550@versyss.com>
  8. Organization: CableData (U.S. Computer Services), Sacramento, CA
  9. Lines: 24
  10. NntpPostingHost: cdsac
  11.  
  12. In article <1992Nov3.183201.16550@versyss.com> keithd@versyss.UUCP (Keith Doyle) writes:
  13. >
  14. >I discovered that AIX does not automatically trap divide by zero.  My
  15. >first reaction was to proclaim it a bug and post the news here, but
  16. >I figured I should read InfoExplorer first to find out if there is
  17. >any information about it.  I did a search for "divide by zero" and
  18. >found a sample program that is supposed to trap such things under
  19. >XL C FloatingPoint Options.  However, I can't make it work.  Here
  20. >is my test program:
  21. [...]
  22. >    signal(SIGTRAP,fhandler);
  23. [...]
  24.  
  25. Try using SIGFPE, which will trap floating point exceptions such as
  26. divide by zero. This is a POSIX signal.
  27.  
  28. You may want to report the documentation defect to IBM  they do care.
  29.  
  30. Hope this helps,
  31.  
  32.                L. Scott Emmons
  33.               CableData  Research Center
  34.              csusac.csus.edu!cdsac!scotte
  35.                 KC6NFP
  36.