: .
l-o-n-g, FORTRAN, , HUGE(), . Intel Linux gfortran 4.1.2. , -fdefault-integer-8, 64- . , :
program inttest
print *, huge(1)
end program inttest
$gfortran inttest.for
, :
2147483647
:
$gfortran -fdefault-integer-8 inttest.for
, :
9223372036854775807
, integer * 8 -fdefault-integer-8, . :
program inttest2
integer*8 test_int
test_int = 9223372036854775807
print *, test_int
end program inttest2
$gfortran inttest2.for
inttest.for: 4
test_int = 9223372036854775807
1
: (1)
However, it worked when I compiled with the -fdefault-integer-8 option and I got an executable that printed
9223372036854775807
There may be other gfortran options that would be helpful, but I have not explored yet.
Of course, this still does not give you 10 ^ 14, but it can help explain the results that you saw.
source
share