This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gfortran] patch for pr12839 / F2003 format of Inf and NaN


> Change Log:
>
> 2004-06-06  Bud Davis  <bdavis9659@comcast.net>
>
> 	PR gfortran/12839
> 	* format.c (write_float): format inf and nan IAW F2003

Ok. (the version that uses memcpy)
Don't forget the changelog entry for the testcase.

> !pr 12839- F2003 formatting of Inf /Nan
>        implicit none
>        character*40 l
>        character*12 fmt
>        logical debug
>        data debug /.FALSE./

I'd prefer it if the debug code were removed. It makes a significant 
difference to the compile time for the test (~50% slower).

>        real zero, pos_inf, neg_inf, nan
>        zero = 0.0
>        pos_inf =  1.0/zero
>        neg_inf = -1.0/zero
>        nan = zero/zero

We need a better way of generating inf/nan. We don't currently have one, so 
please add a comment to that effect.

Paul


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