Average Error: 0.1 → 0.1
Time: 18.5s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(z + \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(z + \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)
double f(double x, double y, double z) {
        double r15010794 = x;
        double r15010795 = y;
        double r15010796 = 0.5;
        double r15010797 = r15010795 + r15010796;
        double r15010798 = log(r15010795);
        double r15010799 = r15010797 * r15010798;
        double r15010800 = r15010794 - r15010799;
        double r15010801 = r15010800 + r15010795;
        double r15010802 = z;
        double r15010803 = r15010801 - r15010802;
        return r15010803;
}

double f(double x, double y, double z) {
        double r15010804 = x;
        double r15010805 = z;
        double r15010806 = y;
        double r15010807 = 0.5;
        double r15010808 = r15010806 + r15010807;
        double r15010809 = log(r15010806);
        double r15010810 = r15010808 * r15010809;
        double r15010811 = r15010810 - r15010806;
        double r15010812 = r15010805 + r15010811;
        double r15010813 = r15010804 - r15010812;
        return r15010813;
}

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. Using strategy rm
  3. Applied associate-+l-0.1

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

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

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

Reproduce

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

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

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