Average Error: 0.1 → 0.1
Time: 24.4s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z
double f(double x, double y, double z) {
        double r20096820 = x;
        double r20096821 = y;
        double r20096822 = 0.5;
        double r20096823 = r20096821 + r20096822;
        double r20096824 = log(r20096821);
        double r20096825 = r20096823 * r20096824;
        double r20096826 = r20096820 - r20096825;
        double r20096827 = r20096826 + r20096821;
        double r20096828 = z;
        double r20096829 = r20096827 - r20096828;
        return r20096829;
}

double f(double x, double y, double z) {
        double r20096830 = x;
        double r20096831 = y;
        double r20096832 = 0.5;
        double r20096833 = r20096831 + r20096832;
        double r20096834 = log(r20096831);
        double r20096835 = r20096833 * r20096834;
        double r20096836 = r20096835 - r20096831;
        double r20096837 = r20096830 - r20096836;
        double r20096838 = z;
        double r20096839 = r20096837 - r20096838;
        return r20096839;
}

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. Final simplification0.1

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

Reproduce

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