C As this below tiny program from Tim Coe, coe@vitsemi.com demonstrates C the Pentium procesor sometimes returns wrong results when using real C division. EPS-dependent Fortran version. C To Fortran by H. D. Knoble, hdk@psuvm.psu.edu, 11/27/94 C Penn State Center for Academic Computing DOUBLE PRECISION X,Y,Z,FDIV REAL EPS C C---Define SP EPS for the IBM PC. EPS is the smallest real number on C this architecture such that 1+EPS>1 and 1-EPS<1. EPS=5.9604640E-08 X = 4195835.0D0 Y = 3145727.0D0 C---Z Theoretically should be a computational (fuzzy) Zero. Z = X - FDIV(X,Y) * Y WRITE(*,*) 'Residual Z=',Z IF (DABS(Z).LT.EPS) THEN WRITE(*,*) 'Since Residual Z is essentially Zero, then this' WRITE(*,*) 'Pentium Processor DOES NOT have a Divide bug.' ELSE WRITE(*,*) 'If Z is substantially not Zero, then this' WRITE(*,*) 'Pentium Processor DOES HAVE a Divide bug.' ENDIF STOP END DOUBLE PRECISION FUNCTION FDIV(X,Y) DOUBLE PRECISION X,Y FDIV = X/Y RETURN END