Double Precision


udaykgiri
07-16-2002, 04:08 PM
I heard NR2DP.exe is the file to convert the existing code to double precision. Will this work on fortran programs which contain these subroutines or is it that we need to have the fortran file with only the subroutine and nothing else ?

I am actually confused about this because, the documentation (as I have it in my MSdeveloper studio help file) is as follows:

"Note that this routine works only on Numerical Recipes routines (Recipes and Example programs), not on general FORTRAN programs, because it assumes certain typographical and stylistic conventions that the Numerical Recipes routines strictly follow."

Also, where do I get this exe file from ?

uday.

mathwiz
09-27-2002, 10:07 PM
Well, I don't know where you can get the program, but the data file that it uses is at
http://www.nr.com/utils/NR2DP.DAT.txt

I bet you could write your own little script to use that data file, but I'm sure it only works on EXACTLY the NR code files.

Good luck!

Foster Morrison
07-06-2005, 08:51 AM
There is an easier way to do this than running that executable. Just insert the type statement:

REAL*8(A-H,O-Z)

at the beginning of the prgram or subroutine or function. You then want to do a global replacement for any built-in functions, as DSIN() for SIN(). This is only moderately tedious, but it all can be done in something like WordPad. And it works for any coding style.

They're may be some changes in the details in version past Fortran 77; I am not sure. Good Luck!