Author: Gerd Isenberg
Date: 06:47:10 09/17/03
Go up one level in this thread
A colleague tried a VMS-Fortran portation with 128-bit real:
Program FindGoodReciConst
implicit none
REAL*16 C
REAL*16 C1
REAL*16 C2
REAL*16 EM
INTEGER*8 I
INTEGER*8 IMAX
INTEGER*8 I1
C = 2.0**64 - 1.0D0
EM = 1.0E-3
IMAX = 2**16 - 1
DO I = 2, IMAX
C1 = ( C + I ) / I
I1 = C1
IF ( ( ( C1 - EM ) .LT. I1 ) .AND. ( I1 .LT. ( C1 + EM ) ) ) THEN
C TYPE * , I,I1
WRITE ( * , 6010 ) I , I1
6010 FORMAT(' ', I,Z)
ENDIF
ENDDO
STOP
END
Some output of this program,
reciprocal hexadecimal 64-bit constants close to 64K:
.....
63960 1064ED5513C1B
64050 105F079E386B9
64350 104B7DBC83589
64477 1043464BCB8B1
64545 103EE372781F1
64575 103CF4D30C411
64687 1035C2495533A
64779 102FDD8A195D1
64897 102854AB57AFF
64944 10255657AABAE
65026 10201FFFBF7F9
65077 101CE3CC6F8C1
65100 101B6EB892595
65520 1001001001002
65534 1000200040009
65535 1000100010002
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.