Average Error: 0.1 → 0.1
Time: 8.3s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
double f(double x, double y, double z) {
        double r308647 = x;
        double r308648 = y;
        double r308649 = 0.5;
        double r308650 = r308648 + r308649;
        double r308651 = log(r308648);
        double r308652 = r308650 * r308651;
        double r308653 = r308647 - r308652;
        double r308654 = r308653 + r308648;
        double r308655 = z;
        double r308656 = r308654 - r308655;
        return r308656;
}

double f(double x, double y, double z) {
        double r308657 = x;
        double r308658 = y;
        double r308659 = 0.5;
        double r308660 = r308658 + r308659;
        double r308661 = log(r308658);
        double r308662 = r308660 * r308661;
        double r308663 = r308657 - r308662;
        double r308664 = r308663 + r308658;
        double r308665 = z;
        double r308666 = r308664 - r308665;
        return r308666;
}

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

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

Reproduce

herbie shell --seed 2020046 +o rules:numerics
(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))