Average Error: 0.1 → 0.1
Time: 59.0s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(z + \left(\log y \cdot \left(0.5 + y\right) - y\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(z + \left(\log y \cdot \left(0.5 + y\right) - y\right)\right)
double f(double x, double y, double z) {
        double r16476302 = x;
        double r16476303 = y;
        double r16476304 = 0.5;
        double r16476305 = r16476303 + r16476304;
        double r16476306 = log(r16476303);
        double r16476307 = r16476305 * r16476306;
        double r16476308 = r16476302 - r16476307;
        double r16476309 = r16476308 + r16476303;
        double r16476310 = z;
        double r16476311 = r16476309 - r16476310;
        return r16476311;
}

double f(double x, double y, double z) {
        double r16476312 = x;
        double r16476313 = z;
        double r16476314 = y;
        double r16476315 = log(r16476314);
        double r16476316 = 0.5;
        double r16476317 = r16476316 + r16476314;
        double r16476318 = r16476315 * r16476317;
        double r16476319 = r16476318 - r16476314;
        double r16476320 = r16476313 + r16476319;
        double r16476321 = r16476312 - r16476320;
        return r16476321;
}

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

Reproduce

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