Make default double precision in g77, Fortran compiler

Is there an analogue of the -fdefault-real-8 gfortran option (GNU Fortran 95 compiler) to g77 (GNU Fortran 77 compiler)? This parameter sets the actual default type for the 8-byte wide type.

I currently have code where arithmetic with one precision limits my accuracy, and therefore I need double precision. (These are not just intermediate values ​​that I want to be double precision, this is the FPU flag, I want everything to be double precision.) I know that I have other approaches (using gfortran, using other compilers or changing all REAL on DOUBLE PRECISION), but they are not ideal for my situation.

So, is there a way to set the real default type for double precision, namely 8 bytes wide, in g77?

+3
source share
2 answers

If you cannot find the flag in the man pages, you can try macroC # define.

#define REAL DOUBLE PRECISION
+1
source

Since a lot of FORTRAN 77 is still legal, is it possible to use gfortranFORTRAN 77 to compile your code and provide a parameter -fdefault-real-8?

0
source

Source: https://habr.com/ru/post/1702176/


All Articles