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: [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


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