Average Error: 0.1 → 0.1
Time: 25.5s
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 r368368 = x;
        double r368369 = y;
        double r368370 = r368368 - r368369;
        double r368371 = 2.0;
        double r368372 = r368370 / r368371;
        double r368373 = r368368 + r368372;
        return r368373;
}

double f(double x, double y) {
        double r368374 = x;
        double r368375 = y;
        double r368376 = r368374 - r368375;
        double r368377 = 2.0;
        double r368378 = r368376 / r368377;
        double r368379 = r368374 + r368378;
        return r368379;
}

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