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: Failure of default_format_1.f90


2.22507385850710652E-308
                ^^^
There are garbage.

One can either check /usr/include/float.h of the expected
number of decimal digits or use real_info->precision to
determine a desirable value.

OK, with Dominique's remark, I see what you mean.


Yes, the last few digits of denormalized output with default format are not significant. We use a per-kind fixed-width default format, and it needs to be that wide for some numbers close to 1. Then, we call printf() and ask for that many digits, and it's its choice what it gives us; in freebsd's case, as in linux's case, it gives us garbage extra digits. Changing that behaviour would require significant changes in the library unless, of course, there is an easy way to do it and I'm simply not seeing it.

FX


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