Average Error: 1.5 → 1.5
Time: 17.8s
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 r383018 = x;
        double r383019 = y;
        double r383020 = z;
        double r383021 = t;
        double r383022 = r383020 - r383021;
        double r383023 = a;
        double r383024 = r383020 - r383023;
        double r383025 = r383022 / r383024;
        double r383026 = r383019 * r383025;
        double r383027 = r383018 + r383026;
        return r383027;
}

double f(double x, double y, double z, double t, double a) {
        double r383028 = x;
        double r383029 = y;
        double r383030 = z;
        double r383031 = t;
        double r383032 = r383030 - r383031;
        double r383033 = a;
        double r383034 = r383030 - r383033;
        double r383035 = r383032 / r383034;
        double r383036 = r383029 * r383035;
        double r383037 = r383028 + r383036;
        return r383037;
}

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