Average Error: 0.3 → 0.3
Time: 10.9s
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) + \left(\log z - t\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(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a - 0.5\right) \cdot \log t
double f(double x, double y, double z, double t, double a) {
        double r65156 = x;
        double r65157 = y;
        double r65158 = r65156 + r65157;
        double r65159 = log(r65158);
        double r65160 = z;
        double r65161 = log(r65160);
        double r65162 = r65159 + r65161;
        double r65163 = t;
        double r65164 = r65162 - r65163;
        double r65165 = a;
        double r65166 = 0.5;
        double r65167 = r65165 - r65166;
        double r65168 = log(r65163);
        double r65169 = r65167 * r65168;
        double r65170 = r65164 + r65169;
        return r65170;
}

double f(double x, double y, double z, double t, double a) {
        double r65171 = x;
        double r65172 = y;
        double r65173 = r65171 + r65172;
        double r65174 = log(r65173);
        double r65175 = z;
        double r65176 = log(r65175);
        double r65177 = t;
        double r65178 = r65176 - r65177;
        double r65179 = r65174 + r65178;
        double r65180 = a;
        double r65181 = 0.5;
        double r65182 = r65180 - r65181;
        double r65183 = log(r65177);
        double r65184 = r65182 * r65183;
        double r65185 = r65179 + r65184;
        return r65185;
}

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. Using strategy rm
  6. Applied associate-+r+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}\]
  7. Final simplification0.3

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

Reproduce

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