Re: [Mesa-dev] [PATCH] nir/algebraic: Remove imprecise flog2 optimizations

2016-06-20 Thread Jason Ekstrand
On Mon, Jun 20, 2016 at 11:08 AM, Matt Turner wrote: > On Sat, Jun 18, 2016 at 12:42 PM, Jason Ekstrand > wrote: > > While mathematically correct, these two optimizations result in an > > expression with substantially lower precision than the original. For any > > positive finite floating-point

Re: [Mesa-dev] [PATCH] nir/algebraic: Remove imprecise flog2 optimizations

2016-06-20 Thread Matt Turner
On Sat, Jun 18, 2016 at 12:42 PM, Jason Ekstrand wrote: > While mathematically correct, these two optimizations result in an > expression with substantially lower precision than the original. For any > positive finite floating-point value, log2(x) is well-defined and finite. > More precisely, it

[Mesa-dev] [PATCH] nir/algebraic: Remove imprecise flog2 optimizations

2016-06-18 Thread Jason Ekstrand
While mathematically correct, these two optimizations result in an expression with substantially lower precision than the original. For any positive finite floating-point value, log2(x) is well-defined and finite. More precisely, it is in the range [-150, 150] so any sum of logarithms log2(a) + lo