This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] PR libfortran/21376
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org,Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Date: Mon, 23 May 2005 20:33:34 +0200
- Subject: Re: [gfortran] PR libfortran/21376
- References: <4290D077.email@example.com> <4291128F.firstname.lastname@example.org> <email@example.com>
FX Coudert wrote:
>>How about this slightly simpler patch which collects all the special cases in
>>one place. Bubblestrapped and tested, OK for 4.0 and mainline?
> I already committed the patch Steve approved.
Not on the mailing list.
> Of course, that doesn't
> mean we can do something better!
>>! if (value == 0 || (value < 100 && value > 0.01))
>> edigits = 2;
>>! edigits = 1 + (int) log10 (fabs (log10 (value)));
> No, the limits are not 100 and 0.01. They are 10^100 10^-100. And, I
> don't know why, but I don't like float comparisons with such high values ;-)
*Blush* well, yes. Reminds me to never have the final look at a patch late at
night :-( I agree that the patch is the easiest way to do this then, you
should add a testcase for it, though. The testcase I posted is not good
enough given that I got the exponents of the corner cases wrong.
Another issue is that your patch is only superficially different from the one
Peter Wainwright suggested when he filed the PR, so you should probably add
his name to the ChangeLog entry.