https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109008

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #16)
> (In reply to Jakub Jelinek from comment #14)
> > Created attachment 54599 [details]
> > gcc13-pr109008-wip.patch
> > 
> > I have now this WIP but it doesn't work correctly yet, need to debug it now,
> > just finished writing it and making it compile.
> > Note, after the binary search it is still unfinished, I'd like to then
> > adjust it one bit at a time to narrow it further.  But before working on
> > that it needs to work correctly.
> 
> Looks nicer and more precise (even though the iterating function is ugly
> and you also suffer from the lack of copying of alternate range state,
> but using .union () is a way out here I guess ;)).

I thought the union_ handles it.  I didn't want to simply override the lower or
upper bound on r, because frange::set has various canonicalizations and the
like.

> Can we ignore -frounding-math here?

I believe it isn't ignored, -frounding-math ought to be taken into account in
frange_arithmetic.  The intent was that the testing function/lambda would e.g.
for the
addition when extending lower bound perform rounding etc. towards +inf and when
extending upper bound towards -inf.
But as I said, the patch currently doesn't work correctly, the test on the
nextafter
value at the start of the new function fails even when I'd think it should
pass.

Reply via email to