[PATCH] libgfortran/28354 - 0.99999 printed as 0. instead of 1. by format(f3.0)

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Aug 28 04:48:00 GMT 2006


On Sun, Aug 27, 2006 at 08:47:19PM -0700, Jerry DeLisle wrote:
> :ADDPATCH fortran:
> 
> The attached patch fixes this PR by adjusting the real value prior to 
> processing to get the correct output when processed through the 
>  formatting.  I was pursuing catching this special case further down in the 
> code and modifying the handling of the nbefore, nafter, nzero, etc 
> variables that define the output. This was working mostly when I discovered 
> I would have to special case the rounding as well.  Then it occurred to me 
> to handle that before all the processing and this gave a much cleaner fix.
> 
> Regression tested and NIST tested.  New test case included.
> 
> OK for trunk 4.2?  and 4.1 later?
> 
> Regards,
> 
> Jerry
> 
> 2006-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
> 
> 	PR libgfortran/28354
> 	* io/write.c: Check for special case of zero precision in format
> 	and pre-round the real value.


OK.

Those damn trees!

-- 
Steve



More information about the Fortran mailing list