Average Error: 1.4 → 1.4
Time: 12.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 r407379 = x;
        double r407380 = y;
        double r407381 = z;
        double r407382 = t;
        double r407383 = r407381 - r407382;
        double r407384 = a;
        double r407385 = r407381 - r407384;
        double r407386 = r407383 / r407385;
        double r407387 = r407380 * r407386;
        double r407388 = r407379 + r407387;
        return r407388;
}

double f(double x, double y, double z, double t, double a) {
        double r407389 = x;
        double r407390 = y;
        double r407391 = z;
        double r407392 = t;
        double r407393 = r407391 - r407392;
        double r407394 = a;
        double r407395 = r407391 - r407394;
        double r407396 = r407393 / r407395;
        double r407397 = r407390 * r407396;
        double r407398 = r407389 + r407397;
        return r407398;
}

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.3
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 2019209 
(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)))))