Average Error: 0.1 → 0.1
Time: 20.7s
Precision: 64
\[x + \frac{x - y}{2}\]
\[x + \frac{x - y}{2}\]
x + \frac{x - y}{2}
x + \frac{x - y}{2}
double f(double x, double y) {
        double r26177356 = x;
        double r26177357 = y;
        double r26177358 = r26177356 - r26177357;
        double r26177359 = 2.0;
        double r26177360 = r26177358 / r26177359;
        double r26177361 = r26177356 + r26177360;
        return r26177361;
}

double f(double x, double y) {
        double r26177362 = x;
        double r26177363 = y;
        double r26177364 = r26177362 - r26177363;
        double r26177365 = 2.0;
        double r26177366 = r26177364 / r26177365;
        double r26177367 = r26177362 + r26177366;
        return r26177367;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.1
Herbie0.1
\[1.5 \cdot x - 0.5 \cdot y\]

Derivation

  1. Initial program 0.1

    \[x + \frac{x - y}{2}\]
  2. Final simplification0.1

    \[\leadsto x + \frac{x - y}{2}\]

Reproduce

herbie shell --seed 2019169 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"

  :herbie-target
  (- (* 1.5 x) (* 0.5 y))

  (+ x (/ (- x y) 2.0)))