Average Error: 1.2 → 1.2
Time: 11.6s
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 r762064 = x;
        double r762065 = y;
        double r762066 = z;
        double r762067 = t;
        double r762068 = r762066 - r762067;
        double r762069 = a;
        double r762070 = r762066 - r762069;
        double r762071 = r762068 / r762070;
        double r762072 = r762065 * r762071;
        double r762073 = r762064 + r762072;
        return r762073;
}

double f(double x, double y, double z, double t, double a) {
        double r762074 = x;
        double r762075 = y;
        double r762076 = z;
        double r762077 = t;
        double r762078 = r762076 - r762077;
        double r762079 = a;
        double r762080 = r762076 - r762079;
        double r762081 = r762078 / r762080;
        double r762082 = r762075 * r762081;
        double r762083 = r762074 + r762082;
        return r762083;
}

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