Average Error: 1.2 → 1.2
Time: 13.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 r724457 = x;
        double r724458 = y;
        double r724459 = z;
        double r724460 = t;
        double r724461 = r724459 - r724460;
        double r724462 = a;
        double r724463 = r724459 - r724462;
        double r724464 = r724461 / r724463;
        double r724465 = r724458 * r724464;
        double r724466 = r724457 + r724465;
        return r724466;
}

double f(double x, double y, double z, double t, double a) {
        double r724467 = x;
        double r724468 = y;
        double r724469 = z;
        double r724470 = t;
        double r724471 = r724469 - r724470;
        double r724472 = a;
        double r724473 = r724469 - r724472;
        double r724474 = r724471 / r724473;
        double r724475 = r724468 * r724474;
        double r724476 = r724467 + r724475;
        return r724476;
}

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

Derivation

  1. Initial program 1.2

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

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

Reproduce

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