Article View: comp.os.os2.programmer
Article #1339Division by 0 crashes OS2/2.0
From: Dov Bai-MSI Visitor
Date: Wed, 02 Sep 1992 16:35
Date: Wed, 02 Sep 1992 16:35
29 lines
1157 bytes
1157 bytes
The following short program compiled with MS-FORTRAN 5.0 with
coprocessor crashes OS2 Ver. 2 on my machine:
c DBZ.FOR - Division by zero test
double precision x, y
x = 1.0d0
y = 0.0d0
call devide( x, y )
end
subroutine devide( x, y )
double precision x, y
double precision z
z = x / y
return
end
However, on OS2 1.3 and plain DOS the program exits gracefully with
the following message:
run-time error M6103: MATH
- floating-point error: divide by 0
Does anybody know a workaround other then masking the numerical
cooprocessor ?
My machine is 386/33 with 387 copprocessor.
Thanks,
Technical Details
Message-ID:
<1992Sep2.163508.17347@tc.cornell.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zephyr.ens.tek.com!uw-beaver!micro-heart-of-gold.mit.edu!wupost!usc!rpi!batcomputer!msiadmin.cit.cornell.edu!baiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zephyr.ens.tek.com!uw-beaver!micro-heart-of-gold.mit.edu!wupost!usc!rpi!batcomputer!msiadmin.cit.cornell.edu!bai From: bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) Newsgroups: comp.os.os2.programmer Subject: Division by 0 crashes OS2/2.0 Message-ID: <1992Sep2.163508.17347@tc.cornell.edu> Date: 2 Sep 92 16:35:08 GMT Sender: news@tc.cornell.edu Organization: Cornell Theory Center Lines: 29 Nntp-Posting-Host: msiadmin.cit.cornell.edu