This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libgfortran] PR32446 F0.n output format fails with large numbers


Hi Jerry,

Jerry DeLisle wrote:
> Regression tested on x86-64-pc-Gnu/Linux.
> Test case included.
> OK for trunk?
Ok.

Tobias

Post scriptum:

I find the following quite puzzling. For "print '(F0.1)',huge(1.0)",
gfortran prints:
  340282346638528859811704200000000000000.0
whereas ifort prints
  340282346638528859811704183484516925400.0
and NAG, Sun, g95 print:
  340282346638528859811704183484516925440.0
which matches the exquation/tree-dump:
huge = ((1-(1/2)^24)2^128) = 340282346638528859811704183484516925440

Reading any of these numbers with any of these compilers gives huge(r)
thus one should probably not worry much about it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]