Average Error: 0.3 → 0.3
Time: 21.2s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\left(\log \left(\sqrt{z}\right) - t\right) + \left(\log \left(x + y\right) + \log \left(\sqrt{z}\right)\right)\right) + \left(a - 0.5\right) \cdot \log t\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\left(\log \left(\sqrt{z}\right) - t\right) + \left(\log \left(x + y\right) + \log \left(\sqrt{z}\right)\right)\right) + \left(a - 0.5\right) \cdot \log t
double f(double x, double y, double z, double t, double a) {
        double r62434 = x;
        double r62435 = y;
        double r62436 = r62434 + r62435;
        double r62437 = log(r62436);
        double r62438 = z;
        double r62439 = log(r62438);
        double r62440 = r62437 + r62439;
        double r62441 = t;
        double r62442 = r62440 - r62441;
        double r62443 = a;
        double r62444 = 0.5;
        double r62445 = r62443 - r62444;
        double r62446 = log(r62441);
        double r62447 = r62445 * r62446;
        double r62448 = r62442 + r62447;
        return r62448;
}

double f(double x, double y, double z, double t, double a) {
        double r62449 = z;
        double r62450 = sqrt(r62449);
        double r62451 = log(r62450);
        double r62452 = t;
        double r62453 = r62451 - r62452;
        double r62454 = x;
        double r62455 = y;
        double r62456 = r62454 + r62455;
        double r62457 = log(r62456);
        double r62458 = r62457 + r62451;
        double r62459 = r62453 + r62458;
        double r62460 = a;
        double r62461 = 0.5;
        double r62462 = r62460 - r62461;
        double r62463 = log(r62452);
        double r62464 = r62462 * r62463;
        double r62465 = r62459 + r62464;
        return r62465;
}

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

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 *-un-lft-identity0.3

    \[\leadsto \left(\left(\log \left(x + y\right) + \log z\right) - \color{blue}{1 \cdot t}\right) + \left(a - 0.5\right) \cdot \log t\]
  4. Applied *-un-lft-identity0.3

    \[\leadsto \left(\color{blue}{1 \cdot \left(\log \left(x + y\right) + \log z\right)} - 1 \cdot t\right) + \left(a - 0.5\right) \cdot \log t\]
  5. Applied distribute-lft-out--0.3

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

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

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

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

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

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

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

Reproduce

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