Average Error: 0.1 → 0.1
Time: 43.2s
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\]
\[\left(\left(t + \mathsf{fma}\left(\log y, x, z\right)\right) + \mathsf{fma}\left(y, i, a\right)\right) + \mathsf{fma}\left(\log \left(\sqrt[3]{c}\right), \left(b - 0.5\right) + \left(b - 0.5\right), \log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\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
\left(\left(t + \mathsf{fma}\left(\log y, x, z\right)\right) + \mathsf{fma}\left(y, i, a\right)\right) + \mathsf{fma}\left(\log \left(\sqrt[3]{c}\right), \left(b - 0.5\right) + \left(b - 0.5\right), \log \left(\sqrt[3]{c}\right) \cdot \left(b - 0.5\right)\right)
double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3927079 = x;
        double r3927080 = y;
        double r3927081 = log(r3927080);
        double r3927082 = r3927079 * r3927081;
        double r3927083 = z;
        double r3927084 = r3927082 + r3927083;
        double r3927085 = t;
        double r3927086 = r3927084 + r3927085;
        double r3927087 = a;
        double r3927088 = r3927086 + r3927087;
        double r3927089 = b;
        double r3927090 = 0.5;
        double r3927091 = r3927089 - r3927090;
        double r3927092 = c;
        double r3927093 = log(r3927092);
        double r3927094 = r3927091 * r3927093;
        double r3927095 = r3927088 + r3927094;
        double r3927096 = i;
        double r3927097 = r3927080 * r3927096;
        double r3927098 = r3927095 + r3927097;
        return r3927098;
}

double f(double x, double y, double z, double t, double a, double b, double c, double i) {
        double r3927099 = t;
        double r3927100 = y;
        double r3927101 = log(r3927100);
        double r3927102 = x;
        double r3927103 = z;
        double r3927104 = fma(r3927101, r3927102, r3927103);
        double r3927105 = r3927099 + r3927104;
        double r3927106 = i;
        double r3927107 = a;
        double r3927108 = fma(r3927100, r3927106, r3927107);
        double r3927109 = r3927105 + r3927108;
        double r3927110 = c;
        double r3927111 = cbrt(r3927110);
        double r3927112 = log(r3927111);
        double r3927113 = b;
        double r3927114 = 0.5;
        double r3927115 = r3927113 - r3927114;
        double r3927116 = r3927115 + r3927115;
        double r3927117 = r3927112 * r3927115;
        double r3927118 = fma(r3927112, r3927116, r3927117);
        double r3927119 = r3927109 + r3927118;
        return r3927119;
}

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. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(y, i, a\right)\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

    \[\leadsto \color{blue}{\left(\left(b - 0.5\right) \cdot \log c + \mathsf{fma}\left(y, i, a\right)\right)} + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)\]
  5. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(b - 0.5\right) \cdot \log c + \left(\mathsf{fma}\left(y, i, a\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)\right)}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt0.1

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

    \[\leadsto \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)} + \left(\mathsf{fma}\left(y, i, a\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\]
  9. Applied distribute-lft-in0.1

    \[\leadsto \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)} + \left(\mathsf{fma}\left(y, i, a\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\]
  10. Simplified0.1

    \[\leadsto \left(\color{blue}{\left(\left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right) + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right)} + \left(b - 0.5\right) \cdot \log \left(\sqrt[3]{c}\right)\right) + \left(\mathsf{fma}\left(y, i, a\right) + \left(\mathsf{fma}\left(\log y, x, z\right) + t\right)\right)\]
  11. Using strategy rm
  12. Applied distribute-rgt-out0.1

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

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

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

Reproduce

herbie shell --seed 2019163 +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)))