Average Error: 0.1 → 0.1
Time: 6.2s
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 r453443 = x;
        double r453444 = y;
        double r453445 = r453443 + r453444;
        double r453446 = z;
        double r453447 = r453445 + r453446;
        double r453448 = t;
        double r453449 = log(r453448);
        double r453450 = r453446 * r453449;
        double r453451 = r453447 - r453450;
        double r453452 = a;
        double r453453 = 0.5;
        double r453454 = r453452 - r453453;
        double r453455 = b;
        double r453456 = r453454 * r453455;
        double r453457 = r453451 + r453456;
        return r453457;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r453458 = x;
        double r453459 = y;
        double r453460 = r453458 + r453459;
        double r453461 = 1.0;
        double r453462 = t;
        double r453463 = log(r453462);
        double r453464 = r453461 - r453463;
        double r453465 = z;
        double r453466 = r453464 * r453465;
        double r453467 = r453460 + r453466;
        double r453468 = a;
        double r453469 = 0.5;
        double r453470 = r453468 - r453469;
        double r453471 = b;
        double r453472 = r453470 * r453471;
        double r453473 = r453467 + r453472;
        return r453473;
}

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 2020083 
(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)))