1827491 Members
2383 Online
109965 Solutions
New Discussion

F90 precision problem

 
Jennifer Middleton
New Member

F90 precision problem

I am using F90 on HP-UX 10.20. When I assign values to a double precision array using a data statement, the values are changed slightly. i.e 0.040 becomes .0399999910593033. This slight change is actually affecting the output. This same program did not have this problem in F77. Is this a known F90 bug?
3 REPLIES 3
linuxfan
Honored Contributor

Re: F90 precision problem

Hi Jennifer,

Do you have any patches for fortran or libcl?
There is a patch PHSS_15255(Description says)
1. Fortran formatted real output has a generic accuracy problem caused by sometimes rounding a formatted value twice. This can result in a formatted value that is too large.

You can try installing the latest patch for libcl PHSS_22652 to fix this problem

Also not sure if you already have the fortran90 cumulative patch (PHSS_13307)

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
Jennifer Middleton
New Member

Re: F90 precision problem

Thanks, I loaded the patches but unfortunately I still have the same problem.
linuxfan
Honored Contributor

Re: F90 precision problem

Hi Jennifer,

which version of fortran are you using?

HP recommends
s700_800 10.X FORTRAN 90 1.0 cumulative patch(PHSS_13307)
s700_800 10.20 Fortran90 B.10.20.16 Cumulative Patch(PHSS_20205)
s700_800 10.X Fortran90 B.10.20.(19|20|27) cumulative patch(PHSS_23952)

We don't use Fortran so my knowledge is limited, hoping someone else can help you out here.

-Regards
Ramesh
They think they know but don't. At least I know I don't know - Socrates