Average Error: 0.1 → 0.1
Time: 13.2s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x + \left(y - \log y \cdot \left(y + \frac{1}{2}\right)\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \left(y - \log y \cdot \left(y + \frac{1}{2}\right)\right)\right) - z
double f(double x, double y, double z) {
        double r358814 = x;
        double r358815 = y;
        double r358816 = 0.5;
        double r358817 = r358815 + r358816;
        double r358818 = log(r358815);
        double r358819 = r358817 * r358818;
        double r358820 = r358814 - r358819;
        double r358821 = r358820 + r358815;
        double r358822 = z;
        double r358823 = r358821 - r358822;
        return r358823;
}

double f(double x, double y, double z) {
        double r358824 = x;
        double r358825 = y;
        double r358826 = log(r358825);
        double r358827 = 1.0;
        double r358828 = 2.0;
        double r358829 = r358827 / r358828;
        double r358830 = r358825 + r358829;
        double r358831 = r358826 * r358830;
        double r358832 = r358825 - r358831;
        double r358833 = r358824 + r358832;
        double r358834 = z;
        double r358835 = r358833 - r358834;
        return r358835;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[\left(\left(y + x\right) - z\right) - \left(y + 0.5\right) \cdot \log y\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
  2. Simplified0.1

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

    \[\leadsto \left(\color{blue}{\left(x + \left(-\left(y + \frac{1}{2}\right) \cdot \log y\right)\right)} + y\right) - z\]
  5. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(x + \left(\left(-\left(y + \frac{1}{2}\right) \cdot \log y\right) + y\right)\right)} - z\]
  6. Simplified0.1

    \[\leadsto \left(x + \color{blue}{\left(y - \log y \cdot \left(y + \frac{1}{2}\right)\right)}\right) - z\]
  7. Final simplification0.1

    \[\leadsto \left(x + \left(y - \log y \cdot \left(y + \frac{1}{2}\right)\right)\right) - z\]

Reproduce

herbie shell --seed 2019304 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))