Average Error: 1.4 → 1.4
Time: 4.5s
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 r580823 = x;
        double r580824 = y;
        double r580825 = z;
        double r580826 = t;
        double r580827 = r580825 - r580826;
        double r580828 = a;
        double r580829 = r580825 - r580828;
        double r580830 = r580827 / r580829;
        double r580831 = r580824 * r580830;
        double r580832 = r580823 + r580831;
        return r580832;
}

double f(double x, double y, double z, double t, double a) {
        double r580833 = x;
        double r580834 = y;
        double r580835 = z;
        double r580836 = t;
        double r580837 = r580835 - r580836;
        double r580838 = a;
        double r580839 = r580835 - r580838;
        double r580840 = r580837 / r580839;
        double r580841 = r580834 * r580840;
        double r580842 = r580833 + r580841;
        return r580842;
}

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.4
Target1.2
Herbie1.4
\[x + \frac{y}{\frac{z - a}{z - t}}\]

Derivation

  1. Initial program 1.4

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

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

Reproduce

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