Average Error: 1.5 → 1.5
Time: 5.1s
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 r639185 = x;
        double r639186 = y;
        double r639187 = z;
        double r639188 = t;
        double r639189 = r639187 - r639188;
        double r639190 = a;
        double r639191 = r639187 - r639190;
        double r639192 = r639189 / r639191;
        double r639193 = r639186 * r639192;
        double r639194 = r639185 + r639193;
        return r639194;
}

double f(double x, double y, double z, double t, double a) {
        double r639195 = x;
        double r639196 = y;
        double r639197 = z;
        double r639198 = t;
        double r639199 = r639197 - r639198;
        double r639200 = a;
        double r639201 = r639197 - r639200;
        double r639202 = r639199 / r639201;
        double r639203 = r639196 * r639202;
        double r639204 = r639195 + r639203;
        return r639204;
}

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.4
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 2019356 
(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)))))