This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH/gfortran] Fix rounding in constant folding
Steve Kargl wrote:
>>In order of increasing probability: Does mpfr round incorrectly? Do we do
>>something wrong? Or am I being stupid?
Further investigation proved the last of these options to be the case.
So I suggest you use "nearest (0.5, -1.)" for the small value, and something like
scale (16., int (precision (1.) / log10 (2.))) + 1.
(this just gives Geert's number, but the criterion for creating it is "large
odd integral value with all floating point digits significant" for the larger
one.)
Sorry for the noise,
- Tobi