Average Error: 0.1 → 0.1
Time: 14.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 r516284 = x;
        double r516285 = y;
        double r516286 = r516284 - r516285;
        double r516287 = 2.0;
        double r516288 = r516286 / r516287;
        double r516289 = r516284 + r516288;
        return r516289;
}

double f(double x, double y) {
        double r516290 = x;
        double r516291 = y;
        double r516292 = r516290 - r516291;
        double r516293 = 2.0;
        double r516294 = r516292 / r516293;
        double r516295 = r516290 + r516294;
        return r516295;
}

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