home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3154 < prev    next >
Encoding:
Internet Message Format  |  1992-08-25  |  1.1 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!execu!mike
  2. From: mike@execu.execu.com (Mike McCants)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Ignoring Least Significant Bit in a Real Compare
  5. Message-ID: <3634@execu.execu.com>
  6. Date: 25 Aug 92 20:54:25 GMT
  7. References: <1992Aug21.203055.29668@aero.org> <1992Aug24.185047.27463@news.eng.convex.com>
  8. Distribution: usa
  9. Organization: Comshare, Inc. Austin Development Center
  10. Lines: 21
  11.  
  12. In article <1992Aug24.185047.27463@news.eng.convex.com> joelw@convex.com (Joel Williamson) writes:
  13. >>I am working on a 60-bit CDC machine in Fortran-4.
  14. >>      REQ = .FALSE.
  15. >>      IF (ABS(X1-X2) .LT. EPS) REQ = .TRUE.
  16.  
  17. >In article <1992Aug21.203055.29668@aero.org> wae@aero.org (William A. Emanuelsen) writes:
  18. >try:
  19. >    J = I1 .OR. I2
  20.                 ^^
  21. Inclusive or?!
  22. Exclusive or [.XOR. or XOR(I1,I2)?] is correct.
  23.  
  24. >    REQ = (J.EQ.1) .OR. (J.EQ.0)
  25.  
  26. In my opinion,
  27.  
  28.       REQ = ABS(X1-X2) .LT. EPS
  29.  
  30. would still be faster on this CDC machine since normally floating
  31. point operations were nearly as fast as integer operations and it
  32. uses fewer operations.
  33.