The FTN 95 does not seem to have implemented epsilon. Intel FORTRAN 9.0 does. Any idea if this is going to implemented. Or is it there in the paid version. Thanks.
Pradip Sagdeo
Welcome to our forums
The FTN 95 does not seem to have implemented epsilon. Intel FORTRAN 9.0 does. Any idea if this is going to implemented. Or is it there in the paid version. Thanks.
Pradip Sagdeo
I am not familiar with the Intel Fortran epsilon. It is not Standard Fortran and it is not implemented in any version of FTN95.
There is a Fortran 90 standard intrinsic called EPSILON that is available and gives
EPSILON(X) = b ** (1-p)
where ** means 'raised to the power' b is the base used by the processor p is the number of significant digits in X.
I tried to use it, but did not get the expected result. It did however function correctly under the INTEL compiler. Hence the question. Thanks.
Pradip
If you are saying that the standard intrinsic EPSILON is not giving the expected result could you post sample code together with the result and the result you expect.
Thanks.
Yes, will do that as soon as I finish the business at hand. Thanks.
Pradip
Pradip,
Do you have the correct kind value for your real variables ? You may have a more extensive error with differing default kinds.
program test real4 x4 real8 x8 real10 x10 write (,) 'real4', epsilon (x4) write (,) 'real8', epsilon (x8) write (,) 'real10', epsilon (x10) end program test
gives:
Program entered
real4 1.192093E-07
real8 2.220446049250E-16
real*10 1.08420217248550444E-19
What were you expecting ?
John