Average Error: 0.1 → 0.1
Time: 17.3s
Precision: 64
\[x + \frac{x - y}{2.0}\]
\[x + \frac{x - y}{2.0}\]
x + \frac{x - y}{2.0}
x + \frac{x - y}{2.0}
double f(double x, double y) {
        double r31347090 = x;
        double r31347091 = y;
        double r31347092 = r31347090 - r31347091;
        double r31347093 = 2.0;
        double r31347094 = r31347092 / r31347093;
        double r31347095 = r31347090 + r31347094;
        return r31347095;
}

double f(double x, double y) {
        double r31347096 = x;
        double r31347097 = y;
        double r31347098 = r31347096 - r31347097;
        double r31347099 = 2.0;
        double r31347100 = r31347098 / r31347099;
        double r31347101 = r31347096 + r31347100;
        return r31347101;
}

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.0}\]
  2. Final simplification0.1

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

Reproduce

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