Average Error: 0.1 → 0.1
Time: 20.2s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)
double f(double x, double y, double z) {
        double r395807 = x;
        double r395808 = y;
        double r395809 = 0.5;
        double r395810 = r395808 + r395809;
        double r395811 = log(r395808);
        double r395812 = r395810 * r395811;
        double r395813 = r395807 - r395812;
        double r395814 = r395813 + r395808;
        double r395815 = z;
        double r395816 = r395814 - r395815;
        return r395816;
}

double f(double x, double y, double z) {
        double r395817 = x;
        double r395818 = y;
        double r395819 = 0.5;
        double r395820 = r395818 + r395819;
        double r395821 = log(r395818);
        double r395822 = r395820 * r395821;
        double r395823 = r395822 - r395818;
        double r395824 = z;
        double r395825 = r395823 + r395824;
        double r395826 = r395817 - r395825;
        return r395826;
}

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(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]

Reproduce

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