Average Error: 0.1 → 0.1
Time: 16.6s
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 r27613014 = x;
        double r27613015 = y;
        double r27613016 = r27613014 - r27613015;
        double r27613017 = 2.0;
        double r27613018 = r27613016 / r27613017;
        double r27613019 = r27613014 + r27613018;
        return r27613019;
}

double f(double x, double y) {
        double r27613020 = x;
        double r27613021 = y;
        double r27613022 = r27613020 - r27613021;
        double r27613023 = 2.0;
        double r27613024 = r27613022 / r27613023;
        double r27613025 = r27613020 + r27613024;
        return r27613025;
}

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