Average Error: 0.1 → 0.1
Time: 29.2s
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 r331111 = x;
        double r331112 = y;
        double r331113 = 0.5;
        double r331114 = r331112 + r331113;
        double r331115 = log(r331112);
        double r331116 = r331114 * r331115;
        double r331117 = r331111 - r331116;
        double r331118 = r331117 + r331112;
        double r331119 = z;
        double r331120 = r331118 - r331119;
        return r331120;
}

double f(double x, double y, double z) {
        double r331121 = x;
        double r331122 = y;
        double r331123 = 0.5;
        double r331124 = r331122 + r331123;
        double r331125 = log(r331122);
        double r331126 = r331124 * r331125;
        double r331127 = r331121 - r331126;
        double r331128 = r331127 + r331122;
        double r331129 = z;
        double r331130 = r331128 - r331129;
        return r331130;
}

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