Average Error: 0.3 → 0.3
Time: 36.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 z + \log t \cdot a\right) - \left(t + 0.5 \cdot \log t\right)\right) + \log \left(y + x\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\left(\log z + \log t \cdot a\right) - \left(t + 0.5 \cdot \log t\right)\right) + \log \left(y + x\right)
double f(double x, double y, double z, double t, double a) {
        double r2525267 = x;
        double r2525268 = y;
        double r2525269 = r2525267 + r2525268;
        double r2525270 = log(r2525269);
        double r2525271 = z;
        double r2525272 = log(r2525271);
        double r2525273 = r2525270 + r2525272;
        double r2525274 = t;
        double r2525275 = r2525273 - r2525274;
        double r2525276 = a;
        double r2525277 = 0.5;
        double r2525278 = r2525276 - r2525277;
        double r2525279 = log(r2525274);
        double r2525280 = r2525278 * r2525279;
        double r2525281 = r2525275 + r2525280;
        return r2525281;
}

double f(double x, double y, double z, double t, double a) {
        double r2525282 = z;
        double r2525283 = log(r2525282);
        double r2525284 = t;
        double r2525285 = log(r2525284);
        double r2525286 = a;
        double r2525287 = r2525285 * r2525286;
        double r2525288 = r2525283 + r2525287;
        double r2525289 = 0.5;
        double r2525290 = r2525289 * r2525285;
        double r2525291 = r2525284 + r2525290;
        double r2525292 = r2525288 - r2525291;
        double r2525293 = y;
        double r2525294 = x;
        double r2525295 = r2525293 + r2525294;
        double r2525296 = log(r2525295);
        double r2525297 = r2525292 + r2525296;
        return r2525297;
}

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 associate--l+0.3

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

    \[\leadsto \color{blue}{\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)}\]
  5. Taylor expanded around 0 0.3

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

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

Reproduce

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