Re: [PATCH] Builtin function roundeven folding implementation

2019-08-25 Thread Martin Jambor
Hi, On Sun, Aug 25 2019, Tejas Joshi wrote: > I have made the respective changes and fixed the indentations and it > passes the testing. Great, please send the patch (to me and to the mailing list too), so that I can commit it. Thanks, Martin

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-25 Thread Tejas Joshi
I have made the respective changes and fixed the indentations and it passes the testing. > I encourage a followup looking for and fixing further places in the source > tree that handle round-to-integer function families (ceil / floor / trunc > / round / rint / nearbyint) and should handle roundeve

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-22 Thread Joseph Myers
On Thu, 22 Aug 2019, Tejas Joshi wrote: > > I think you should have at least four tests of sign of zero result > > (arguments -0.5, -0.0, 0.0 and 0.5). Probably also tests of values > > between +/- 0.5 and 0, e.g. test -0.25 and 0.25 as well. > > Okay, I have made the following changes and again

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-22 Thread Tejas Joshi
> I think you should have at least four tests of sign of zero result > (arguments -0.5, -0.0, 0.0 and 0.5). Probably also tests of values > between +/- 0.5 and 0, e.g. test -0.25 and 0.25 as well. Okay, I have made the following changes and again, the tests pass for roundeven. void real_roundeve

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-22 Thread Joseph Myers
On Thu, 22 Aug 2019, Tejas Joshi wrote: > > I'm concerned that this would produce +0.0 for an argument of -0.5 (via > > -0.5 - 0.5 - -1.0 producing +0.0) when it needs to produce -0.0. > > Would the following overhaul be acceptable as the condition is > specialized for -0.5 and +0.5 only. This se

Re: [PATCH] Builtin function roundeven folding implementation

2019-08-22 Thread Tejas Joshi
> I'm concerned that this would produce +0.0 for an argument of -0.5 (via > -0.5 - 0.5 - -1.0 producing +0.0) when it needs to produce -0.0. Would the following overhaul be acceptable as the condition is specialized for -0.5 and +0.5 only. This seems to solve the problem. I did test the roundeven