1.0d0 stored as integer?
- From: David Gunter <dogunter@xxxxxxxxx>
- Date: Wed, 28 May 2008 17:25:16 -0600
I am trying to come up with an explanation for the following behavior. Setting a real*8 variable to 1.0d0 somehow creates a memory allocation in which only the single digit "1" is stored. Can anyone explain why?
Thanks.
-david
! gdb will not display all digits of the variable x1
! When run, the output is:
! x1: 1.00000000000000
! x2: 1.12345678901235
!
! But in gdb or totalview, only "1" is displayed:
! Local variables:
! x2: 1.12345678901235
! x1: 1
program test1
real*8 :: x1, x2
x1 = 1.0d0
x2 = 1.1234567890123456789d0
write(*,*) "x1: ", x1
write(*,*) "x2: ", x2
end program test1
.
- Follow-Ups:
- Re: 1.0d0 stored as integer?
- From: glen herrmannsfeldt
- Re: 1.0d0 stored as integer?
- From: Richard Maine
- Re: 1.0d0 stored as integer?
- Prev by Date: Re: Gfortran 4.4 binary (OpenMP and 64bit capability) for PPC Tiger
- Next by Date: Re: Fortran 90 Chess
- Previous by thread: Slick or Slack
- Next by thread: Re: 1.0d0 stored as integer?
- Index(es):
Relevant Pages
|
|