Average Error: 1.4 → 1.4
Time: 12.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 r695634 = x;
        double r695635 = y;
        double r695636 = z;
        double r695637 = t;
        double r695638 = r695636 - r695637;
        double r695639 = a;
        double r695640 = r695636 - r695639;
        double r695641 = r695638 / r695640;
        double r695642 = r695635 * r695641;
        double r695643 = r695634 + r695642;
        return r695643;
}

double f(double x, double y, double z, double t, double a) {
        double r695644 = x;
        double r695645 = y;
        double r695646 = z;
        double r695647 = t;
        double r695648 = r695646 - r695647;
        double r695649 = a;
        double r695650 = r695646 - r695649;
        double r695651 = r695648 / r695650;
        double r695652 = r695645 * r695651;
        double r695653 = r695644 + r695652;
        return r695653;
}

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.2
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 2019351 +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)))))