Average Error: 0.3 → 0.3
Time: 10.0s
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) + \log z\right) - \left(t - \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) + \log z\right) - \left(t - \left(a - 0.5\right) \cdot \log t\right)
double f(double x, double y, double z, double t, double a) {
        double r47645 = x;
        double r47646 = y;
        double r47647 = r47645 + r47646;
        double r47648 = log(r47647);
        double r47649 = z;
        double r47650 = log(r47649);
        double r47651 = r47648 + r47650;
        double r47652 = t;
        double r47653 = r47651 - r47652;
        double r47654 = a;
        double r47655 = 0.5;
        double r47656 = r47654 - r47655;
        double r47657 = log(r47652);
        double r47658 = r47656 * r47657;
        double r47659 = r47653 + r47658;
        return r47659;
}

double f(double x, double y, double z, double t, double a) {
        double r47660 = x;
        double r47661 = y;
        double r47662 = r47660 + r47661;
        double r47663 = log(r47662);
        double r47664 = z;
        double r47665 = log(r47664);
        double r47666 = r47663 + r47665;
        double r47667 = t;
        double r47668 = a;
        double r47669 = 0.5;
        double r47670 = r47668 - r47669;
        double r47671 = log(r47667);
        double r47672 = r47670 * r47671;
        double r47673 = r47667 - r47672;
        double r47674 = r47666 - r47673;
        return r47674;
}

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

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

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

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

Reproduce

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