Lahey Support
08-15-2003, 12:19 AM
Dear All:
I wrote a small code and met some strange things...
program test
implicit none
real :: a
a = .123456
a = a*10**10
WRITE(*,*) a
...
stop
end program test
The code replied me a strange # to a as: 0.174081E+09
What's wrong with that? How to solve it out? By the way,
if I use
a = a*10**9
WRITE(*,*) a ! <-- get 0.123456E+09
or
WRITE(*,*) .123456*10.**10 ! <-- get 0.123456E+10
They worked well.
Thanks
Cosine
Jan/23/1999 UT
__________________________________________________ ____
Get Your Private, Free Email at http://www.hotmail.com
I wrote a small code and met some strange things...
program test
implicit none
real :: a
a = .123456
a = a*10**10
WRITE(*,*) a
...
stop
end program test
The code replied me a strange # to a as: 0.174081E+09
What's wrong with that? How to solve it out? By the way,
if I use
a = a*10**9
WRITE(*,*) a ! <-- get 0.123456E+09
or
WRITE(*,*) .123456*10.**10 ! <-- get 0.123456E+10
They worked well.
Thanks
Cosine
Jan/23/1999 UT
__________________________________________________ ____
Get Your Private, Free Email at http://www.hotmail.com