HP Fortran question: precision of double-precision? 
Author Message
 HP Fortran question: precision of double-precision?

[ Please note the Reply-To; I'm posting this for a friend ... ]

--------begin included text------------------------------------------
In a fortran application program under HPUX 9.01, we have an
iteration loop that needs to converge to very tight tolerances.
The independent variable is of the order of 30 and the convergence
criteria needs to be about 1.D-11.  The whole program has
declared all floating point variables to be double precision so,
according to the HP Fortran manual, we should get over 15 significant
figures of accuracy.  In checking this loop, however, it looks like
we're converging to about 9 significant digits and the remaining
6 are junk.  As expected, the loop frequently does not converge.

So the questions are: Are we doing something wrong?  Is HP Fortran
doing something wrong (it happens both with -O and -g turned on, so
it doesn't seem to be sensitive to optimization)?  How can we find
out what's going on?  Other pertinent information - we have both
the -K and +T switches turned on.

Thanks.

Bill Steer
--------end included text------------------------------------------

Thank you.
- Chuck
--




Tue, 03 Sep 1996 00:46:42 GMT  
 HP Fortran question: precision of double-precision?

Quote:
>--------begin included text------------------------------------------
>In a Fortran application program under HPUX 9.01, we have an
>iteration loop that needs to converge to very tight tolerances.
>The independent variable is of the order of 30 and the convergence
>criteria needs to be about 1.D-11.  The whole program has
>declared all floating point variables to be double precision so,
>according to the HP Fortran manual, we should get over 15 significant
>figures of accuracy.  In checking this loop, however, it looks like
>we're converging to about 9 significant digits and the remaining
>6 are junk.  As expected, the loop frequently does not converge.

[...]

My first suspicion would be that you are being bitten by roundoff error,
either by unlucky combination of terms or for a mathematical reason.
Don't forget, for example, that if you look for a quadratic minimum, the
best relative accuracy you can hope for is 1+sqrt(eps), where 1+eps is
the smallest number > 1 which can stil be represented on your machine.
--

The joy of engineering is to find a straight line on a double
logarithmic diagram.



Tue, 03 Sep 1996 17:40:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Double precision runs fast tan single precision in MS Fortran

2. Convert single precision to double precision

3. double precision vs. single precision

4. single precision or double precision?

5. Fortran 90 DOUBLE PRECISION

6. Compaq Fortran double precision complex intrinsics problem

7. fortran double precision in linux on pc

8. double precision fortran code made by maple

9. Fortran 90 double precision issues?

10. Double precision Fortran on Sun-4

11. double precision difference between matlab and fortran 90

12. Newbie question about double precision

 

 
Powered by phpBB® Forum Software