dble intrinsic behavior

Jerry DeLisle jvdelisle@verizon.net
Sat May 28 19:12:00 GMT 2005


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



More information about the Fortran mailing list