Average Error: 0.1 → 0.1
Time: 6.8s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(\left(x + y\right) + \left(1 - \log t\right) \cdot z\right) + \left(a - 0.5\right) \cdot b\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(\left(x + y\right) + \left(1 - \log t\right) \cdot z\right) + \left(a - 0.5\right) \cdot b
double f(double x, double y, double z, double t, double a, double b) {
        double r416690 = x;
        double r416691 = y;
        double r416692 = r416690 + r416691;
        double r416693 = z;
        double r416694 = r416692 + r416693;
        double r416695 = t;
        double r416696 = log(r416695);
        double r416697 = r416693 * r416696;
        double r416698 = r416694 - r416697;
        double r416699 = a;
        double r416700 = 0.5;
        double r416701 = r416699 - r416700;
        double r416702 = b;
        double r416703 = r416701 * r416702;
        double r416704 = r416698 + r416703;
        return r416704;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r416705 = x;
        double r416706 = y;
        double r416707 = r416705 + r416706;
        double r416708 = 1.0;
        double r416709 = t;
        double r416710 = log(r416709);
        double r416711 = r416708 - r416710;
        double r416712 = z;
        double r416713 = r416711 * r416712;
        double r416714 = r416707 + r416713;
        double r416715 = a;
        double r416716 = 0.5;
        double r416717 = r416715 - r416716;
        double r416718 = b;
        double r416719 = r416717 * r416718;
        double r416720 = r416714 + r416719;
        return r416720;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.3
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. Using strategy rm
  3. Applied associate--l+0.1

    \[\leadsto \color{blue}{\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right)} + \left(a - 0.5\right) \cdot b\]
  4. Taylor expanded around 0 0.1

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

    \[\leadsto \left(\left(x + y\right) + \color{blue}{\left(1 - \log t\right) \cdot z}\right) + \left(a - 0.5\right) \cdot b\]
  6. Final simplification0.1

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

Reproduce

herbie shell --seed 2020001 
(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)))