Average Error: 0.1 → 0.1
Time: 9.6s
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 r448257 = x;
        double r448258 = y;
        double r448259 = r448257 - r448258;
        double r448260 = 2.0;
        double r448261 = r448259 / r448260;
        double r448262 = r448257 + r448261;
        return r448262;
}

double f(double x, double y) {
        double r448263 = x;
        double r448264 = y;
        double r448265 = r448263 - r448264;
        double r448266 = 2.0;
        double r448267 = r448265 / r448266;
        double r448268 = r448263 + r448267;
        return r448268;
}

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 1978988140 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Axis.Types:hBufferRect from Chart-1.5.3"
  :precision binary64

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

  (+ x (/ (- x y) 2)))