Average Error: 0.1 → 0.1
Time: 28.8s
Precision: 64
\[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
\[i \cdot y + \left(\log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right) + \left(a + \mathsf{fma}\left(\log \left({c}^{\frac{1}{3}}\right) \cdot 2, b - 0.5, \mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\right)\]
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
i \cdot y + \left(\log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right) + \left(a + \mathsf{fma}\left(\log \left({c}^{\frac{1}{3}}\right) \cdot 2, b - 0.5, \mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r78977 = x;
        double r78978 = y;
        double r78979 = log(r78978);
        double r78980 = r78977 * r78979;
        double r78981 = z;
        double r78982 = r78980 + r78981;
        double r78983 = t;
        double r78984 = r78982 + r78983;
        double r78985 = a;
        double r78986 = r78984 + r78985;
        double r78987 = b;
        double r78988 = 0.5;
        double r78989 = r78987 - r78988;
        double r78990 = c;
        double r78991 = log(r78990);
        double r78992 = r78989 * r78991;
        double r78993 = r78986 + r78992;
        double r78994 = i;
        double r78995 = r78978 * r78994;
        double r78996 = r78993 + r78995;
        return r78996;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r78997 = i;
        double r78998 = y;
        double r78999 = r78997 * r78998;
        double r79000 = c;
        double r79001 = cbrt(r79000);
        double r79002 = log(r79001);
        double r79003 = b;
        double r79004 = 0.5;
        double r79005 = r79003 - r79004;
        double r79006 = r79002 * r79005;
        double r79007 = a;
        double r79008 = 0.3333333333333333;
        double r79009 = pow(r79000, r79008);
        double r79010 = log(r79009);
        double r79011 = 2.0;
        double r79012 = r79010 * r79011;
        double r79013 = log(r78998);
        double r79014 = x;
        double r79015 = z;
        double r79016 = fma(r79013, r79014, r79015);
        double r79017 = t;
        double r79018 = r79016 + r79017;
        double r79019 = fma(r79012, r79005, r79018);
        double r79020 = r79007 + r79019;
        double r79021 = r79006 + r79020;
        double r79022 = r78999 + r79021;
        return r79022;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus i

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.1

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \sqrt[3]{c}\right)}\right) + y \cdot i\]
  4. Applied log-prod0.1

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \color{blue}{\left(\log \left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) + \log \left(\sqrt[3]{c}\right)\right)}\right) + y \cdot i\]
  5. Applied distribute-lft-in0.1

    \[\leadsto \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \color{blue}{\left(\left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right)}\right) + y \cdot i\]
  6. Applied associate-+r+0.1

    \[\leadsto \color{blue}{\left(\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right)\right) + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right)} + y \cdot i\]
  7. Simplified0.1

    \[\leadsto \left(\color{blue}{\left(\mathsf{fma}\left(2 \cdot \log \left(\sqrt[3]{c}\right), b - 0.5, \mathsf{fma}\left(\log y, x, z\right) + t\right) + a\right)} + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right) + y \cdot i\]
  8. Using strategy rm
  9. Applied pow1/30.1

    \[\leadsto \left(\left(\mathsf{fma}\left(2 \cdot \log \color{blue}{\left({c}^{\frac{1}{3}}\right)}, b - 0.5, \mathsf{fma}\left(\log y, x, z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right) + y \cdot i\]
  10. Final simplification0.1

    \[\leadsto i \cdot y + \left(\log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right) + \left(a + \mathsf{fma}\left(\log \left({c}^{\frac{1}{3}}\right) \cdot 2, b - 0.5, \mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\right)\]

Reproduce

herbie shell --seed 2019196 +o rules:numerics
(FPCore (x y z t a b c i)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
  (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))