Average Error: 0.1 → 0.1
Time: 25.0s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(y + \left(x - \left(y + 0.5\right) \cdot \log y\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(y + \left(x - \left(y + 0.5\right) \cdot \log y\right)\right) - z
double f(double x, double y, double z) {
        double r15126867 = x;
        double r15126868 = y;
        double r15126869 = 0.5;
        double r15126870 = r15126868 + r15126869;
        double r15126871 = log(r15126868);
        double r15126872 = r15126870 * r15126871;
        double r15126873 = r15126867 - r15126872;
        double r15126874 = r15126873 + r15126868;
        double r15126875 = z;
        double r15126876 = r15126874 - r15126875;
        return r15126876;
}

double f(double x, double y, double z) {
        double r15126877 = y;
        double r15126878 = x;
        double r15126879 = 0.5;
        double r15126880 = r15126877 + r15126879;
        double r15126881 = log(r15126877);
        double r15126882 = r15126880 * r15126881;
        double r15126883 = r15126878 - r15126882;
        double r15126884 = r15126877 + r15126883;
        double r15126885 = z;
        double r15126886 = r15126884 - r15126885;
        return r15126886;
}

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

Reproduce

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