Average Error: 1.4 → 1.4
Time: 7.2s
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 r608010 = x;
        double r608011 = y;
        double r608012 = z;
        double r608013 = t;
        double r608014 = r608012 - r608013;
        double r608015 = a;
        double r608016 = r608012 - r608015;
        double r608017 = r608014 / r608016;
        double r608018 = r608011 * r608017;
        double r608019 = r608010 + r608018;
        return r608019;
}

double f(double x, double y, double z, double t, double a) {
        double r608020 = x;
        double r608021 = y;
        double r608022 = z;
        double r608023 = t;
        double r608024 = r608022 - r608023;
        double r608025 = a;
        double r608026 = r608022 - r608025;
        double r608027 = r608024 / r608026;
        double r608028 = r608021 * r608027;
        double r608029 = r608020 + r608028;
        return r608029;
}

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