[Libclc-dev] [PATCH 1/4] pow: Port from amd_builtins

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Wed Jan 17 09:47:31 PST 2018


Passes piglit on turks and carrizo
fp64 passes CTS on carrizo

v2: fix formatting
    check fp32 denormal support at runtime

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generic/include/clc/math/pow.h     |  11 +-
 generic/include/math/clc_pow.h     |   5 +
 generic/lib/SOURCES                |   2 +
 generic/lib/math/clc_pow.cl        | 408 +++++++++++++++++++++++
 generic/lib/math/clc_sw_binary.inc |   9 +
 generic/lib/math/pow.cl            |   7 +
 generic/lib/math/tables.cl         | 657 +++++++++++++++++++++++++++++++++++++
 generic/lib/math/tables.h          |   3 +
 8 files changed, 1096 insertions(+), 6 deletions(-)
 create mode 100644 generic/include/math/clc_pow.h
 create mode 100644 generic/lib/math/clc_pow.cl
 create mode 100644 generic/lib/math/clc_sw_binary.inc
 create mode 100644 generic/lib/math/pow.cl

diff --git a/generic/include/clc/math/pow.h b/generic/include/clc/math/pow.h
index 320d341..911ef80 100644
--- a/generic/include/clc/math/pow.h
+++ b/generic/include/clc/math/pow.h
@@ -1,6 +1,5 @@
-#undef pow
-#define pow __clc_pow
-
-#define __CLC_FUNCTION __clc_pow
-#define __CLC_INTRINSIC "llvm.pow"
-#include <clc/math/binary_intrin.inc>
+#define __CLC_FUNCTION pow
+#define __CLC_BODY <clc/math/binary_decl_tt.inc>
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
diff --git a/generic/include/math/clc_pow.h b/generic/include/math/clc_pow.h
new file mode 100644
index 0000000..adf6ee5
--- /dev/null
+++ b/generic/include/math/clc_pow.h
@@ -0,0 +1,5 @@
+#define __CLC_FUNCTION __clc_pow
+#define __CLC_BODY <clc/math/binary_decl_tt.inc>
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
index f5840ee..063552f 100644
--- a/generic/lib/SOURCES
+++ b/generic/lib/SOURCES
@@ -138,6 +138,8 @@ math/native_tan.cl
 math/tables.cl
 math/clc_nextafter.cl
 math/nextafter.cl
+math/clc_pow.cl
+math/pow.cl
 math/pown.cl
 math/sin.cl
 math/sincos.cl
diff --git a/generic/lib/math/clc_pow.cl b/generic/lib/math/clc_pow.cl
new file mode 100644
index 0000000..fc82df3
--- /dev/null
+++ b/generic/lib/math/clc_pow.cl
@@ -0,0 +1,408 @@
+/*
+ * Copyright (c) 2014 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include <clc/clc.h>
+
+#include "config.h"
+#include "math.h"
+#include "tables.h"
+#include "../clcmacro.h"
+
+/*
+ compute pow using log and exp
+ x^y = exp(y * log(x))
+
+ we take care not to lose precision in the intermediate steps
+
+ When computing log, calculate it in splits,
+
+ r = f * (p_invead + p_inv_tail)
+ r = rh + rt
+
+ calculate log polynomial using r, in end addition, do
+ poly = poly + ((rh-r) + rt)
+
+ lth = -r
+ ltt = ((xexp * log2_t) - poly) + logT
+ lt = lth + ltt
+
+ lh = (xexp * log2_h) + logH
+ l = lh + lt
+
+ Calculate final log answer as gh and gt,
+ gh = l & higher-half bits
+ gt = (((ltt - (lt - lth)) + ((lh - l) + lt)) + (l - gh))
+
+ yh = y & higher-half bits
+ yt = y - yh
+
+ Before entering computation of exp,
+ vs = ((yt*gt + yt*gh) + yh*gt)
+ v = vs + yh*gh
+ vt = ((yh*gh - v) + vs)
+
+ In calculation of exp, add vt to r that is used for poly
+ At the end of exp, do
+ ((((expT * poly) + expT) + expH*poly) + expH)
+*/
+
+_CLC_DEF _CLC_OVERLOAD float __clc_pow(float x, float y)
+{
+
+    int ix = as_int(x);
+    int ax = ix & EXSIGNBIT_SP32;
+    int xpos = ix == ax;
+
+    int iy = as_int(y);
+    int ay = iy & EXSIGNBIT_SP32;
+    int ypos = iy == ay;
+
+    /* Extra precise log calculation
+     *  First handle case that x is close to 1
+     */
+    float r = 1.0f - as_float(ax);
+    int near1 = fabs(r) < 0x1.0p-4f;
+    float r2 = r*r;
+
+    /* Coefficients are just 1/3, 1/4, 1/5 and 1/6 */
+    float poly = mad(r,
+                     mad(r,
+                         mad(r,
+                             mad(r, 0x1.24924ap-3f, 0x1.555556p-3f),
+                             0x1.99999ap-3f),
+                         0x1.000000p-2f),
+                     0x1.555556p-2f);
+
+    poly *= r2*r;
+
+    float lth_near1 = -r2 * 0.5f;
+    float ltt_near1 = -poly;
+    float lt_near1 = lth_near1 + ltt_near1;
+    float lh_near1 = -r;
+    float l_near1 = lh_near1 + lt_near1;
+
+    /* Computations for x not near 1 */
+    int m = (int)(ax >> EXPSHIFTBITS_SP32) - EXPBIAS_SP32;
+    float mf = (float)m;
+    int ixs = as_int(as_float(ax | 0x3f800000) - 1.0f);
+    float mfs = (float)((ixs >> EXPSHIFTBITS_SP32) - 253);
+    int c = m == -127;
+    int ixn = c ? ixs : ax;
+    float mfn = c ? mfs : mf;
+
+    int indx = (ixn & 0x007f0000) + ((ixn & 0x00008000) << 1);
+
+    /* F - Y */
+    float f = as_float(0x3f000000 | indx) - as_float(0x3f000000 | (ixn & MANTBITS_SP32));
+
+    indx = indx >> 16;
+    float2 tv = USE_TABLE(log_inv_tbl_ep, indx);
+    float rh = f * tv.s0;
+    float rt = f * tv.s1;
+    r = rh + rt;
+
+    poly = mad(r, mad(r, 0x1.0p-2f, 0x1.555556p-2f), 0x1.0p-1f) * (r*r);
+    poly += (rh - r) + rt;
+
+    const float LOG2_HEAD = 0x1.62e000p-1f;  /* 0.693115234 */
+    const float LOG2_TAIL = 0x1.0bfbe8p-15f; /* 0.0000319461833 */
+    tv = USE_TABLE(loge_tbl, indx);
+    float lth = -r;
+    float ltt = mad(mfn, LOG2_TAIL, -poly) + tv.s1;
+    float lt = lth + ltt;
+    float lh = mad(mfn, LOG2_HEAD, tv.s0);
+    float l = lh + lt;
+
+    /* Select near 1 or not */
+    lth = near1 ? lth_near1 : lth;
+    ltt = near1 ? ltt_near1 : ltt;
+    lt = near1 ? lt_near1 : lt;
+    lh = near1 ? lh_near1 : lh;
+    l = near1 ? l_near1 : l;
+
+    float gh = as_float(as_int(l) & 0xfffff000);
+    float gt = ((ltt - (lt - lth)) + ((lh - l) + lt)) + (l - gh);
+
+    float yh = as_float(iy & 0xfffff000);
+
+    float yt = y - yh;
+
+    float ylogx_s = mad(gt, yh, mad(gh, yt, yt*gt));
+    float ylogx = mad(yh, gh, ylogx_s);
+    float ylogx_t = mad(yh, gh, -ylogx) + ylogx_s;
+
+    /* Extra precise exp of ylogx */
+    const float R_64_BY_LOG2 = 0x1.715476p+6f; /* 64/log2 : 92.332482616893657 */
+    int n = convert_int(ylogx * R_64_BY_LOG2);
+    float nf = (float) n;
+
+    int j = n & 0x3f;
+    m = n >> 6;
+    int m2 = m << EXPSHIFTBITS_SP32;
+
+    const float R_LOG2_BY_64_LD = 0x1.620000p-7f;  /* log2/64 lead: 0.0108032227 */
+    const float R_LOG2_BY_64_TL = 0x1.c85fdep-16f; /* log2/64 tail: 0.0000272020388 */
+    r = mad(nf, -R_LOG2_BY_64_TL, mad(nf, -R_LOG2_BY_64_LD, ylogx)) + ylogx_t;
+
+    /* Truncated Taylor series for e^r */
+    poly = mad(mad(mad(r, 0x1.555556p-5f, 0x1.555556p-3f), r, 0x1.000000p-1f), r*r, r);
+
+    tv = USE_TABLE(exp_tbl_ep, j);
+
+    float expylogx = mad(tv.s0, poly, mad(tv.s1, poly, tv.s1)) + tv.s0;
+    float sexpylogx;
+    if (!__clc_fp32_subnormals_supported()) {
+		int explg = ((as_uint(expylogx) & EXPBITS_SP32 >> 23) - 127);
+		m = (23-(m + 149)) == 0 ? 1: m;
+		uint mantissa =  ((as_uint(expylogx) & MANTBITS_SP32)|IMPBIT_SP32) >> (23-(m + 149));
+		sexpylogx = as_float(mantissa);
+    } else {
+		sexpylogx = expylogx * as_float(0x1 << (m + 149));
+    }
+
+
+    float texpylogx = as_float(as_int(expylogx) + m2);
+    expylogx = m < -125 ? sexpylogx : texpylogx;
+
+    /* Result is +-Inf if (ylogx + ylogx_t) > 128*log2 */
+    expylogx = (ylogx > 0x1.62e430p+6f) | (ylogx == 0x1.62e430p+6f & ylogx_t > -0x1.05c610p-22f) ? as_float(PINFBITPATT_SP32) : expylogx;
+
+    /* Result is 0 if ylogx < -149*log2 */
+    expylogx = ylogx <  -0x1.9d1da0p+6f ? 0.0f : expylogx;
+
+    /* Classify y:
+     *   inty = 0 means not an integer.
+     *   inty = 1 means odd integer.
+     *   inty = 2 means even integer.
+     */
+
+    int yexp = (int)(ay >> EXPSHIFTBITS_SP32) - EXPBIAS_SP32 + 1;
+    int mask = (1 << (24 - yexp)) - 1;
+    int yodd = ((iy >> (24 - yexp)) & 0x1) != 0;
+    int inty = yodd ? 1 : 2;
+    inty = (iy & mask) != 0 ? 0 : inty;
+    inty = yexp < 1 ? 0 : inty;
+    inty = yexp > 24 ? 2 : inty;
+
+    float signval = as_float((as_uint(expylogx) ^ SIGNBIT_SP32));
+    expylogx = ((inty == 1) & !xpos) ? signval : expylogx;
+    int ret = as_int(expylogx);
+
+    /* Corner case handling */
+    ret = (!xpos & (inty == 0)) ? QNANBITPATT_SP32 : ret;
+    ret = ax < 0x3f800000 & iy == NINFBITPATT_SP32 ? PINFBITPATT_SP32 : ret;
+    ret = ax > 0x3f800000 & iy == NINFBITPATT_SP32 ? 0 : ret;
+    ret = ax < 0x3f800000 & iy == PINFBITPATT_SP32 ? 0 : ret;
+    ret = ax > 0x3f800000 & iy == PINFBITPATT_SP32 ? PINFBITPATT_SP32 : ret;
+    int xinf = xpos ? PINFBITPATT_SP32 : NINFBITPATT_SP32;
+    ret = ((ax == 0) & !ypos & (inty == 1)) ? xinf : ret;
+    ret = ((ax == 0) & !ypos & (inty != 1)) ? PINFBITPATT_SP32 : ret;
+    int xzero = xpos ? 0 : 0x80000000;
+    ret = ((ax == 0) & ypos & (inty == 1)) ? xzero : ret;
+    ret = ((ax == 0) & ypos & (inty != 1)) ? 0 : ret;
+    ret = ((ax == 0) & (iy == NINFBITPATT_SP32)) ? PINFBITPATT_SP32 : ret;
+    ret = ((ix == 0xbf800000) & (ay == PINFBITPATT_SP32)) ? 0x3f800000 : ret;
+    ret = ((ix == NINFBITPATT_SP32) & !ypos & (inty == 1)) ? 0x80000000 : ret;
+    ret = ((ix == NINFBITPATT_SP32) & !ypos & (inty != 1)) ? 0 : ret;
+    ret = ((ix == NINFBITPATT_SP32) & ypos & (inty == 1)) ? NINFBITPATT_SP32 : ret;
+    ret = ((ix == NINFBITPATT_SP32) & ypos & (inty != 1)) ? PINFBITPATT_SP32 : ret;
+    ret = ((ix == PINFBITPATT_SP32) & !ypos) ? 0 : ret;
+    ret = ((ix == PINFBITPATT_SP32) & ypos) ? PINFBITPATT_SP32 : ret;
+    ret = (ax > PINFBITPATT_SP32) ? ix : ret;
+    ret = (ay > PINFBITPATT_SP32) ? iy : ret;
+    ret = ay == 0 ? 0x3f800000 : ret;
+    ret = ix == 0x3f800000 ? 0x3f800000 : ret;
+
+    return as_float(ret);
+}
+_CLC_BINARY_VECTORIZE(_CLC_DEF _CLC_OVERLOAD, float, __clc_pow, float, float)
+
+#ifdef cl_khr_fp64
+_CLC_DEF _CLC_OVERLOAD double __clc_pow(double x, double y)
+{
+    const double real_log2_tail = 5.76999904754328540596e-08;
+    const double real_log2_lead = 6.93147122859954833984e-01;
+
+    long ux = as_long(x);
+    long ax = ux & (~SIGNBIT_DP64);
+    int xpos = ax == ux;
+
+    long uy = as_long(y);
+    long ay = uy & (~SIGNBIT_DP64);
+    int ypos = ay == uy;
+
+    // Extended precision log
+    double v, vt;
+    {
+        int exp = (int)(ax >> 52) - 1023;
+        int mask_exp_1023 = exp == -1023;
+        double xexp = (double) exp;
+        long mantissa = ax & 0x000FFFFFFFFFFFFFL;
+
+        long temp_ux = as_long(as_double(0x3ff0000000000000L | mantissa) - 1.0);
+        exp = ((temp_ux & 0x7FF0000000000000L) >> 52) - 2045;
+        double xexp1 = (double) exp;
+        long mantissa1 = temp_ux & 0x000FFFFFFFFFFFFFL;
+
+        xexp = mask_exp_1023 ? xexp1 : xexp;
+        mantissa = mask_exp_1023 ? mantissa1 : mantissa;
+
+        long rax = (mantissa & 0x000ff00000000000) + ((mantissa & 0x0000080000000000) << 1);
+        int index = rax >> 44;
+
+        double F = as_double(rax | 0x3FE0000000000000L);
+        double Y = as_double(mantissa | 0x3FE0000000000000L);
+        double f = F - Y;
+        double2 tv = USE_TABLE(log_f_inv_tbl, index);
+        double log_h = tv.s0;
+        double log_t = tv.s1;
+        double f_inv = (log_h + log_t) * f;
+        double r1 = as_double(as_long(f_inv) & 0xfffffffff8000000L);
+        double r2 = fma(-F, r1, f) * (log_h + log_t);
+        double r = r1 + r2;
+
+        double poly = fma(r,
+                          fma(r,
+                              fma(r,
+                                  fma(r, 1.0/7.0, 1.0/6.0),
+                                  1.0/5.0),
+                              1.0/4.0),
+                          1.0/3.0);
+        poly = poly * r * r * r;
+
+        double hr1r1 = 0.5*r1*r1;
+        double poly0h = r1 + hr1r1;
+        double poly0t = r1 - poly0h + hr1r1;
+        poly = fma(r1, r2, fma(0.5*r2, r2, poly)) + r2 + poly0t;
+
+        tv = USE_TABLE(powlog_tbl, index);
+        log_h = tv.s0;
+        log_t = tv.s1;
+
+        double resT_t = fma(xexp, real_log2_tail, + log_t) - poly;
+        double resT = resT_t - poly0h;
+        double resH = fma(xexp, real_log2_lead, log_h);
+        double resT_h = poly0h;
+
+        double H = resT + resH;
+        double H_h = as_double(as_long(H) & 0xfffffffff8000000L);
+        double T = (resH - H + resT) + (resT_t - (resT + resT_h)) + (H - H_h);
+        H = H_h;
+
+        double y_head = as_double(uy & 0xfffffffff8000000L);
+        double y_tail = y - y_head;
+
+        double temp = fma(y_tail, H, fma(y_head, T, y_tail*T));
+        v = fma(y_head, H, temp);
+        vt = fma(y_head, H, -v) + temp;
+    }
+
+    // Now calculate exp of (v,vt)
+
+    double expv;
+    {
+        const double max_exp_arg = 709.782712893384;
+        const double min_exp_arg = -745.1332191019411;
+        const double sixtyfour_by_lnof2 = 92.33248261689366;
+        const double lnof2_by_64_head = 0.010830424260348081;
+        const double lnof2_by_64_tail = -4.359010638708991e-10;
+
+        double temp = v * sixtyfour_by_lnof2;
+        int n = (int)temp;
+        double dn = (double)n;
+        int j = n & 0x0000003f;
+        int m = n >> 6;
+
+        double2 tv = USE_TABLE(two_to_jby64_ep_tbl, j);
+        double f1 = tv.s0;
+        double f2 = tv.s1;
+        double f = f1 + f2;
+
+        double r1 = fma(dn, -lnof2_by_64_head, v);
+        double r2 = dn * lnof2_by_64_tail;
+        double r = (r1 + r2) + vt;
+
+        double q = fma(r,
+                       fma(r,
+                           fma(r,
+                               fma(r, 1.38889490863777199667e-03, 8.33336798434219616221e-03),
+                               4.16666666662260795726e-02),
+                           1.66666666665260878863e-01),
+                       5.00000000000000008883e-01);
+        q = fma(r*r, q, r);
+
+        expv = fma(f, q, f2) + f1;
+	      expv = ldexp(expv, m);
+
+        expv = v > max_exp_arg ? as_double(0x7FF0000000000000L) : expv;
+        expv = v < min_exp_arg ? 0.0 : expv;
+    }
+
+    // See whether y is an integer.
+    // inty = 0 means not an integer.
+    // inty = 1 means odd integer.
+    // inty = 2 means even integer.
+
+    int inty;
+    {
+        int yexp = (int)(ay >> EXPSHIFTBITS_DP64) - EXPBIAS_DP64 + 1;
+        inty = yexp < 1 ? 0 : 2;
+        inty = yexp > 53 ? 2 : inty;
+        long mask = (1L << (53 - yexp)) - 1L;
+        int inty1 = (((ay & ~mask) >> (53 - yexp)) & 1L) == 1L ? 1 : 2;
+        inty1 = (ay & mask) != 0 ? 0 : inty1;
+        inty = !(yexp < 1) & !(yexp > 53) ? inty1 : inty;
+    }
+
+    expv *= (inty == 1) & !xpos ? -1.0 : 1.0;
+
+    long ret = as_long(expv);
+
+    // Now all the edge cases
+    ret = !xpos & (inty == 0) ? QNANBITPATT_DP64 : ret;
+    ret = ax < 0x3ff0000000000000L & uy == NINFBITPATT_DP64 ? PINFBITPATT_DP64 : ret;
+    ret = ax > 0x3ff0000000000000L & uy == NINFBITPATT_DP64 ? 0L : ret;
+    ret = ax < 0x3ff0000000000000L & uy == PINFBITPATT_DP64 ? 0L : ret;
+    ret = ax > 0x3ff0000000000000L & uy == PINFBITPATT_DP64 ? PINFBITPATT_DP64 : ret;
+    long xinf = xpos ? PINFBITPATT_DP64 : NINFBITPATT_DP64;
+    ret = ((ax == 0L) & !ypos & (inty == 1)) ? xinf : ret;
+    ret = ((ax == 0L) & !ypos & (inty != 1)) ? PINFBITPATT_DP64 : ret;
+    long xzero = xpos ? 0L : 0x8000000000000000L;
+    ret = ((ax == 0L) & ypos & (inty == 1)) ? xzero : ret;
+    ret = ((ax == 0L) & ypos & (inty != 1)) ? 0L : ret;
+    ret = ((ax == 0L) & (uy == NINFBITPATT_DP64)) ? PINFBITPATT_DP64 : ret;
+    ret = ((ux == 0xbff0000000000000L) & (ay == PINFBITPATT_DP64)) ? 0x3ff0000000000000L : ret;
+    ret = ((ux == NINFBITPATT_DP64) & !ypos & (inty == 1)) ? 0x8000000000000000L : ret;
+    ret = ((ux == NINFBITPATT_DP64) & !ypos & (inty != 1)) ? 0L : ret;
+    ret = ((ux == NINFBITPATT_DP64) & ypos & (inty == 1)) ? NINFBITPATT_DP64 : ret;
+    ret = ((ux == NINFBITPATT_DP64) & ypos & (inty != 1)) ? PINFBITPATT_DP64 : ret;
+    ret = (ux == PINFBITPATT_DP64) & !ypos ? 0L : ret;
+    ret = (ux == PINFBITPATT_DP64) & ypos ? PINFBITPATT_DP64 : ret;
+    ret = ax > PINFBITPATT_DP64 ? ux : ret;
+    ret = ay > PINFBITPATT_DP64 ? uy : ret;
+    ret = ay == 0L ? 0x3ff0000000000000L : ret;
+    ret = ux == 0x3ff0000000000000L ? 0x3ff0000000000000L : ret;
+
+    return as_double(ret);
+}
+_CLC_BINARY_VECTORIZE(_CLC_DEF _CLC_OVERLOAD, double, __clc_pow, double, double)
+#endif
diff --git a/generic/lib/math/clc_sw_binary.inc b/generic/lib/math/clc_sw_binary.inc
new file mode 100644
index 0000000..0fe1524
--- /dev/null
+++ b/generic/lib/math/clc_sw_binary.inc
@@ -0,0 +1,9 @@
+#include <utils.h>
+
+#define __CLC_SW_FUNC(x) __CLC_CONCAT(__clc_, x)
+
+_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __CLC_FUNC(__CLC_GENTYPE x, __CLC_GENTYPE y) {
+  return __CLC_SW_FUNC(__CLC_FUNC)(x, y);
+}
+
+#undef __CLC_SW_FUNC
diff --git a/generic/lib/math/pow.cl b/generic/lib/math/pow.cl
new file mode 100644
index 0000000..5629d2e
--- /dev/null
+++ b/generic/lib/math/pow.cl
@@ -0,0 +1,7 @@
+#include <clc/clc.h>
+
+#include <math/clc_pow.h>
+
+#define __CLC_FUNC pow
+#define __CLC_BODY <clc_sw_binary.inc>
+#include <clc/math/gentype.inc>
diff --git a/generic/lib/math/tables.cl b/generic/lib/math/tables.cl
index 3e1e4db..b72fddd 100644
--- a/generic/lib/math/tables.cl
+++ b/generic/lib/math/tables.cl
@@ -288,6 +288,138 @@ DECLARE_TABLE(float, LOG_INV_TBL, 129) = {
     0x1.000000p+0f,
 };
 
+DECLARE_TABLE(float2, LOG_INV_TBL_EP, 129) = {
+    (float2)(0x1.000000p+1f, 0x0.000000p+0f),
+    (float2)(0x1.fc0000p+0f, 0x1.fc07f0p-14f),
+    (float2)(0x1.f80000p+0f, 0x1.f81f82p-12f),
+    (float2)(0x1.f40000p+0f, 0x1.196792p-10f),
+    (float2)(0x1.f00000p+0f, 0x1.f07c20p-10f),
+    (float2)(0x1.ec0000p+0f, 0x1.80f660p-9f),
+    (float2)(0x1.e80000p+0f, 0x1.131ac0p-8f),
+    (float2)(0x1.e40000p+0f, 0x1.73ac90p-8f),
+    (float2)(0x1.e00000p+0f, 0x1.e1e1e2p-8f),
+    (float2)(0x1.de0000p+0f, 0x1.75b8fep-10f),
+    (float2)(0x1.da0000p+0f, 0x1.cc0ed8p-9f),
+    (float2)(0x1.d60000p+0f, 0x1.7b654cp-8f),
+    (float2)(0x1.d40000p+0f, 0x1.d41d42p-12f),
+    (float2)(0x1.d00000p+0f, 0x1.96b1eep-9f),
+    (float2)(0x1.cc0000p+0f, 0x1.856890p-8f),
+    (float2)(0x1.ca0000p+0f, 0x1.2cc158p-10f),
+    (float2)(0x1.c60000p+0f, 0x1.1c71c8p-8f),
+    (float2)(0x1.c20000p+0f, 0x1.f8f01cp-8f),
+    (float2)(0x1.c00000p+0f, 0x1.c0e070p-9f),
+    (float2)(0x1.bc0000p+0f, 0x1.d2b89ap-8f),
+    (float2)(0x1.ba0000p+0f, 0x1.9f2298p-9f),
+    (float2)(0x1.b60000p+0f, 0x1.d6c3dep-8f),
+    (float2)(0x1.b40000p+0f, 0x1.d0369ep-9f),
+    (float2)(0x1.b20000p+0f, 0x1.b20364p-15f),
+    (float2)(0x1.ae0000p+0f, 0x1.286bcap-8f),
+    (float2)(0x1.ac0000p+0f, 0x1.5c06b2p-10f),
+    (float2)(0x1.a80000p+0f, 0x1.8ef606p-8f),
+    (float2)(0x1.a60000p+0f, 0x1.a034dap-9f),
+    (float2)(0x1.a40000p+0f, 0x1.a41a42p-12f),
+    (float2)(0x1.a00000p+0f, 0x1.6d3f98p-8f),
+    (float2)(0x1.9e0000p+0f, 0x1.91d2a2p-9f),
+    (float2)(0x1.9c0000p+0f, 0x1.68a772p-11f),
+    (float2)(0x1.980000p+0f, 0x1.99999ap-8f),
+    (float2)(0x1.960000p+0f, 0x1.0e4f80p-8f),
+    (float2)(0x1.940000p+0f, 0x1.161f9ap-9f),
+    (float2)(0x1.920000p+0f, 0x1.f693a2p-13f),
+    (float2)(0x1.8e0000p+0f, 0x1.9c18fap-8f),
+    (float2)(0x1.8c0000p+0f, 0x1.3018d4p-8f),
+    (float2)(0x1.8a0000p+0f, 0x1.9721eep-9f),
+    (float2)(0x1.880000p+0f, 0x1.b97c2ap-10f),
+    (float2)(0x1.860000p+0f, 0x1.861862p-12f),
+    (float2)(0x1.820000p+0f, 0x1.c977acp-8f),
+    (float2)(0x1.800000p+0f, 0x1.818182p-8f),
+    (float2)(0x1.7e0000p+0f, 0x1.405fd0p-8f),
+    (float2)(0x1.7c0000p+0f, 0x1.05f418p-8f),
+    (float2)(0x1.7a0000p+0f, 0x1.a4411cp-9f),
+    (float2)(0x1.780000p+0f, 0x1.499030p-9f),
+    (float2)(0x1.760000p+0f, 0x1.f7390ep-10f),
+    (float2)(0x1.740000p+0f, 0x1.745d18p-10f),
+    (float2)(0x1.720000p+0f, 0x1.0a1fd2p-10f),
+    (float2)(0x1.700000p+0f, 0x1.702e06p-11f),
+    (float2)(0x1.6e0000p+0f, 0x1.f76b44p-12f),
+    (float2)(0x1.6c0000p+0f, 0x1.6c16c2p-12f),
+    (float2)(0x1.6a0000p+0f, 0x1.3cd154p-12f),
+    (float2)(0x1.680000p+0f, 0x1.681682p-12f),
+    (float2)(0x1.660000p+0f, 0x1.ec6a52p-12f),
+    (float2)(0x1.640000p+0f, 0x1.642c86p-11f),
+    (float2)(0x1.620000p+0f, 0x1.fd3b80p-11f),
+    (float2)(0x1.600000p+0f, 0x1.605816p-10f),
+    (float2)(0x1.5e0000p+0f, 0x1.d6ee34p-10f),
+    (float2)(0x1.5c0000p+0f, 0x1.310572p-9f),
+    (float2)(0x1.5a0000p+0f, 0x1.80ad60p-9f),
+    (float2)(0x1.580000p+0f, 0x1.da4610p-9f),
+    (float2)(0x1.560000p+0f, 0x1.1ed3c6p-8f),
+    (float2)(0x1.540000p+0f, 0x1.555556p-8f),
+    (float2)(0x1.520000p+0f, 0x1.909490p-8f),
+    (float2)(0x1.500000p+0f, 0x1.d07eaep-8f),
+    (float2)(0x1.500000p+0f, 0x1.501502p-12f),
+    (float2)(0x1.4e0000p+0f, 0x1.7829ccp-10f),
+    (float2)(0x1.4c0000p+0f, 0x1.5710e4p-9f),
+    (float2)(0x1.4a0000p+0f, 0x1.fad40ap-9f),
+    (float2)(0x1.480000p+0f, 0x1.539e3cp-8f),
+    (float2)(0x1.460000p+0f, 0x1.ae147ap-8f),
+    (float2)(0x1.460000p+0f, 0x1.978fecp-13f),
+    (float2)(0x1.440000p+0f, 0x1.be1958p-10f),
+    (float2)(0x1.420000p+0f, 0x1.acc4bap-9f),
+    (float2)(0x1.400000p+0f, 0x1.414142p-8f),
+    (float2)(0x1.3e0000p+0f, 0x1.b013fcp-8f),
+    (float2)(0x1.3e0000p+0f, 0x1.165e72p-11f),
+    (float2)(0x1.3c0000p+0f, 0x1.32b490p-9f),
+    (float2)(0x1.3a0000p+0f, 0x1.13b13cp-8f),
+    (float2)(0x1.380000p+0f, 0x1.91c2c2p-8f),
+    (float2)(0x1.380000p+0f, 0x1.381382p-12f),
+    (float2)(0x1.360000p+0f, 0x1.31be7cp-9f),
+    (float2)(0x1.340000p+0f, 0x1.21cfb2p-8f),
+    (float2)(0x1.320000p+0f, 0x1.ae45b6p-8f),
+    (float2)(0x1.320000p+0f, 0x1.f1a516p-11f),
+    (float2)(0x1.300000p+0f, 0x1.a32026p-9f),
+    (float2)(0x1.2e0000p+0f, 0x1.684bdap-8f),
+    (float2)(0x1.2e0000p+0f, 0x1.2e025cp-15f),
+    (float2)(0x1.2c0000p+0f, 0x1.3f69b0p-9f),
+    (float2)(0x1.2a0000p+0f, 0x1.404ad0p-8f),
+    (float2)(0x1.280000p+0f, 0x1.e4129ep-8f),
+    (float2)(0x1.280000p+0f, 0x1.160252p-9f),
+    (float2)(0x1.260000p+0f, 0x1.350b88p-8f),
+    (float2)(0x1.240000p+0f, 0x1.e22708p-8f),
+    (float2)(0x1.240000p+0f, 0x1.24924ap-9f),
+    (float2)(0x1.220000p+0f, 0x1.45678ap-8f),
+    (float2)(0x1.200000p+0f, 0x1.fb7812p-8f),
+    (float2)(0x1.200000p+0f, 0x1.68e18cp-9f),
+    (float2)(0x1.1e0000p+0f, 0x1.7047dcp-8f),
+    (float2)(0x1.1e0000p+0f, 0x1.779da0p-11f),
+    (float2)(0x1.1c0000p+0f, 0x1.e0d5b4p-9f),
+    (float2)(0x1.1a0000p+0f, 0x1.b4a404p-8f),
+    (float2)(0x1.1a0000p+0f, 0x1.ee5846p-10f),
+    (float2)(0x1.180000p+0f, 0x1.453808p-8f),
+    (float2)(0x1.180000p+0f, 0x1.181182p-12f),
+    (float2)(0x1.160000p+0f, 0x1.c0d128p-9f),
+    (float2)(0x1.140000p+0f, 0x1.b1e5f8p-8f),
+    (float2)(0x1.140000p+0f, 0x1.0be1c2p-9f),
+    (float2)(0x1.120000p+0f, 0x1.5c8114p-8f),
+    (float2)(0x1.120000p+0f, 0x1.ac73aep-11f),
+    (float2)(0x1.100000p+0f, 0x1.111112p-8f),
+    (float2)(0x1.0e0000p+0f, 0x1.ef0110p-8f),
+    (float2)(0x1.0e0000p+0f, 0x1.9ead7cp-9f),
+    (float2)(0x1.0c0000p+0f, 0x1.b20a88p-8f),
+    (float2)(0x1.0c0000p+0f, 0x1.2e29f8p-9f),
+    (float2)(0x1.0a0000p+0f, 0x1.7e6ec2p-8f),
+    (float2)(0x1.0a0000p+0f, 0x1.a0429ap-10f),
+    (float2)(0x1.080000p+0f, 0x1.53f390p-8f),
+    (float2)(0x1.080000p+0f, 0x1.084210p-10f),
+    (float2)(0x1.060000p+0f, 0x1.3260a4p-8f),
+    (float2)(0x1.060000p+0f, 0x1.26e978p-11f),
+    (float2)(0x1.040000p+0f, 0x1.197f7ep-8f),
+    (float2)(0x1.040000p+0f, 0x1.041042p-12f),
+    (float2)(0x1.020000p+0f, 0x1.091b52p-8f),
+    (float2)(0x1.020000p+0f, 0x1.020408p-14f),
+    (float2)(0x1.000000p+0f, 0x1.010102p-8f),
+    (float2)(0x1.000000p+0f, 0x0.000000p+0f),
+};
+
 DECLARE_TABLE(float2, LOG2_TBL, 129) = {
     (float2)(0x0.000000p+0f, 0x0.000000p+0f),
     (float2)(0x1.6f8000p-7f, 0x1.942dbap-17f),
@@ -746,6 +878,7 @@ DECLARE_TABLE(float2, EXP_TBL_EP, 65) = {
 
 TABLE_FUNCTION(float2, LOGE_TBL, loge_tbl);
 TABLE_FUNCTION(float, LOG_INV_TBL, log_inv_tbl);
+TABLE_FUNCTION(float2, LOG_INV_TBL_EP, log_inv_tbl_ep);
 TABLE_FUNCTION(float2, LOG2_TBL, log2_tbl);
 
 uint4 TABLE_MANGLE(pibits_tbl)(size_t idx) {
@@ -1758,6 +1891,528 @@ DECLARE_TABLE(double2, CBRT_REM_TBL, 5) = {
     (double2)(0x1.965fea0000000p+0, 0x1.4f5b8f20ac166p-26),
 };
 
+
+DECLARE_TABLE(double2, POWLOG_TBL, 258) = {
+    (double2)(0x0.0000000000000p+0, 0x0.0000000000000p+0),
+    (double2)(0x1.ff00aa0000000p-9, 0x1.5885e0250435ap-36),
+    (double2)(0x1.fe02a60000000p-8, 0x1.620cf11f86ed2p-33),
+    (double2)(0x1.7dc4750000000p-7, 0x1.f0214edba4a25p-32),
+    (double2)(0x1.fc0a8b0000000p-7, 0x1.f807c79f3db4ep-36),
+    (double2)(0x1.3cea440000000p-6, 0x1.a352ba779a52bp-33),
+    (double2)(0x1.7b91b00000000p-6, 0x1.f56c46aa49fd5p-32),
+    (double2)(0x1.b9fc020000000p-6, 0x1.ebe465fef5196p-32),
+    (double2)(0x1.f829b00000000p-6, 0x1.cf0660099f1f8p-31),
+    (double2)(0x1.1b0d980000000p-5, 0x1.247b2ff85945dp-30),
+    (double2)(0x1.39e87b0000000p-5, 0x1.3fd7abf5202b6p-30),
+    (double2)(0x1.58a5ba0000000p-5, 0x1.f91c9a918d51ep-30),
+    (double2)(0x1.77458f0000000p-5, 0x1.8cb73f118d3cap-31),
+    (double2)(0x1.95c8300000000p-5, 0x1.d91c7d6fad074p-30),
+    (double2)(0x1.b42dd70000000p-5, 0x1.1971bec28d14cp-33),
+    (double2)(0x1.d276b80000000p-5, 0x1.5b616a423c78ap-30),
+    (double2)(0x1.f0a30c0000000p-5, 0x1.162a6617cc971p-37),
+    (double2)(0x1.0759830000000p-4, 0x1.66391c4c06d29p-30),
+    (double2)(0x1.16536e0000000p-4, 0x1.d46f5c1d0c4b8p-29),
+    (double2)(0x1.253f620000000p-4, 0x1.e14282df1f6d3p-29),
+    (double2)(0x1.341d790000000p-4, 0x1.86f47424a660dp-30),
+    (double2)(0x1.42edcb0000000p-4, 0x1.d4c8de077753ep-29),
+    (double2)(0x1.51b0730000000p-4, 0x1.e0c307ed24f1cp-29),
+    (double2)(0x1.60658a0000000p-4, 0x1.26ea18763bdd3p-29),
+    (double2)(0x1.6f0d280000000p-4, 0x1.5cad69737c933p-29),
+    (double2)(0x1.7da7660000000p-4, 0x1.af62599088901p-29),
+    (double2)(0x1.8c345d0000000p-4, 0x1.8c66c83d6b2d0p-30),
+    (double2)(0x1.9ab4240000000p-4, 0x1.880ceb36fb30fp-30),
+    (double2)(0x1.a926d30000000p-4, 0x1.495aac6ca17a4p-29),
+    (double2)(0x1.b78c820000000p-4, 0x1.761db4210878cp-29),
+    (double2)(0x1.c5e5480000000p-4, 0x1.eb78e862bac2fp-29),
+    (double2)(0x1.d4313d0000000p-4, 0x1.9b2cd75790dd9p-30),
+    (double2)(0x1.e270760000000p-4, 0x1.c55e5cbd3d50fp-29),
+    (double2)(0x1.f0a30c0000000p-4, 0x1.162a6617cc971p-36),
+    (double2)(0x1.fec9130000000p-4, 0x1.dbeabaaa2e519p-32),
+    (double2)(0x1.0671510000000p-3, 0x1.652cb7150c647p-30),
+    (double2)(0x1.0d77e70000000p-3, 0x1.9a11cb2cd2ee2p-28),
+    (double2)(0x1.1478580000000p-3, 0x1.19d0ab1a28813p-29),
+    (double2)(0x1.1b72ad0000000p-3, 0x1.4bd9e80a41811p-29),
+    (double2)(0x1.2266f10000000p-3, 0x1.214b596faa3dfp-28),
+    (double2)(0x1.29552f0000000p-3, 0x1.03fea46980bb8p-28),
+    (double2)(0x1.303d710000000p-3, 0x1.1c8ffa5fd28c7p-28),
+    (double2)(0x1.371fc20000000p-3, 0x1.e8f743bcd96c5p-35),
+    (double2)(0x1.3dfc2b0000000p-3, 0x1.d98c5395315c6p-32),
+    (double2)(0x1.44d2b60000000p-3, 0x1.996fa3ccfa7b2p-28),
+    (double2)(0x1.4ba36f0000000p-3, 0x1.cd2af2ad13037p-30),
+    (double2)(0x1.526e5e0000000p-3, 0x1.d0da1bd17200ep-30),
+    (double2)(0x1.59338d0000000p-3, 0x1.330410ba68b75p-28),
+    (double2)(0x1.5ff3070000000p-3, 0x1.4f27a790e7c41p-32),
+    (double2)(0x1.66acd40000000p-3, 0x1.3956a86f6ff1bp-30),
+    (double2)(0x1.6d60fe0000000p-3, 0x1.c6748723551d9p-29),
+    (double2)(0x1.740f8f0000000p-3, 0x1.500de9326cdfcp-29),
+    (double2)(0x1.7ab8900000000p-3, 0x1.086c848df1b59p-30),
+    (double2)(0x1.815c0a0000000p-3, 0x1.4357ead6836ffp-31),
+    (double2)(0x1.87fa060000000p-3, 0x1.4832442408024p-29),
+    (double2)(0x1.8e928d0000000p-3, 0x1.d10da8154b13dp-28),
+    (double2)(0x1.9525a90000000p-3, 0x1.9e8ad68ec8260p-28),
+    (double2)(0x1.9bb3620000000p-3, 0x1.cfbf706abaf18p-28),
+    (double2)(0x1.a23bc10000000p-3, 0x1.fc56ac6326e23p-28),
+    (double2)(0x1.a8becf0000000p-3, 0x1.9105e3185cf21p-28),
+    (double2)(0x1.af3c940000000p-3, 0x1.d017fe5b19cc0p-28),
+    (double2)(0x1.b5b5190000000p-3, 0x1.d1f6b48dd13fep-28),
+    (double2)(0x1.bc28670000000p-3, 0x1.0b63358a7e73ap-29),
+    (double2)(0x1.c296850000000p-3, 0x1.63063028c211cp-29),
+    (double2)(0x1.c8ff7c0000000p-3, 0x1.e6a6886b09760p-29),
+    (double2)(0x1.cf63540000000p-3, 0x1.c138bb891cd03p-28),
+    (double2)(0x1.d5c2160000000p-3, 0x1.69f7722b7221ap-28),
+    (double2)(0x1.dc1bca0000000p-3, 0x1.57d8fac1a628cp-32),
+    (double2)(0x1.e270760000000p-3, 0x1.c55e5cbd3d50fp-28),
+    (double2)(0x1.e8c0250000000p-3, 0x1.552d2ff48fe2ep-30),
+    (double2)(0x1.ef0adc0000000p-3, 0x1.7b8b26ca431bcp-28),
+    (double2)(0x1.f550a50000000p-3, 0x1.92decdc1c5f6dp-29),
+    (double2)(0x1.fb91860000000p-3, 0x1.abc7c551aaa8cp-28),
+    (double2)(0x1.00e6c40000000p-2, 0x1.6b540731a354bp-28),
+    (double2)(0x1.0402590000000p-2, 0x1.2d341036b89efp-28),
+    (double2)(0x1.071b850000000p-2, 0x1.f9ab21a3a2e0fp-27),
+    (double2)(0x1.0a324e0000000p-2, 0x1.39c871afb9fbdp-29),
+    (double2)(0x1.0d46b50000000p-2, 0x1.e6add2c81f640p-28),
+    (double2)(0x1.1058bf0000000p-2, 0x1.35c95aa313f41p-27),
+    (double2)(0x1.1368700000000p-2, 0x1.49d4582f6cc53p-29),
+    (double2)(0x1.1675ca0000000p-2, 0x1.7574c1c07398fp-27),
+    (double2)(0x1.1980d20000000p-2, 0x1.ba846dece9e8dp-27),
+    (double2)(0x1.1c898c0000000p-2, 0x1.6999fafbc68e7p-30),
+    (double2)(0x1.1f8ff90000000p-2, 0x1.c9145e51b0103p-27),
+    (double2)(0x1.22941f0000000p-2, 0x1.79ef2cb44850ap-27),
+    (double2)(0x1.2596010000000p-2, 0x1.beec73de11275p-31),
+    (double2)(0x1.2895a10000000p-2, 0x1.ef4351af5a498p-29),
+    (double2)(0x1.2b93030000000p-2, 0x1.5713a493b4a50p-27),
+    (double2)(0x1.2e8e2b0000000p-2, 0x1.5c23a61385992p-27),
+    (double2)(0x1.31871c0000000p-2, 0x1.2a88309f57299p-27),
+    (double2)(0x1.347dd90000000p-2, 0x1.530faa9ac8acep-27),
+    (double2)(0x1.3772660000000p-2, 0x1.5fec2d792a758p-29),
+    (double2)(0x1.3a64c50000000p-2, 0x1.5a517a71cbcd7p-28),
+    (double2)(0x1.3d54fa0000000p-2, 0x1.707dc3e1cd9a3p-28),
+    (double2)(0x1.4043080000000p-2, 0x1.a1a9f8ef43049p-28),
+    (double2)(0x1.432ef20000000p-2, 0x1.409d0276b3674p-27),
+    (double2)(0x1.4618bc0000000p-2, 0x1.0e2f613e85bd9p-29),
+    (double2)(0x1.4900680000000p-2, 0x1.0027433001e5fp-32),
+    (double2)(0x1.4be5f90000000p-2, 0x1.5dde2836d3265p-28),
+    (double2)(0x1.4ec9730000000p-2, 0x1.300134d7aaf04p-29),
+    (double2)(0x1.51aad80000000p-2, 0x1.cb7e0b42724f5p-28),
+    (double2)(0x1.548a2c0000000p-2, 0x1.d6e93167e6308p-29),
+    (double2)(0x1.5767710000000p-2, 0x1.d1569b1526adbp-28),
+    (double2)(0x1.5a42ab0000000p-2, 0x1.e99fc338a1a41p-31),
+    (double2)(0x1.5d1bdb0000000p-2, 0x1.eb01394a11b1cp-27),
+    (double2)(0x1.5ff3070000000p-2, 0x1.4f27a790e7c41p-31),
+    (double2)(0x1.62c82f0000000p-2, 0x1.5ce3ca97b7af9p-29),
+    (double2)(0x1.659b570000000p-2, 0x1.81f0f940ed857p-29),
+    (double2)(0x1.686c810000000p-2, 0x1.d36295d88857cp-27),
+    (double2)(0x1.6b3bb20000000p-2, 0x1.1aca1ec4af526p-29),
+    (double2)(0x1.6e08ea0000000p-2, 0x1.45743c7182726p-27),
+    (double2)(0x1.70d42e0000000p-2, 0x1.3c491aead337ep-29),
+    (double2)(0x1.739d7f0000000p-2, 0x1.aef401a738931p-28),
+    (double2)(0x1.7664e10000000p-2, 0x1.1cede76092a29p-29),
+    (double2)(0x1.792a550000000p-2, 0x1.fba8f44f82bb4p-27),
+    (double2)(0x1.7bede00000000p-2, 0x1.46f5f7f3c3e1ap-27),
+    (double2)(0x1.7eaf830000000p-2, 0x1.7055f86c9674bp-27),
+    (double2)(0x1.816f410000000p-2, 0x1.b41a92b6b6e1ap-27),
+    (double2)(0x1.842d1d0000000p-2, 0x1.43d162e927628p-27),
+    (double2)(0x1.86e9190000000p-2, 0x1.466174013f9b1p-27),
+    (double2)(0x1.89a3380000000p-2, 0x1.b05096ad69c62p-28),
+    (double2)(0x1.8c5b7c0000000p-2, 0x1.0b169150faa58p-27),
+    (double2)(0x1.8f11e80000000p-2, 0x1.cd98b1df85da7p-28),
+    (double2)(0x1.91c67e0000000p-2, 0x1.68b507b0f8fa8p-27),
+    (double2)(0x1.9479410000000p-2, 0x1.8422df57499bap-27),
+    (double2)(0x1.972a340000000p-2, 0x1.1351586970274p-30),
+    (double2)(0x1.99d9580000000p-2, 0x1.17e08acba92eep-30),
+    (double2)(0x1.9c86b00000000p-2, 0x1.6e04314dd0229p-29),
+    (double2)(0x1.9f323e0000000p-2, 0x1.97f3097e56d1ap-27),
+    (double2)(0x1.a1dc060000000p-2, 0x1.356e655901286p-28),
+    (double2)(0x1.a484090000000p-2, 0x1.cb761457f94d6p-31),
+    (double2)(0x1.a72a490000000p-2, 0x1.9af67a85a9dacp-28),
+    (double2)(0x1.a9cec90000000p-2, 0x1.53410931a909fp-27),
+    (double2)(0x1.ac718c0000000p-2, 0x1.2c587206058f5p-29),
+    (double2)(0x1.af12930000000p-2, 0x1.23bc358899c22p-29),
+    (double2)(0x1.b1b1e00000000p-2, 0x1.d7bf8b6d223cbp-27),
+    (double2)(0x1.b44f770000000p-2, 0x1.7991ec5197ddbp-27),
+    (double2)(0x1.b6eb590000000p-2, 0x1.a79e6bb3a9219p-27),
+    (double2)(0x1.b985890000000p-2, 0x1.a4c43ed663ec5p-28),
+    (double2)(0x1.bc1e080000000p-2, 0x1.61b5a1484f438p-27),
+    (double2)(0x1.beb4d90000000p-2, 0x1.b4e36f7ef0c3ap-27),
+    (double2)(0x1.c149ff0000000p-2, 0x1.15f026acd0d1bp-30),
+    (double2)(0x1.c3dd7a0000000p-2, 0x1.f36b535cecf05p-28),
+    (double2)(0x1.c66f4e0000000p-2, 0x1.ffb7fbf3eb5c6p-29),
+    (double2)(0x1.c8ff7c0000000p-2, 0x1.e6a6886b09760p-28),
+    (double2)(0x1.cb8e070000000p-2, 0x1.135eb27f5bbc3p-28),
+    (double2)(0x1.ce1af00000000p-2, 0x1.70be7d6f6fa57p-27),
+    (double2)(0x1.d0a63a0000000p-2, 0x1.ce43cc84ab338p-27),
+    (double2)(0x1.d32fe70000000p-2, 0x1.c01d7aac3bd91p-27),
+    (double2)(0x1.d5b7f90000000p-2, 0x1.5c58d07961060p-27),
+    (double2)(0x1.d83e720000000p-2, 0x1.628bcf941456ep-28),
+    (double2)(0x1.dac3530000000p-2, 0x1.c58b2a8461cd2p-27),
+    (double2)(0x1.dd46a00000000p-2, 0x1.3071282fb989ap-28),
+    (double2)(0x1.dfc8590000000p-2, 0x1.20dab6a80f09cp-27),
+    (double2)(0x1.e248810000000p-2, 0x1.4f8d84c397b1ep-27),
+    (double2)(0x1.e4c71a0000000p-2, 0x1.0d0ee08599e48p-27),
+    (double2)(0x1.e744260000000p-2, 0x1.d68787e37da36p-30),
+    (double2)(0x1.e9bfa60000000p-2, 0x1.66187d591bafcp-28),
+    (double2)(0x1.ec399d0000000p-2, 0x1.2346600bae772p-29),
+    (double2)(0x1.eeb20c0000000p-2, 0x1.90377d0d61b8ep-28),
+    (double2)(0x1.f128f50000000p-2, 0x1.f5e0dd966b907p-27),
+    (double2)(0x1.f39e5b0000000p-2, 0x1.9023cb79a00e2p-27),
+    (double2)(0x1.f6123f0000000p-2, 0x1.4e05158c28ad8p-27),
+    (double2)(0x1.f884a30000000p-2, 0x1.bfa7b08b18ae4p-28),
+    (double2)(0x1.faf5880000000p-2, 0x1.ef1e63db35f67p-27),
+    (double2)(0x1.fd64f20000000p-2, 0x1.ec2ae39493d4fp-31),
+    (double2)(0x1.ffd2e00000000p-2, 0x1.0afe930ab2fa0p-27),
+    (double2)(0x1.011fab0000000p-1, 0x1.25ff8a1810dd4p-29),
+    (double2)(0x1.02552a0000000p-1, 0x1.69743fb1a71a5p-27),
+    (double2)(0x1.0389ee0000000p-1, 0x1.f9cc676785571p-26),
+    (double2)(0x1.04bdf90000000p-1, 0x1.b524da4cbf982p-26),
+    (double2)(0x1.05f14b0000000p-1, 0x1.a4c8b381535b8p-26),
+    (double2)(0x1.0723e50000000p-1, 0x1.839be809caf2cp-26),
+    (double2)(0x1.0855c80000000p-1, 0x1.0968a1cb82c13p-26),
+    (double2)(0x1.0986f40000000p-1, 0x1.eae6a41723fb5p-26),
+    (double2)(0x1.0ab76b0000000p-1, 0x1.d9c29a380a4dbp-26),
+    (double2)(0x1.0be72e0000000p-1, 0x1.094aa0ada625ep-27),
+    (double2)(0x1.0d163c0000000p-1, 0x1.973ad6fc108cap-26),
+    (double2)(0x1.0e44980000000p-1, 0x1.747322fdbab97p-27),
+    (double2)(0x1.0f72410000000p-1, 0x1.93692fa9d4221p-26),
+    (double2)(0x1.109f390000000p-1, 0x1.c5a992dfbc7d9p-26),
+    (double2)(0x1.11cb810000000p-1, 0x1.e1f33e102387ap-27),
+    (double2)(0x1.12f7190000000p-1, 0x1.64fbef14c048cp-27),
+    (double2)(0x1.1422020000000p-1, 0x1.490f513ca5e3bp-27),
+    (double2)(0x1.154c3d0000000p-1, 0x1.7a6af4d4c799dp-28),
+    (double2)(0x1.1675ca0000000p-1, 0x1.7574c1c07398fp-26),
+    (double2)(0x1.179eab0000000p-1, 0x1.7b133417f8c1cp-26),
+    (double2)(0x1.18c6e00000000p-1, 0x1.feb9e0c176514p-26),
+    (double2)(0x1.19ee6b0000000p-1, 0x1.19f25bb3172f7p-27),
+    (double2)(0x1.1b154b0000000p-1, 0x1.5f68a7bbfb852p-27),
+    (double2)(0x1.1c3b810000000p-1, 0x1.ee278497929f1p-26),
+    (double2)(0x1.1d610f0000000p-1, 0x1.ccee006109d58p-26),
+    (double2)(0x1.1e85f50000000p-1, 0x1.ce081a07bd8b3p-26),
+    (double2)(0x1.1faa340000000p-1, 0x1.70e12981817b8p-26),
+    (double2)(0x1.20cdcd0000000p-1, 0x1.92ab6d93503d0p-29),
+    (double2)(0x1.21f0bf0000000p-1, 0x1.8cb7dd7c3b61ep-26),
+    (double2)(0x1.23130d0000000p-1, 0x1.efafd0a0b78dap-27),
+    (double2)(0x1.2434b60000000p-1, 0x1.e907267c4288ep-26),
+    (double2)(0x1.2555bc0000000p-1, 0x1.d31ef96780875p-26),
+    (double2)(0x1.2676200000000p-1, 0x1.3430dfcd2ad50p-29),
+    (double2)(0x1.2795e10000000p-1, 0x1.44d88d75bc1f9p-28),
+    (double2)(0x1.28b5000000000p-1, 0x1.bec0f055e04fcp-26),
+    (double2)(0x1.29d37f0000000p-1, 0x1.d85611590b9adp-26),
+    (double2)(0x1.2af15f0000000p-1, 0x1.320568e583229p-32),
+    (double2)(0x1.2c0e9e0000000p-1, 0x1.a891d1772f538p-26),
+    (double2)(0x1.2d2b400000000p-1, 0x1.2edc9dabba74dp-29),
+    (double2)(0x1.2e47430000000p-1, 0x1.b9009a1015086p-27),
+    (double2)(0x1.2f62a90000000p-1, 0x1.2a12a8c5b1a19p-26),
+    (double2)(0x1.307d730000000p-1, 0x1.a7885f0fdac85p-28),
+    (double2)(0x1.3197a00000000p-1, 0x1.f4ffcd43ac691p-26),
+    (double2)(0x1.32b1330000000p-1, 0x1.2243ae2640aadp-26),
+    (double2)(0x1.33ca2b0000000p-1, 0x1.46513299035d3p-26),
+    (double2)(0x1.34e2890000000p-1, 0x1.b39c3a62dd725p-26),
+    (double2)(0x1.35fa4e0000000p-1, 0x1.ba6dd40049f51p-26),
+    (double2)(0x1.37117b0000000p-1, 0x1.51d1ed7177409p-27),
+    (double2)(0x1.38280f0000000p-1, 0x1.cb0f2fd7f5216p-26),
+    (double2)(0x1.393e0d0000000p-1, 0x1.ab150cd4e2213p-28),
+    (double2)(0x1.3a53730000000p-1, 0x1.cfd7bf3193844p-26),
+    (double2)(0x1.3b68440000000p-1, 0x1.3fff8455f1dbdp-26),
+    (double2)(0x1.3c7c7f0000000p-1, 0x1.fee640b905fc9p-26),
+    (double2)(0x1.3d90260000000p-1, 0x1.4e2adf548084cp-26),
+    (double2)(0x1.3ea3390000000p-1, 0x1.b597adc1ecdd2p-28),
+    (double2)(0x1.3fb5b80000000p-1, 0x1.345bd096d3a75p-27),
+    (double2)(0x1.40c7a40000000p-1, 0x1.101b9d2453c8bp-26),
+    (double2)(0x1.41d8fe0000000p-1, 0x1.08ce55cc8c979p-26),
+    (double2)(0x1.42e9c60000000p-1, 0x1.bbf017e595f71p-26),
+    (double2)(0x1.43f9fe0000000p-1, 0x1.7ce733bd393dcp-28),
+    (double2)(0x1.4509a50000000p-1, 0x1.33bb0a503f8a1p-29),
+    (double2)(0x1.4618bc0000000p-1, 0x1.0e2f613e85bd9p-28),
+    (double2)(0x1.4727430000000p-1, 0x1.e67555a635b3cp-26),
+    (double2)(0x1.48353d0000000p-1, 0x1.ea88df73d5e8bp-29),
+    (double2)(0x1.4942a80000000p-1, 0x1.d17e03bda18a8p-28),
+    (double2)(0x1.4a4f850000000p-1, 0x1.b607d76044f7ep-26),
+    (double2)(0x1.4b5bd60000000p-1, 0x1.2adc4e71bc2fcp-26),
+    (double2)(0x1.4c679a0000000p-1, 0x1.f99dc7362d1d9p-26),
+    (double2)(0x1.4d72d30000000p-1, 0x1.473fa008e6a6ap-26),
+    (double2)(0x1.4e7d810000000p-1, 0x1.b75bb09cb0985p-29),
+    (double2)(0x1.4f87a30000000p-1, 0x1.ea04dd10b9abap-26),
+    (double2)(0x1.50913c0000000p-1, 0x1.802d0d6979674p-26),
+    (double2)(0x1.519a4c0000000p-1, 0x1.74688ccd99094p-30),
+    (double2)(0x1.52a2d20000000p-1, 0x1.96f16abb9df22p-27),
+    (double2)(0x1.53aad00000000p-1, 0x1.6e66df2aa374fp-27),
+    (double2)(0x1.54b2460000000p-1, 0x1.e66525ea4550ap-27),
+    (double2)(0x1.55b9350000000p-1, 0x1.2d02f34f20cbdp-27),
+    (double2)(0x1.56bf9d0000000p-1, 0x1.6cfce65047188p-27),
+    (double2)(0x1.57c57f0000000p-1, 0x1.9b78c842d58b8p-28),
+    (double2)(0x1.58cadb0000000p-1, 0x1.735e624c24bc9p-27),
+    (double2)(0x1.59cfb20000000p-1, 0x1.7eba1f7dd1adfp-27),
+    (double2)(0x1.5ad4040000000p-1, 0x1.86b3e59f65355p-26),
+    (double2)(0x1.5bd7d30000000p-1, 0x1.ce38e637f1b4dp-30),
+    (double2)(0x1.5cdb1d0000000p-1, 0x1.8d82ec919edc7p-26),
+    (double2)(0x1.5ddde50000000p-1, 0x1.c52648ddcfa37p-27),
+    (double2)(0x1.5ee02a0000000p-1, 0x1.2482ceae1ac12p-26),
+    (double2)(0x1.5fe1ed0000000p-1, 0x1.5a312311aba4fp-26),
+    (double2)(0x1.60e32f0000000p-1, 0x1.11e236329f225p-27),
+    (double2)(0x1.61e3ef0000000p-1, 0x1.b48c8cd2f246cp-26),
+    (double2)(0x1.62e42e0000000p-1, 0x1.efa39ef35793cp-25),
+    (double2)(0x0.0000000000000p+0, 0x0.0000000000000p+0),
+};
+
+DECLARE_TABLE(double2, LOG_F_INV_TBL, 258) = {
+    (double2)(0x1.0000000000000p+1, 0x0.0000000000000p+0),
+    (double2)(0x1.fe00000000000p+0, 0x1.fe01fe01fe020p-16),
+    (double2)(0x1.fc00000000000p+0, 0x1.fc07f01fc07f0p-14),
+    (double2)(0x1.fa00000000000p+0, 0x1.1caa01fa11caap-12),
+    (double2)(0x1.f800000000000p+0, 0x1.f81f81f81f820p-12),
+    (double2)(0x1.f600000000000p+0, 0x1.8856506ddaba6p-11),
+    (double2)(0x1.f400000000000p+0, 0x1.196792909c560p-10),
+    (double2)(0x1.f200000000000p+0, 0x1.7d9108c2ad433p-10),
+    (double2)(0x1.f000000000000p+0, 0x1.f07c1f07c1f08p-10),
+    (double2)(0x1.ee00000000000p+0, 0x1.38ff08b1c03ddp-9),
+    (double2)(0x1.ec00000000000p+0, 0x1.80f6603d980f6p-9),
+    (double2)(0x1.ea00000000000p+0, 0x1.d00f57403d5d0p-9),
+    (double2)(0x1.e900000000000p+0, 0x1.31abf0b7672a0p-12),
+    (double2)(0x1.e700000000000p+0, 0x1.06a965d43919bp-10),
+    (double2)(0x1.e500000000000p+0, 0x1.ceb240795ceb2p-10),
+    (double2)(0x1.e300000000000p+0, 0x1.522f3b834e67fp-9),
+    (double2)(0x1.e100000000000p+0, 0x1.c3c3c3c3c3c3cp-9),
+    (double2)(0x1.e000000000000p+0, 0x1.e01e01e01e01ep-12),
+    (double2)(0x1.de00000000000p+0, 0x1.75b8fe21a291cp-10),
+    (double2)(0x1.dc00000000000p+0, 0x1.403b9403b9404p-9),
+    (double2)(0x1.da00000000000p+0, 0x1.cc0ed7303b5ccp-9),
+    (double2)(0x1.d900000000000p+0, 0x1.79118f3fc4da2p-11),
+    (double2)(0x1.d700000000000p+0, 0x1.ed952e0b0ce46p-10),
+    (double2)(0x1.d500000000000p+0, 0x1.95900eae56404p-9),
+    (double2)(0x1.d400000000000p+0, 0x1.d41d41d41d41dp-12),
+    (double2)(0x1.d200000000000p+0, 0x1.cb28ff16c69aep-10),
+    (double2)(0x1.d000000000000p+0, 0x1.96b1edd80e866p-9),
+    (double2)(0x1.cf00000000000p+0, 0x1.372e225fe30d9p-11),
+    (double2)(0x1.cd00000000000p+0, 0x1.0ad12073615a2p-9),
+    (double2)(0x1.cb00000000000p+0, 0x1.cdb2c0397cdb3p-9),
+    (double2)(0x1.ca00000000000p+0, 0x1.2cc157b864407p-10),
+    (double2)(0x1.c800000000000p+0, 0x1.64cb5f7148404p-9),
+    (double2)(0x1.c700000000000p+0, 0x1.c71c71c71c71cp-12),
+    (double2)(0x1.c500000000000p+0, 0x1.129a21a930b84p-9),
+    (double2)(0x1.c300000000000p+0, 0x1.f1e0387f1e038p-9),
+    (double2)(0x1.c200000000000p+0, 0x1.ad4e4ba80709bp-10),
+    (double2)(0x1.c000000000000p+0, 0x1.c0e070381c0e0p-9),
+    (double2)(0x1.bf00000000000p+0, 0x1.60fba1a362bb0p-10),
+    (double2)(0x1.bd00000000000p+0, 0x1.a5713280dee96p-9),
+    (double2)(0x1.bc00000000000p+0, 0x1.3f59620f9ece9p-10),
+    (double2)(0x1.ba00000000000p+0, 0x1.9f22983759f23p-9),
+    (double2)(0x1.b900000000000p+0, 0x1.478ac63fc8d5cp-10),
+    (double2)(0x1.b700000000000p+0, 0x1.ad87bb4671656p-9),
+    (double2)(0x1.b600000000000p+0, 0x1.78b8efbb8148cp-10),
+    (double2)(0x1.b400000000000p+0, 0x1.d0369d0369d03p-9),
+    (double2)(0x1.b300000000000p+0, 0x1.d212b601b3748p-10),
+    (double2)(0x1.b200000000000p+0, 0x1.b2036406c80d9p-15),
+    (double2)(0x1.b000000000000p+0, 0x1.29663b24547d1p-9),
+    (double2)(0x1.af00000000000p+0, 0x1.435e50d79435ep-11),
+    (double2)(0x1.ad00000000000p+0, 0x1.7d0ff2920bc03p-9),
+    (double2)(0x1.ac00000000000p+0, 0x1.5c06b15c06b16p-10),
+    (double2)(0x1.aa00000000000p+0, 0x1.e3a5f0fd7f954p-9),
+    (double2)(0x1.a900000000000p+0, 0x1.1dec0d4c77b03p-9),
+    (double2)(0x1.a800000000000p+0, 0x1.73289870ac52ep-11),
+    (double2)(0x1.a600000000000p+0, 0x1.a034da034da03p-9),
+    (double2)(0x1.a500000000000p+0, 0x1.d041da2292856p-10),
+    (double2)(0x1.a400000000000p+0, 0x1.a41a41a41a41ap-12),
+    (double2)(0x1.a200000000000p+0, 0x1.8550f8a39409dp-9),
+    (double2)(0x1.a100000000000p+0, 0x1.b4fe5e92c0686p-10),
+    (double2)(0x1.a000000000000p+0, 0x1.a01a01a01a01ap-12),
+    (double2)(0x1.9e00000000000p+0, 0x1.91d2a2067b23ap-9),
+    (double2)(0x1.9d00000000000p+0, 0x1.e7c5dada0b4e5p-10),
+    (double2)(0x1.9c00000000000p+0, 0x1.68a7725080ce1p-11),
+    (double2)(0x1.9a00000000000p+0, 0x1.c49d4aa21b490p-9),
+    (double2)(0x1.9900000000000p+0, 0x1.3333333333333p-9),
+    (double2)(0x1.9800000000000p+0, 0x1.4bc363b03fccfp-10),
+    (double2)(0x1.9700000000000p+0, 0x1.c9f01970e4f81p-13),
+    (double2)(0x1.9500000000000p+0, 0x1.97617c6ef5b25p-9),
+    (double2)(0x1.9400000000000p+0, 0x1.161f9add3c0cap-9),
+    (double2)(0x1.9300000000000p+0, 0x1.319fe6cb39806p-10),
+    (double2)(0x1.9200000000000p+0, 0x1.f693a1c451ab3p-13),
+    (double2)(0x1.9000000000000p+0, 0x1.a9e240321a9e2p-9),
+    (double2)(0x1.8f00000000000p+0, 0x1.3831f3831f383p-9),
+    (double2)(0x1.8e00000000000p+0, 0x1.949ebc4dcfc1cp-10),
+    (double2)(0x1.8d00000000000p+0, 0x1.80c6980c6980cp-11),
+    (double2)(0x1.8b00000000000p+0, 0x1.f9d00c5fe7403p-9),
+    (double2)(0x1.8a00000000000p+0, 0x1.9721ed7e75347p-9),
+    (double2)(0x1.8900000000000p+0, 0x1.381ec0313381fp-9),
+    (double2)(0x1.8800000000000p+0, 0x1.b97c2aec12653p-10),
+    (double2)(0x1.8700000000000p+0, 0x1.09ef3024ae3bap-10),
+    (double2)(0x1.8600000000000p+0, 0x1.8618618618618p-12),
+    (double2)(0x1.8400000000000p+0, 0x1.e0184f00c2780p-9),
+    (double2)(0x1.8300000000000p+0, 0x1.92ef5657dba52p-9),
+    (double2)(0x1.8200000000000p+0, 0x1.4940305494030p-9),
+    (double2)(0x1.8100000000000p+0, 0x1.0303030303030p-9),
+    (double2)(0x1.8000000000000p+0, 0x1.8060180601806p-10),
+    (double2)(0x1.7f00000000000p+0, 0x1.017f405fd017fp-10),
+    (double2)(0x1.7e00000000000p+0, 0x1.12a8ad278e8ddp-11),
+    (double2)(0x1.7d00000000000p+0, 0x1.7d05f417d05f4p-14),
+    (double2)(0x1.7b00000000000p+0, 0x1.d67245c02f7d6p-9),
+    (double2)(0x1.7a00000000000p+0, 0x1.a4411c1d986a9p-9),
+    (double2)(0x1.7900000000000p+0, 0x1.754d76c7316dfp-9),
+    (double2)(0x1.7800000000000p+0, 0x1.49902f149902fp-9),
+    (double2)(0x1.7700000000000p+0, 0x1.21023358c1a68p-9),
+    (double2)(0x1.7600000000000p+0, 0x1.f7390d2a6c406p-10),
+    (double2)(0x1.7500000000000p+0, 0x1.b2b0805d5b2b1p-10),
+    (double2)(0x1.7400000000000p+0, 0x1.745d1745d1746p-10),
+    (double2)(0x1.7300000000000p+0, 0x1.3c31507fa32c4p-10),
+    (double2)(0x1.7200000000000p+0, 0x1.0a1fd1b7af017p-10),
+    (double2)(0x1.7100000000000p+0, 0x1.bc36ce3e0453ap-11),
+    (double2)(0x1.7000000000000p+0, 0x1.702e05c0b8170p-11),
+    (double2)(0x1.6f00000000000p+0, 0x1.300b79300b793p-11),
+    (double2)(0x1.6e00000000000p+0, 0x1.f76b4337c6cb1p-12),
+    (double2)(0x1.6d00000000000p+0, 0x1.a62681c860fb0p-12),
+    (double2)(0x1.6c00000000000p+0, 0x1.6c16c16c16c17p-12),
+    (double2)(0x1.6b00000000000p+0, 0x1.490aa31a3cfc7p-12),
+    (double2)(0x1.6a00000000000p+0, 0x1.3cd153729043ep-12),
+    (double2)(0x1.6900000000000p+0, 0x1.473a88d0bfd2ep-12),
+    (double2)(0x1.6800000000000p+0, 0x1.6816816816817p-12),
+    (double2)(0x1.6700000000000p+0, 0x1.9f36016719f36p-12),
+    (double2)(0x1.6600000000000p+0, 0x1.ec6a5122f9016p-12),
+    (double2)(0x1.6500000000000p+0, 0x1.27c29da5519cfp-11),
+    (double2)(0x1.6400000000000p+0, 0x1.642c8590b2164p-11),
+    (double2)(0x1.6300000000000p+0, 0x1.ab5c45606f00bp-11),
+    (double2)(0x1.6200000000000p+0, 0x1.fd3b80b11fd3cp-11),
+    (double2)(0x1.6100000000000p+0, 0x1.2cda0c6ba4eaap-10),
+    (double2)(0x1.6000000000000p+0, 0x1.6058160581606p-10),
+    (double2)(0x1.5f00000000000p+0, 0x1.990d0a4b7ef87p-10),
+    (double2)(0x1.5e00000000000p+0, 0x1.d6ee340579d6fp-10),
+    (double2)(0x1.5d00000000000p+0, 0x1.0cf87d9c54a69p-9),
+    (double2)(0x1.5c00000000000p+0, 0x1.310572620ae4cp-9),
+    (double2)(0x1.5b00000000000p+0, 0x1.5798c8ff522a2p-9),
+    (double2)(0x1.5a00000000000p+0, 0x1.80ad602b580adp-9),
+    (double2)(0x1.5900000000000p+0, 0x1.ac3e24799546fp-9),
+    (double2)(0x1.5800000000000p+0, 0x1.da46102b1da46p-9),
+    (double2)(0x1.5800000000000p+0, 0x1.5805601580560p-14),
+    (double2)(0x1.5700000000000p+0, 0x1.ed3c506b39a23p-12),
+    (double2)(0x1.5600000000000p+0, 0x1.cbdd3e2970f60p-11),
+    (double2)(0x1.5500000000000p+0, 0x1.5555555555555p-10),
+    (double2)(0x1.5400000000000p+0, 0x1.c979aee0bf805p-10),
+    (double2)(0x1.5300000000000p+0, 0x1.21291e81fd58ep-9),
+    (double2)(0x1.5200000000000p+0, 0x1.5fead500a9580p-9),
+    (double2)(0x1.5100000000000p+0, 0x1.a0fd5c5f02a3ap-9),
+    (double2)(0x1.5000000000000p+0, 0x1.e45c223898adcp-9),
+    (double2)(0x1.5000000000000p+0, 0x1.5015015015015p-12),
+    (double2)(0x1.4f00000000000p+0, 0x1.c7b16ea64d422p-11),
+    (double2)(0x1.4e00000000000p+0, 0x1.7829cbc14e5e1p-10),
+    (double2)(0x1.4d00000000000p+0, 0x1.0877db8589720p-9),
+    (double2)(0x1.4c00000000000p+0, 0x1.5710e4b5edceap-9),
+    (double2)(0x1.4b00000000000p+0, 0x1.a7dbb4d1fc1c8p-9),
+    (double2)(0x1.4a00000000000p+0, 0x1.fad40a57eb503p-9),
+    (double2)(0x1.4a00000000000p+0, 0x1.3fd6bb00a5140p-11),
+    (double2)(0x1.4900000000000p+0, 0x1.4e78ecb419ba9p-10),
+    (double2)(0x1.4800000000000p+0, 0x1.00a44029100a4p-9),
+    (double2)(0x1.4700000000000p+0, 0x1.5c28f5c28f5c3p-9),
+    (double2)(0x1.4600000000000p+0, 0x1.b9c68b2c0cc4ap-9),
+    (double2)(0x1.4600000000000p+0, 0x1.978feb9f34381p-13),
+    (double2)(0x1.4500000000000p+0, 0x1.ecf163bb6500ap-11),
+    (double2)(0x1.4400000000000p+0, 0x1.be1958b67ebb9p-10),
+    (double2)(0x1.4300000000000p+0, 0x1.44e6157dc9a3bp-9),
+    (double2)(0x1.4200000000000p+0, 0x1.acc4baa3f0ddfp-9),
+    (double2)(0x1.4200000000000p+0, 0x1.6a4cbcb2a247bp-13),
+    (double2)(0x1.4100000000000p+0, 0x1.0505050505050p-10),
+    (double2)(0x1.4000000000000p+0, 0x1.e0b4439959819p-10),
+    (double2)(0x1.3f00000000000p+0, 0x1.6027f6027f602p-9),
+    (double2)(0x1.3e00000000000p+0, 0x1.d1e854b5e0db4p-9),
+    (double2)(0x1.3e00000000000p+0, 0x1.165e7254813e2p-11),
+    (double2)(0x1.3d00000000000p+0, 0x1.76646a9d716efp-10),
+    (double2)(0x1.3c00000000000p+0, 0x1.32b48f757ce88p-9),
+    (double2)(0x1.3b00000000000p+0, 0x1.ac1b24652a906p-9),
+    (double2)(0x1.3b00000000000p+0, 0x1.3b13b13b13b14p-12),
+    (double2)(0x1.3a00000000000p+0, 0x1.490e1eb208984p-10),
+    (double2)(0x1.3900000000000p+0, 0x1.2385830fec66ep-9),
+    (double2)(0x1.3800000000000p+0, 0x1.a45a6cc111b7ep-9),
+    (double2)(0x1.3800000000000p+0, 0x1.3813813813814p-12),
+    (double2)(0x1.3700000000000p+0, 0x1.56f472517b708p-10),
+    (double2)(0x1.3600000000000p+0, 0x1.31be7bc0e8f2ap-9),
+    (double2)(0x1.3500000000000p+0, 0x1.b9cbf3e55f044p-9),
+    (double2)(0x1.3500000000000p+0, 0x1.0e7d95bc609a9p-11),
+    (double2)(0x1.3400000000000p+0, 0x1.9e6b3804d19e7p-10),
+    (double2)(0x1.3300000000000p+0, 0x1.5c8b6af7963c2p-9),
+    (double2)(0x1.3200000000000p+0, 0x1.eb9dad43bf402p-9),
+    (double2)(0x1.3200000000000p+0, 0x1.f1a515885fb37p-11),
+    (double2)(0x1.3100000000000p+0, 0x1.0eeb1d3d76c02p-9),
+    (double2)(0x1.3000000000000p+0, 0x1.a320261a32026p-9),
+    (double2)(0x1.3000000000000p+0, 0x1.c82ac40260390p-12),
+    (double2)(0x1.2f00000000000p+0, 0x1.a12f684bda12fp-10),
+    (double2)(0x1.2e00000000000p+0, 0x1.69d43fda2962cp-9),
+    (double2)(0x1.2e00000000000p+0, 0x1.2e025c04b8097p-15),
+    (double2)(0x1.2d00000000000p+0, 0x1.42804b542804bp-10),
+    (double2)(0x1.2c00000000000p+0, 0x1.3f69b02593f6ap-9),
+    (double2)(0x1.2b00000000000p+0, 0x1.df31cb46e21fap-9),
+    (double2)(0x1.2b00000000000p+0, 0x1.012b404ad012bp-10),
+    (double2)(0x1.2a00000000000p+0, 0x1.23925e7820a7fp-9),
+    (double2)(0x1.2900000000000p+0, 0x1.c8253c8253c82p-9),
+    (double2)(0x1.2900000000000p+0, 0x1.b92ddc02526e5p-11),
+    (double2)(0x1.2800000000000p+0, 0x1.1602511602511p-9),
+    (double2)(0x1.2700000000000p+0, 0x1.bf471439c9adfp-9),
+    (double2)(0x1.2700000000000p+0, 0x1.a85c40939a85cp-11),
+    (double2)(0x1.2600000000000p+0, 0x1.166f9ac024d16p-9),
+    (double2)(0x1.2500000000000p+0, 0x1.c44e10125e227p-9),
+    (double2)(0x1.2500000000000p+0, 0x1.cebf48bbd90e5p-11),
+    (double2)(0x1.2400000000000p+0, 0x1.2492492492492p-9),
+    (double2)(0x1.2300000000000p+0, 0x1.d6f2e2ec0b673p-9),
+    (double2)(0x1.2300000000000p+0, 0x1.159e26af37c05p-10),
+    (double2)(0x1.2200000000000p+0, 0x1.4024540245402p-9),
+    (double2)(0x1.2100000000000p+0, 0x1.f6f0243f6f024p-9),
+    (double2)(0x1.2100000000000p+0, 0x1.5e60121579805p-10),
+    (double2)(0x1.2000000000000p+0, 0x1.68e18cf81b10fp-9),
+    (double2)(0x1.2000000000000p+0, 0x1.2012012012012p-12),
+    (double2)(0x1.1f00000000000p+0, 0x1.c11f7047dc11fp-10),
+    (double2)(0x1.1e00000000000p+0, 0x1.9e878ff70985ep-9),
+    (double2)(0x1.1e00000000000p+0, 0x1.779d9fdc3a219p-11),
+    (double2)(0x1.1d00000000000p+0, 0x1.1eace5c957907p-9),
+    (double2)(0x1.1c00000000000p+0, 0x1.e0d5b450239e1p-9),
+    (double2)(0x1.1c00000000000p+0, 0x1.48bf073816367p-10),
+    (double2)(0x1.1b00000000000p+0, 0x1.694808dda5202p-9),
+    (double2)(0x1.1b00000000000p+0, 0x1.7c67f2bae2b21p-12),
+    (double2)(0x1.1a00000000000p+0, 0x1.ee58469ee5847p-10),
+    (double2)(0x1.1900000000000p+0, 0x1.c0233c0233c02p-9),
+    (double2)(0x1.1900000000000p+0, 0x1.14e02328a7012p-10),
+    (double2)(0x1.1800000000000p+0, 0x1.561072057b573p-9),
+    (double2)(0x1.1800000000000p+0, 0x1.1811811811812p-12),
+    (double2)(0x1.1700000000000p+0, 0x1.e28646f5a1060p-10),
+    (double2)(0x1.1600000000000p+0, 0x1.c0d1284e6f1d7p-9),
+    (double2)(0x1.1600000000000p+0, 0x1.23543f0c80459p-10),
+    (double2)(0x1.1500000000000p+0, 0x1.63cbeea4e1a09p-9),
+    (double2)(0x1.1500000000000p+0, 0x1.b9a3fdd5c8cb8p-12),
+    (double2)(0x1.1400000000000p+0, 0x1.0be1c159a76d2p-9),
+    (double2)(0x1.1300000000000p+0, 0x1.e1d1a688e4838p-9),
+    (double2)(0x1.1300000000000p+0, 0x1.72044d72044d7p-10),
+    (double2)(0x1.1200000000000p+0, 0x1.91713db81577bp-9),
+    (double2)(0x1.1200000000000p+0, 0x1.ac73ae9819b50p-11),
+    (double2)(0x1.1100000000000p+0, 0x1.460334e904cf6p-9),
+    (double2)(0x1.1100000000000p+0, 0x1.1111111111111p-12),
+    (double2)(0x1.1000000000000p+0, 0x1.feef80441fef0p-10),
+    (double2)(0x1.0f00000000000p+0, 0x1.de021fde021fep-9),
+    (double2)(0x1.0f00000000000p+0, 0x1.7b7eacc9686a0p-10),
+    (double2)(0x1.0e00000000000p+0, 0x1.9ead7cd391fbcp-9),
+    (double2)(0x1.0e00000000000p+0, 0x1.0195609804390p-10),
+    (double2)(0x1.0d00000000000p+0, 0x1.641511e8d2b32p-9),
+    (double2)(0x1.0d00000000000p+0, 0x1.222b1acf1ce96p-11),
+    (double2)(0x1.0c00000000000p+0, 0x1.2e29f79b47582p-9),
+    (double2)(0x1.0c00000000000p+0, 0x1.4f0d1682e11cdp-13),
+    (double2)(0x1.0b00000000000p+0, 0x1.f9bb096771e4dp-10),
+    (double2)(0x1.0a00000000000p+0, 0x1.e5ee45dd96ae2p-9),
+    (double2)(0x1.0a00000000000p+0, 0x1.a0429a0429a04p-10),
+    (double2)(0x1.0900000000000p+0, 0x1.bb74d5f06c021p-9),
+    (double2)(0x1.0900000000000p+0, 0x1.4fce404254fcep-10),
+    (double2)(0x1.0800000000000p+0, 0x1.95766eacbc402p-9),
+    (double2)(0x1.0800000000000p+0, 0x1.0842108421084p-10),
+    (double2)(0x1.0700000000000p+0, 0x1.73e5371d5c338p-9),
+    (double2)(0x1.0700000000000p+0, 0x1.930523fbe3368p-11),
+    (double2)(0x1.0600000000000p+0, 0x1.56b38f225f6c4p-9),
+    (double2)(0x1.0600000000000p+0, 0x1.26e978d4fdf3bp-11),
+    (double2)(0x1.0500000000000p+0, 0x1.3dd40e4eb0cc6p-9),
+    (double2)(0x1.0500000000000p+0, 0x1.97f7d73404146p-12),
+    (double2)(0x1.0400000000000p+0, 0x1.293982cc98af1p-9),
+    (double2)(0x1.0400000000000p+0, 0x1.0410410410410p-12),
+    (double2)(0x1.0300000000000p+0, 0x1.18d6f048ff7e4p-9),
+    (double2)(0x1.0300000000000p+0, 0x1.236a3ebc349dep-13),
+    (double2)(0x1.0200000000000p+0, 0x1.0c9f8ee53d18cp-9),
+    (double2)(0x1.0200000000000p+0, 0x1.0204081020408p-14),
+    (double2)(0x1.0100000000000p+0, 0x1.0486ca2f46ea6p-9),
+    (double2)(0x1.0100000000000p+0, 0x1.0101010101010p-16),
+    (double2)(0x1.0000000000000p+0, 0x1.0080402010080p-9),
+    (double2)(0x1.0000000000000p+0, 0x0.0000000000000p+0),
+};
+
 TABLE_FUNCTION(double2, ATAN_JBY256_TBL, atan_jby256_tbl);
 TABLE_FUNCTION(double2, TWO_TO_JBY64_EP, two_to_jby64_ep_tbl);
 TABLE_FUNCTION(double2, SINH_TBL, sinh_tbl);
@@ -1765,5 +2420,7 @@ TABLE_FUNCTION(double2, COSH_TBL, cosh_tbl);
 TABLE_FUNCTION(double, CBRT_INV_TBL, cbrt_inv_tbl);
 TABLE_FUNCTION(double2, CBRT_DBL_TBL, cbrt_dbl_tbl);
 TABLE_FUNCTION(double2, CBRT_REM_TBL, cbrt_rem_tbl);
+TABLE_FUNCTION(double2, POWLOG_TBL, powlog_tbl);
+TABLE_FUNCTION(double2, LOG_F_INV_TBL, log_f_inv_tbl);
 
 #endif // cl_khr_fp64
diff --git a/generic/lib/math/tables.h b/generic/lib/math/tables.h
index 1339a08..8e1d773 100644
--- a/generic/lib/math/tables.h
+++ b/generic/lib/math/tables.h
@@ -40,6 +40,7 @@
 
 TABLE_FUNCTION_DECL(float2, loge_tbl);
 TABLE_FUNCTION_DECL(float, log_inv_tbl);
+TABLE_FUNCTION_DECL(float2, log_inv_tbl_ep);
 TABLE_FUNCTION_DECL(float2, log2_tbl);
 TABLE_FUNCTION_DECL(uint4,  pibits_tbl);
 TABLE_FUNCTION_DECL(float2, sinhcosh_tbl);
@@ -59,5 +60,7 @@ TABLE_FUNCTION_DECL(double2, cosh_tbl);
 TABLE_FUNCTION_DECL(double, cbrt_inv_tbl);
 TABLE_FUNCTION_DECL(double2, cbrt_dbl_tbl);
 TABLE_FUNCTION_DECL(double2, cbrt_rem_tbl);
+TABLE_FUNCTION_DECL(double2, powlog_tbl);
+TABLE_FUNCTION_DECL(double2, log_f_inv_tbl);
 
 #endif // cl_khr_fp64
-- 
2.14.3



More information about the Libclc-dev mailing list