Failure of default_format_1.f90

FX Coudert fxcoudert@gmail.com
Wed Oct 3 20:45:00 GMT 2007


> 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



More information about the Fortran mailing list