Re: [Mesa-dev] [PATCH] glsl: improve the accuracy of the radians() builtin function

2011-07-27 Thread Kenneth Graunke
On 07/27/2011 11:08 AM, Paul Berry wrote: > The constant used in the radians() function didn't have enough > precision, causing a relative error of 1.676e-5, which is far worse > than the precision of 32-bit floats. This patch reduces the relative > error to 1.14e-9, which is the best we can do in

[Mesa-dev] [PATCH] glsl: improve the accuracy of the radians() builtin function

2011-07-27 Thread Paul Berry
The constant used in the radians() function didn't have enough precision, causing a relative error of 1.676e-5, which is far worse than the precision of 32-bit floats. This patch reduces the relative error to 1.14e-9, which is the best we can do in 32 bits. Fixes piglit tests {fs,vs}-radians-{flo