Average Error: 0.1 → 0.1
Time: 47.7s
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 r15842847 = x;
        double r15842848 = y;
        double r15842849 = 0.5;
        double r15842850 = r15842848 + r15842849;
        double r15842851 = log(r15842848);
        double r15842852 = r15842850 * r15842851;
        double r15842853 = r15842847 - r15842852;
        double r15842854 = r15842853 + r15842848;
        double r15842855 = z;
        double r15842856 = r15842854 - r15842855;
        return r15842856;
}

double f(double x, double y, double z) {
        double r15842857 = y;
        double r15842858 = x;
        double r15842859 = 0.5;
        double r15842860 = r15842857 + r15842859;
        double r15842861 = log(r15842857);
        double r15842862 = r15842860 * r15842861;
        double r15842863 = r15842858 - r15842862;
        double r15842864 = r15842857 + r15842863;
        double r15842865 = z;
        double r15842866 = r15842864 - r15842865;
        return r15842866;
}

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))