Hi there,
My environment is Oracle VM (Ubuntu)==>GFortran.
I have a problem with my GFortran. I have an
input file (anglesV1.dat) with two columns of numbers:
Code:
0.7439803D-01 0.1107149D+01
0.7321435D-01 0.1099019D+01
0.7203546D-01 0.1090621D+01
0.7086159D-01 0.1081944D+01
0.6969303D-01 0.1072974D+01
0.6853005D-01 0.1063698D+01
0.6737297D-01 0.1054101D+01
0.6622212D-01 0.1044169D+01
Then I run a subroutine that reads them and prints them on the screen:
Code:
subroutine determinant
real*8 :: phi,theta
integer*4 :: counter
open (unit=1,file='anglesV1.dat', status='old')
counter = 0
10 FORMAT (2F12.5)
do while (counter .lt. 20)
counter = counter + 1
read (1,10) theta,phi
write (6,10) theta,phi
enddo
close(unit=1)
end subroutine determinant
This is what I get in the terminal:
Code:
0.74398 -10.11071
0.73214 -10.10990
0.72035 -10.10906
0.70862 -10.10819
0.69693 -10.10729
0.68530 -10.10636
0.67373 -10.10541
0.66222 -10.10441
I don't understand the result. In the first column all exponents are -1. It means that the numbers (mantissas) must be multiplied by 10 to the power -1, meaning it is 1/10, correct? So when I use F12.6 format the numbers in the first column should come out like this:
Code:
0.074398
0.073214 etc.,
In the second column the exponents are +1 meaning that the mantissas should be multiplied by 10.0, that is:
Why do I have negative sign in the output for the second column?
Please help, thanks.