X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fgallivm%2Ff.cpp;h=4b33e49b477725b7b353d650afd3d81299c9aa88;hb=48f4baf63f5a50503907e8b0ea475fd1465c0b1d;hp=7cb50f16c0f3c9126c10f34e24741f4121b44636;hpb=d312b224b6759fd9b206d4c19450f6a4dfe53311;p=mesa.git diff --git a/src/gallium/auxiliary/gallivm/f.cpp b/src/gallium/auxiliary/gallivm/f.cpp index 7cb50f16c0f..4b33e49b477 100644 --- a/src/gallium/auxiliary/gallivm/f.cpp +++ b/src/gallium/auxiliary/gallivm/f.cpp @@ -41,11 +41,11 @@ * * and take the coefficients from the P = { ... } array. * - * - To compute log2 5th order polynomial between [1, 2] do: + * - To compute log2 4th order polynomial between [0, 1/9] do: * * variant 1 - * range 1 2 - * order 5 0 + * range 0 0.111111112 + * order 4 0 * step 200 * info * @@ -77,7 +77,7 @@ boost::math::ntl::RR f(const boost::math::ntl::RR& x, int variant) return exp2(x); case 1: - return log2(x)/(x - 1.0); + return log2((1.0 + sqrt(x))/(1.0 - sqrt(x)))/sqrt(x); } return 0;