## real*8

## real*8

(OP)

Can anyone help?

I am trying to recreate some arrays using a subroutine written by someone else. By using real*8 throughout the program I get one set of results, by changing the precision in the subroutine to real at certain functions I get a differnt array resulting. The array I want is the exact average of the two!

Any ideas?

Are there any problems with using a subroutine, written in 77, for a program in CVF.

John

I am trying to recreate some arrays using a subroutine written by someone else. By using real*8 throughout the program I get one set of results, by changing the precision in the subroutine to real at certain functions I get a differnt array resulting. The array I want is the exact average of the two!

Any ideas?

Are there any problems with using a subroutine, written in 77, for a program in CVF.

John

## RE: real*8

By default I only use double precision. When dealing with array manipulation, especially if it involves equation solving then single precision is a non-starter. It is bad practice to have mixed precision expressions, just because the result may be stored in a double precision variable doesn't mean you have double precision accuracy if it was calculated using single precision variables.

How do you know the result that you want? Are you trying to match results made years ago on a different computer system?

There should be no problem in using F77 with any later standard of Fortran.

## RE: real*8

I am trying to match results done a few years ago (1987), but I beleive these to be accurate as they correspond to other results.

Also, the two matrices I get by varying the precision have the same amount of error when compared to the origional, only in different directions.

## RE: real*8

## RE: real*8

Your results are dependant on several things. The particular computer used, CPU and possibly other hardware also, the operating system used, the fortran compiler used and the compiler switches which were set when you compiled the program. And last of all... the program code itself. How can you be SURE that the routines logic is sound????

Dan

www.dtware.com

## RE: real*8

TTFN