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

Kenneth Graunke kenneth at whitecape.org
Wed Jul 27 17:15:03 PDT 2011

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 32 bits.
> Fixes piglit tests {fs,vs}-radians-{float,vec2,vec3,vec4}.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

More information about the mesa-dev mailing list