Hallo,
i have a problem while reading real number in fortran. here i am converting a character into a real number by reading it in. while the value of 'F' is equal to '0.01' in the text file, when I read this in it shows a value of '9.99999998E-03',. i want that this should have value of '0.01' in the memory. following is the part of code.
character :: value*20
real :: F
value='0.01'
value=trim(value)
READ (value,*) F
please anyone can help me out!!!
i have a problem while reading real number in fortran. here i am converting a character into a real number by reading it in. while the value of 'F' is equal to '0.01' in the text file, when I read this in it shows a value of '9.99999998E-03',. i want that this should have value of '0.01' in the memory. following is the part of code.
character :: value*20
real :: F
value='0.01'
value=trim(value)
READ (value,*) F
please anyone can help me out!!!