Average Error: 0.1 → 0.1
Time: 25.9s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(\left(1 - \mathsf{fma}\left(\log t, \frac{2}{3}, \log \left(\sqrt[3]{{\left({t}^{\left(\sqrt[3]{\frac{2}{3}} \cdot \sqrt[3]{\frac{2}{3}}\right)}\right)}^{\left(\sqrt[3]{\frac{2}{3}}\right)}}\right)\right)\right) - \log \left(\sqrt[3]{\sqrt[3]{t}}\right), z, y\right)\right) + x\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(\left(1 - \mathsf{fma}\left(\log t, \frac{2}{3}, \log \left(\sqrt[3]{{\left({t}^{\left(\sqrt[3]{\frac{2}{3}} \cdot \sqrt[3]{\frac{2}{3}}\right)}\right)}^{\left(\sqrt[3]{\frac{2}{3}}\right)}}\right)\right)\right) - \log \left(\sqrt[3]{\sqrt[3]{t}}\right), z, y\right)\right) + x
double f(double x, double y, double z, double t, double a, double b) {
        double r226824 = x;
        double r226825 = y;
        double r226826 = r226824 + r226825;
        double r226827 = z;
        double r226828 = r226826 + r226827;
        double r226829 = t;
        double r226830 = log(r226829);
        double r226831 = r226827 * r226830;
        double r226832 = r226828 - r226831;
        double r226833 = a;
        double r226834 = 0.5;
        double r226835 = r226833 - r226834;
        double r226836 = b;
        double r226837 = r226835 * r226836;
        double r226838 = r226832 + r226837;
        return r226838;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r226839 = b;
        double r226840 = a;
        double r226841 = 0.5;
        double r226842 = r226840 - r226841;
        double r226843 = 1.0;
        double r226844 = t;
        double r226845 = log(r226844);
        double r226846 = 0.6666666666666666;
        double r226847 = cbrt(r226846);
        double r226848 = r226847 * r226847;
        double r226849 = pow(r226844, r226848);
        double r226850 = pow(r226849, r226847);
        double r226851 = cbrt(r226850);
        double r226852 = log(r226851);
        double r226853 = fma(r226845, r226846, r226852);
        double r226854 = r226843 - r226853;
        double r226855 = cbrt(r226844);
        double r226856 = cbrt(r226855);
        double r226857 = log(r226856);
        double r226858 = r226854 - r226857;
        double r226859 = z;
        double r226860 = y;
        double r226861 = fma(r226858, r226859, r226860);
        double r226862 = fma(r226839, r226842, r226861);
        double r226863 = x;
        double r226864 = r226862 + r226863;
        return r226864;
}

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

Target

Original0.1
Target0.4
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\left(\log t\right)}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b\]

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
  2. Simplified0.1

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

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

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

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

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

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

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

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(\left(1 - 2 \cdot \log \left(\sqrt[3]{t}\right)\right) - \color{blue}{\left(\log \left(\sqrt[3]{\sqrt[3]{t} \cdot \sqrt[3]{t}}\right) + \log \left(\sqrt[3]{\sqrt[3]{t}}\right)\right)}, z, y\right)\right) + x\]
  12. Applied associate--r+0.1

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

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(\color{blue}{\left(1 - \mathsf{fma}\left(\log t, \frac{2}{3}, \log \left(\sqrt[3]{{t}^{\frac{2}{3}}}\right)\right)\right)} - \log \left(\sqrt[3]{\sqrt[3]{t}}\right), z, y\right)\right) + x\]
  14. Using strategy rm
  15. Applied add-cube-cbrt0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(\left(1 - \mathsf{fma}\left(\log t, \frac{2}{3}, \log \left(\sqrt[3]{{t}^{\color{blue}{\left(\left(\sqrt[3]{\frac{2}{3}} \cdot \sqrt[3]{\frac{2}{3}}\right) \cdot \sqrt[3]{\frac{2}{3}}\right)}}}\right)\right)\right) - \log \left(\sqrt[3]{\sqrt[3]{t}}\right), z, y\right)\right) + x\]
  16. Applied pow-unpow0.1

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

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

Reproduce

herbie shell --seed 2019212 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))