Closed tueda closed 5 years ago
This was just brought up in a different way. A complaint that in expressions like 2/(5+4n) the integers are printed as integers while here it was preferred as 2.D0/(5.D0+2.D0n). In the versions of 2014 and before this is what it does. Maybe the best solution is to make a flag that can be set with on/off to select which of these two systems one prefers. Any comments?
It seems that in the code there is an option pfortran which is undocumented. It is a bit different in representations, but still not completely sane. It looks like the code there needs at least some commentary and an extension
OK, at least 087a772e613db4c75293a99c2b0c4491a85303ab can give all-floating-point-number output for DoubleFortran
and QuadrupleFortran
. Now
Format Fortran;
1./2. + 2*x
Format DoubleFortran;
1.D0/2.D0 + 2*x
Format DoubleFortran;
Format allfloat;
1.D0/2.D0 + 2.D0*x
Format QuadrupleFortran;
1.Q0/2.Q0 + 2*x
Format QuadrupleFortran;
Format allfloat;
1.Q0/2.Q0 + 2.Q0*x
Format Fortran90,.0_wp;
1.0_wp/2.0_wp + 2.0_wp*x
Other combinations or different ordering would give output that the user may not expect.
I know that for
Format Fortran
(andDoubleFortran
,QuadFortran
) an integer coefficient is not translated to a floating-point number (the second term in the following example):but this is not the case for
Fortran90
: