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: Inline round for IA64


On Thu, Apr 07, 2005 at 01:41:21PM -0400, Geert Bosch wrote:
> On Apr 7, 2005, at 13:27, Steve Kargl wrote:
> >Try -fdump-parse-tree.  You've given more digits in y than
> >its precision.  This is permitted by the standard.  It appears
> >the gfortran frontend is taking y = 0.499999 and the closest
> >representable nubmer is y = 0.5.
> 
> So, why does the test y < 0.5 yield true then?

I missed that part of the output.  The exceeding
long string of digits caught my attention.  Can
you submit a PR?  The problem, I believe, is in
gfc_simplify_nint where it indeed does the adding
and substraction of 0.5 depending on the sign of
y and truncation.  I converted gfortran to use MPFR,
and I missed the opportunity to clean up this function.

-- 
Steve


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