Re: [PATCH] range-op-float: frange_arithmetic tweaks for MODE_COMPOSITE_P

2022-12-07 Thread Aldy Hernandez via Gcc-patches
On 12/7/22 16:31, Jakub Jelinek wrote: On Wed, Dec 07, 2022 at 04:21:09PM +0100, Aldy Hernandez wrote: On 12/7/22 13:10, Jakub Jelinek wrote: + switch (code) + { + case PLUS_EXPR: + case MINUS_EXPR: + // ibm-ldouble-format

Re: [PATCH] range-op-float: frange_arithmetic tweaks for MODE_COMPOSITE_P

2022-12-07 Thread Jakub Jelinek via Gcc-patches
On Wed, Dec 07, 2022 at 04:21:09PM +0100, Aldy Hernandez wrote: > On 12/7/22 13:10, Jakub Jelinek wrote: > > + switch (code) > > + { > > + case PLUS_EXPR: > > + case MINUS_EXPR: > > + // ibm-ldouble-format documents 1ulp for + and -. > > +

Re: [PATCH] range-op-float: frange_arithmetic tweaks for MODE_COMPOSITE_P

2022-12-07 Thread Aldy Hernandez via Gcc-patches
On 12/7/22 13:10, Jakub Jelinek wrote: Hi! As mentioned in PR107967, ibm-ldouble-format documents that +- has 1ulp accuracy, * 2ulps and / 3ulps. So, even if the result is exact, we need to widen the range a little bit. The following patch does that. I just wonder what it means for reverse

[PATCH] range-op-float: frange_arithmetic tweaks for MODE_COMPOSITE_P

2022-12-07 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in PR107967, ibm-ldouble-format documents that +- has 1ulp accuracy, * 2ulps and / 3ulps. So, even if the result is exact, we need to widen the range a little bit. The following patch does that. I just wonder what it means for reverse division (the op1_range case), which we impl