Average Error: 0.3 → 0.3
Time: 32.6s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\log \left(x + y\right) - t\right) - \left(\left(-\log z\right) - \left(a - 0.5\right) \cdot \log t\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\log \left(x + y\right) - t\right) - \left(\left(-\log z\right) - \left(a - 0.5\right) \cdot \log t\right)
double f(double x, double y, double z, double t, double a) {
        double r61273 = x;
        double r61274 = y;
        double r61275 = r61273 + r61274;
        double r61276 = log(r61275);
        double r61277 = z;
        double r61278 = log(r61277);
        double r61279 = r61276 + r61278;
        double r61280 = t;
        double r61281 = r61279 - r61280;
        double r61282 = a;
        double r61283 = 0.5;
        double r61284 = r61282 - r61283;
        double r61285 = log(r61280);
        double r61286 = r61284 * r61285;
        double r61287 = r61281 + r61286;
        return r61287;
}

double f(double x, double y, double z, double t, double a) {
        double r61288 = x;
        double r61289 = y;
        double r61290 = r61288 + r61289;
        double r61291 = log(r61290);
        double r61292 = t;
        double r61293 = r61291 - r61292;
        double r61294 = z;
        double r61295 = log(r61294);
        double r61296 = -r61295;
        double r61297 = a;
        double r61298 = 0.5;
        double r61299 = r61297 - r61298;
        double r61300 = log(r61292);
        double r61301 = r61299 * r61300;
        double r61302 = r61296 - r61301;
        double r61303 = r61293 - r61302;
        return r61303;
}

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. Simplified0.3

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

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

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

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

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

Reproduce

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