Average Error: 0.3 → 0.3
Time: 29.2s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(2 \cdot \left(\log \left(\sqrt{t}\right) \cdot \left(a - 0.5\right)\right) + \log z\right) - \left(t - \log \left(x + y\right)\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(2 \cdot \left(\log \left(\sqrt{t}\right) \cdot \left(a - 0.5\right)\right) + \log z\right) - \left(t - \log \left(x + y\right)\right)
double f(double x, double y, double z, double t, double a) {
        double r224332 = x;
        double r224333 = y;
        double r224334 = r224332 + r224333;
        double r224335 = log(r224334);
        double r224336 = z;
        double r224337 = log(r224336);
        double r224338 = r224335 + r224337;
        double r224339 = t;
        double r224340 = r224338 - r224339;
        double r224341 = a;
        double r224342 = 0.5;
        double r224343 = r224341 - r224342;
        double r224344 = log(r224339);
        double r224345 = r224343 * r224344;
        double r224346 = r224340 + r224345;
        return r224346;
}

double f(double x, double y, double z, double t, double a) {
        double r224347 = 2.0;
        double r224348 = t;
        double r224349 = sqrt(r224348);
        double r224350 = log(r224349);
        double r224351 = a;
        double r224352 = 0.5;
        double r224353 = r224351 - r224352;
        double r224354 = r224350 * r224353;
        double r224355 = r224347 * r224354;
        double r224356 = z;
        double r224357 = log(r224356);
        double r224358 = r224355 + r224357;
        double r224359 = x;
        double r224360 = y;
        double r224361 = r224359 + r224360;
        double r224362 = log(r224361);
        double r224363 = r224348 - r224362;
        double r224364 = r224358 - r224363;
        return r224364;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.3
Target0.2
Herbie0.3
\[\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)\]

Derivation

  1. Initial program 0.3

    \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.3

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

    \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \color{blue}{\left(\log \left(\sqrt{t}\right) + \log \left(\sqrt{t}\right)\right)}\]
  5. Applied distribute-rgt-in0.3

    \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \color{blue}{\left(\log \left(\sqrt{t}\right) \cdot \left(a - 0.5\right) + \log \left(\sqrt{t}\right) \cdot \left(a - 0.5\right)\right)}\]
  6. Applied associate-+r+0.3

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

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

    \[\leadsto \left(\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log \left(\sqrt{t}\right) \cdot \left(a - 0.5\right)\right) + \color{blue}{\left(\log \left(\sqrt{t}\right) \cdot a + \log \left(\sqrt{t}\right) \cdot \left(-0.5\right)\right)}\]
  10. Applied associate-+r+0.3

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

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

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

Reproduce

herbie shell --seed 2019298 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))

  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))