[patch, libgfortran] PR32446 F0.n output format fails with large numbers
Jerry DeLisle
jvdelisle@verizon.net
Sun Jun 24 18:31:00 GMT 2007
Tobias Burnus wrote:
> 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.
>
I noticed this too. It is sort of absurd to carry all those digits for a single
precision number. Maybe the other compilers are using a double internally.
Thanks for review.
Jerry
More information about the Fortran
mailing list