HP3000-L Archives

January 1999, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Tue, 5 Jan 1999 15:55:52 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
I have been writing COBOL code for the last 9-10 years, and the last six
months Fortran 66. Now converting the 66 code to 77.  It seems
ridiculous that I am not able to use a simple "IF" statement to see if a
double precision variable is equal to zero in FORTRAN 77.
IF (ZAMOUNT .EQ. 0.00D0) ...

A compile warning (781) states: Test may fail due to floating point
imprecision. This occurs when ".EQ." or ".NE." is used in the
comparison. So, the only work-around in Fortran77 is to do something
like:

IF (ZAMOUNT .LT. 0.0001 .AND. ZAMOUNT .GT. -0.0001) .....

Can anyone tell me how I can keep from modifying every "IF" statement
that has an ".EQ." or ".NE"?


TIA,

Michael Anderson
TIW Corporation
Houston, Tx (713) 729-2110 ext:100

ATOM RSS1 RSS2