Commit 2d261a56 by Nicolas Capens Committed by Nicolas Capens

Fix exp2 for integer input.

exp2(x) should be exact for integer values of x. For example exp(1.0) should produce 2.0. Change-Id: I9d6d1d388c23e813e09b7b5788c929ff07189357 Reviewed-on: https://swiftshader-review.googlesource.com/16188Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent cb302f92
......@@ -139,7 +139,7 @@ namespace sw
x1 *= x0;
x1 += As<Float4>(Int4(0x3F31727B)); // 6.9315308e-1f
x1 *= x0;
x1 += As<Float4>(Int4(0x3F7FFFFF)); // 9.9999994e-1f
x1 += Float4(1.0f);
x1 *= As<Float4>(x2);
return x1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment