This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

dble intrinsic behavior


While checking intrinsics I was looking into the behavior of dble:

cat dble.f90
program test_dble
    integer :: i = 12
    real :: r = 3.14
    print *, i
    print *, r
    print *, dble(i)
    print *, dble(r)
end program test_dble
./a.out
          12
   3.140000
   12.0000000000000
   3.14000010490417

This does not seem right to me. It seems to be only doing a type conversion rather than actually converting the internal to a kind=8. When I went browsing the code I find reference to a __dble_ function but I can not locate where this is implemented.

If this is a problem I would like to see if I can fix it (point me in right direction). If it is not a problem I would sure appreciate knowing why it isn't.

Regards,

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]