Re: busting sp datatypes





glen herrmannsfeldt wrote:

(snip)

KIND(0) will be the appropriate KIND for default
(single precision) integer. (Though integer data is
not usually described as single and double precision.)

There may not be a standard way to generate a double
length integer variable.

what about using selected_int_kind?

$ cat int.f90
program int
implicit none
integer :: i
do i = 1,20
print *, i, selected_int_kind(i)
end do
end program int

This should show you what you need for a double length integer.
Here, it gives: 1,2,4, and 8. 4 is the one you get with a default
integer.

Wim

-- glen
.



Relevant Pages

  • Re: busting sp datatypes
    ... (Though integer data is ... implicit none ... end program int ...
    (comp.lang.fortran)
  • Re: Why zero is represented by an extremely small value?
    ... glen herrmannsfeldt wrote: ... If you zeroed out the bits of a single precision number and then printed it as a double, what would be the largest number you would expect? ... Even reading the operating instructionsand wearing protective equipment doesn't prevent some folks from sawing their fingers off. ...
    (comp.lang.fortran)
  • Re: Precision of literal real constants, parameters, and Fortran ??standard
    ... glen herrmannsfeldt wrote: ... < I think that I am aware of the implication of optimizations. ... I thought I remembered some rule relating to single precision ... variables a compiler was allowed to supply extra precision ...
    (comp.lang.fortran)