Average Error: 1.5 → 1.5
Time: 15.1s
Precision: 64
\[x + y \cdot \frac{z - t}{z - a}\]
\[x + y \cdot \frac{z - t}{z - a}\]
x + y \cdot \frac{z - t}{z - a}
x + y \cdot \frac{z - t}{z - a}
double f(double x, double y, double z, double t, double a) {
        double r442597 = x;
        double r442598 = y;
        double r442599 = z;
        double r442600 = t;
        double r442601 = r442599 - r442600;
        double r442602 = a;
        double r442603 = r442599 - r442602;
        double r442604 = r442601 / r442603;
        double r442605 = r442598 * r442604;
        double r442606 = r442597 + r442605;
        return r442606;
}

double f(double x, double y, double z, double t, double a) {
        double r442607 = x;
        double r442608 = y;
        double r442609 = z;
        double r442610 = t;
        double r442611 = r442609 - r442610;
        double r442612 = a;
        double r442613 = r442609 - r442612;
        double r442614 = r442611 / r442613;
        double r442615 = r442608 * r442614;
        double r442616 = r442607 + r442615;
        return r442616;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.5
Target1.3
Herbie1.5
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Initial program 1.5

    \[x + y \cdot \frac{z - t}{z - a}\]
  2. Final simplification1.5

    \[\leadsto x + y \cdot \frac{z - t}{z - a}\]

Reproduce

herbie shell --seed 2019304 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

  (+ x (* y (/ (- z t) (- z a)))))