home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4674 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.1 KB

  1. Path: sparky!uunet!zephyr.ens.tek.com!uw-beaver!micro-heart-of-gold.mit.edu!wupost!usc!rpi!batcomputer!msiadmin.cit.cornell.edu!bai
  2. From: bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Division by 0 crashes OS2/2.0
  5. Message-ID: <1992Sep2.163508.17347@tc.cornell.edu>
  6. Date: 2 Sep 92 16:35:08 GMT
  7. Sender: news@tc.cornell.edu
  8. Organization: Cornell Theory Center
  9. Lines: 29
  10. Nntp-Posting-Host: msiadmin.cit.cornell.edu
  11.  
  12. The following short program compiled with MS-FORTRAN 5.0 with 
  13. coprocessor crashes OS2 Ver. 2 on my machine:
  14.  
  15. c DBZ.FOR - Division by zero test
  16.       double precision x, y
  17.       x = 1.0d0
  18.       y = 0.0d0
  19.       call devide( x, y )
  20.       end
  21.  
  22.       subroutine devide( x, y )
  23.       double precision x, y
  24.       double precision z
  25.       z = x / y
  26.       return
  27.       end
  28.  
  29. However, on OS2 1.3 and plain DOS the program exits gracefully with
  30. the following message:
  31.  
  32. run-time error M6103: MATH
  33. - floating-point error: divide by 0
  34.  
  35. Does anybody know a workaround other then masking the numerical 
  36. cooprocessor ?
  37.  
  38. My machine is 386/33 with 387 copprocessor.
  39.  
  40. Thanks,
  41.