| 1 |
DOUBLE PRECISION FUNCTION D1MACH (IDUM) |
| 2 |
INTEGER IDUM |
| 3 |
C----------------------------------------------------------------------- |
| 4 |
C this routine computes the unit roundoff of the machine in double |
| 5 |
C precision. this is defined as the smallest positive machine number |
| 6 |
C u such that 1.0e0 + u .ne. 1.0e0 (in single precision). |
| 7 |
C----------------------------------------------------------------------- |
| 8 |
DOUBLE PRECISION U, COMP |
| 9 |
U = 1.0E0 |
| 10 |
10 U = U*0.5E0 |
| 11 |
COMP = 1.0E0 + U |
| 12 |
IF (COMP .NE. 1.0E0) GO TO 10 |
| 13 |
D1MACH = U*2.0E0 |
| 14 |
RETURN |
| 15 |
C----------------------- end of function d1mach ------------------------ |
| 16 |
END |