Average Error: 1.4 → 1.4
Time: 18.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 r477870 = x;
        double r477871 = y;
        double r477872 = z;
        double r477873 = t;
        double r477874 = r477872 - r477873;
        double r477875 = a;
        double r477876 = r477872 - r477875;
        double r477877 = r477874 / r477876;
        double r477878 = r477871 * r477877;
        double r477879 = r477870 + r477878;
        return r477879;
}

double f(double x, double y, double z, double t, double a) {
        double r477880 = x;
        double r477881 = y;
        double r477882 = z;
        double r477883 = t;
        double r477884 = r477882 - r477883;
        double r477885 = a;
        double r477886 = r477882 - r477885;
        double r477887 = r477884 / r477886;
        double r477888 = r477881 * r477887;
        double r477889 = r477880 + r477888;
        return r477889;
}

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.3
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 2019209 +o rules:numerics
(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)))))