Average Error: 0.1 → 0.1
Time: 18.7s
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(2 \cdot \log \left(\frac{\sqrt[3]{e}}{\sqrt[3]{t}}\right) + \log \left(\frac{\sqrt[3]{e}}{\sqrt[3]{t}}\right), z, \mathsf{fma}\left(b, a - 0.5, x\right) + y\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(2 \cdot \log \left(\frac{\sqrt[3]{e}}{\sqrt[3]{t}}\right) + \log \left(\frac{\sqrt[3]{e}}{\sqrt[3]{t}}\right), z, \mathsf{fma}\left(b, a - 0.5, x\right) + y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r224760 = x;
        double r224761 = y;
        double r224762 = r224760 + r224761;
        double r224763 = z;
        double r224764 = r224762 + r224763;
        double r224765 = t;
        double r224766 = log(r224765);
        double r224767 = r224763 * r224766;
        double r224768 = r224764 - r224767;
        double r224769 = a;
        double r224770 = 0.5;
        double r224771 = r224769 - r224770;
        double r224772 = b;
        double r224773 = r224771 * r224772;
        double r224774 = r224768 + r224773;
        return r224774;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r224775 = 2.0;
        double r224776 = exp(1.0);
        double r224777 = cbrt(r224776);
        double r224778 = t;
        double r224779 = cbrt(r224778);
        double r224780 = r224777 / r224779;
        double r224781 = log(r224780);
        double r224782 = r224775 * r224781;
        double r224783 = r224782 + r224781;
        double r224784 = z;
        double r224785 = b;
        double r224786 = a;
        double r224787 = 0.5;
        double r224788 = r224786 - r224787;
        double r224789 = x;
        double r224790 = fma(r224785, r224788, r224789);
        double r224791 = y;
        double r224792 = r224790 + r224791;
        double r224793 = fma(r224783, r224784, r224792);
        return r224793;
}

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.5
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(1 - \log t, z, \mathsf{fma}\left(b, a - 0.5, x\right) + y\right)}\]
  3. Using strategy rm
  4. Applied add-log-exp0.1

    \[\leadsto \mathsf{fma}\left(\color{blue}{\log \left(e^{1}\right)} - \log t, z, \mathsf{fma}\left(b, a - 0.5, x\right) + y\right)\]
  5. Applied diff-log0.1

    \[\leadsto \mathsf{fma}\left(\color{blue}{\log \left(\frac{e^{1}}{t}\right)}, z, \mathsf{fma}\left(b, a - 0.5, x\right) + y\right)\]
  6. Simplified0.1

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

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

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

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

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

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

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

Reproduce

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

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

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