Average Error: 0.1 → 0.1
Time: 5.2s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(x + y\right) + \left(z + \left(\left(a - 0.5\right) \cdot b - \log \left(\sqrt{t}\right) \cdot \left(z + z\right)\right)\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(x + y\right) + \left(z + \left(\left(a - 0.5\right) \cdot b - \log \left(\sqrt{t}\right) \cdot \left(z + z\right)\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r431299 = x;
        double r431300 = y;
        double r431301 = r431299 + r431300;
        double r431302 = z;
        double r431303 = r431301 + r431302;
        double r431304 = t;
        double r431305 = log(r431304);
        double r431306 = r431302 * r431305;
        double r431307 = r431303 - r431306;
        double r431308 = a;
        double r431309 = 0.5;
        double r431310 = r431308 - r431309;
        double r431311 = b;
        double r431312 = r431310 * r431311;
        double r431313 = r431307 + r431312;
        return r431313;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r431314 = x;
        double r431315 = y;
        double r431316 = r431314 + r431315;
        double r431317 = z;
        double r431318 = a;
        double r431319 = 0.5;
        double r431320 = r431318 - r431319;
        double r431321 = b;
        double r431322 = r431320 * r431321;
        double r431323 = t;
        double r431324 = sqrt(r431323);
        double r431325 = log(r431324);
        double r431326 = r431317 + r431317;
        double r431327 = r431325 * r431326;
        double r431328 = r431322 - r431327;
        double r431329 = r431317 + r431328;
        double r431330 = r431316 + r431329;
        return r431330;
}

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. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(x + y\right) + \left(\left(z - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\right)}\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt0.1

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

    \[\leadsto \left(x + y\right) + \left(\left(z - z \cdot \color{blue}{\left(\log \left(\sqrt{t}\right) + \log \left(\sqrt{t}\right)\right)}\right) + \left(a - 0.5\right) \cdot b\right)\]
  8. Applied distribute-lft-in0.1

    \[\leadsto \left(x + y\right) + \left(\left(z - \color{blue}{\left(z \cdot \log \left(\sqrt{t}\right) + z \cdot \log \left(\sqrt{t}\right)\right)}\right) + \left(a - 0.5\right) \cdot b\right)\]
  9. Using strategy rm
  10. Applied sub-neg0.1

    \[\leadsto \left(x + y\right) + \left(\color{blue}{\left(z + \left(-\left(z \cdot \log \left(\sqrt{t}\right) + z \cdot \log \left(\sqrt{t}\right)\right)\right)\right)} + \left(a - 0.5\right) \cdot b\right)\]
  11. Applied associate-+l+0.1

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

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

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

Reproduce

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