Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND, v2

2011-08-09 Thread Roland Scheidegger
This looks like the right approach to me. Note that RNDNE is in fact the default rounding mode for IEEE_754-2008 (in fact it was the default for earlier ieee-754 too). So I see no reason to deviate from that unless there would be some very good reason, even if it may look "wrong" for humans. Rolan

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-08 Thread Lauri Kasanen
> > On 8 August 2011 03:58, Jose Fonseca wrote: > > > It's subjective. It depends on the expected input distribution, > > > which is effectively impossible to characterize in general. One > > > can easily find datasets where one method gives biased results and > > > the other not, and vice versa.

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-08 Thread Jose Fonseca
- Original Message - > On 8 August 2011 03:58, Jose Fonseca wrote: > > It's subjective. It depends on the expected input distribution, > > which is effectively impossible to characterize in general. One > > can easily find datasets where one method gives biased results and > > the other

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Henri Verbeet
On 8 August 2011 03:58, Jose Fonseca wrote: > It's subjective. It depends on the expected input distribution, which is > effectively impossible to characterize in general. One can easily find > datasets where one method gives biased results and the other not, and vice > versa. And if one takes

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Jose Fonseca
- Original Message - > On 8 August 2011 02:24, Jose Fonseca wrote: > > There's no "wrong" or "right" when there are two equidistant > > integers -- it's all a matter of convention. > > > But note that rounding to nearest even is a slightly better > convention > in terms of rounding bias. I

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Henri Verbeet
On 8 August 2011 02:24, Jose Fonseca wrote: > There's no "wrong" or "right" when there are two equidistant integers -- it's > all a matter of convention. > But note that rounding to nearest even is a slightly better convention in terms of rounding bias. I.e., not using RNDNE is both likely to be

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Jose Fonseca
- Original Message - > On Sun, 7 Aug 2011 19:22:06 +0200 > Henri Verbeet wrote: > > > On 7 August 2011 19:03, Lauri Kasanen wrote: > > > +       /* floor(a + 0.5) */ > > Why not use RNDNE? > > I feel it would cause more "wrong" results, with two numbers > resolving to the same (3.5 = 4.

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Lauri Kasanen
On Sun, 7 Aug 2011 19:22:06 +0200 Henri Verbeet wrote: > On 7 August 2011 19:03, Lauri Kasanen wrote: > > +       /* floor(a + 0.5) */ > Why not use RNDNE? I feel it would cause more "wrong" results, with two numbers resolving to the same (3.5 = 4.5 = 4). Of course for best rounding one could

Re: [Mesa-dev] [PATCH] r600g: Add support for ROUND

2011-08-07 Thread Henri Verbeet
On 7 August 2011 19:03, Lauri Kasanen wrote: > +       /* floor(a + 0.5) */ Why not use RNDNE? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev