Average Error: 1.3 → 1.3
Time: 9.9s
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 r586877 = x;
        double r586878 = y;
        double r586879 = z;
        double r586880 = t;
        double r586881 = r586879 - r586880;
        double r586882 = a;
        double r586883 = r586879 - r586882;
        double r586884 = r586881 / r586883;
        double r586885 = r586878 * r586884;
        double r586886 = r586877 + r586885;
        return r586886;
}

double f(double x, double y, double z, double t, double a) {
        double r586887 = x;
        double r586888 = y;
        double r586889 = z;
        double r586890 = t;
        double r586891 = r586889 - r586890;
        double r586892 = a;
        double r586893 = r586889 - r586892;
        double r586894 = r586891 / r586893;
        double r586895 = r586888 * r586894;
        double r586896 = r586887 + r586895;
        return r586896;
}

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

Derivation

  1. Initial program 1.3

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

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

Reproduce

herbie shell --seed 2020047 +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)))))