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 r364345 = x;
        double r364346 = y;
        double r364347 = r364345 + r364346;
        double r364348 = z;
        double r364349 = r364347 + r364348;
        double r364350 = t;
        double r364351 = log(r364350);
        double r364352 = r364348 * r364351;
        double r364353 = r364349 - r364352;
        double r364354 = a;
        double r364355 = 0.5;
        double r364356 = r364354 - r364355;
        double r364357 = b;
        double r364358 = r364356 * r364357;
        double r364359 = r364353 + r364358;
        return r364359;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r364360 = x;
        double r364361 = y;
        double r364362 = r364360 + r364361;
        double r364363 = 1.0;
        double r364364 = t;
        double r364365 = log(r364364);
        double r364366 = r364363 - r364365;
        double r364367 = z;
        double r364368 = r364366 * r364367;
        double r364369 = r364362 + r364368;
        double r364370 = a;
        double r364371 = 0.5;
        double r364372 = r364370 - r364371;
        double r364373 = b;
        double r364374 = r364372 * r364373;
        double r364375 = r364369 + r364374;
        return r364375;
}

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