Average Error: 0.1 → 0.1
Time: 6.3s
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 r625354 = x;
        double r625355 = y;
        double r625356 = r625354 + r625355;
        double r625357 = z;
        double r625358 = r625356 + r625357;
        double r625359 = t;
        double r625360 = log(r625359);
        double r625361 = r625357 * r625360;
        double r625362 = r625358 - r625361;
        double r625363 = a;
        double r625364 = 0.5;
        double r625365 = r625363 - r625364;
        double r625366 = b;
        double r625367 = r625365 * r625366;
        double r625368 = r625362 + r625367;
        return r625368;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r625369 = x;
        double r625370 = y;
        double r625371 = r625369 + r625370;
        double r625372 = 1.0;
        double r625373 = t;
        double r625374 = log(r625373);
        double r625375 = r625372 - r625374;
        double r625376 = z;
        double r625377 = r625375 * r625376;
        double r625378 = r625371 + r625377;
        double r625379 = a;
        double r625380 = 0.5;
        double r625381 = r625379 - r625380;
        double r625382 = b;
        double r625383 = r625381 * r625382;
        double r625384 = r625378 + r625383;
        return r625384;
}

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.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. 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 2019362 
(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)))