Average Error: 1.4 → 1.4
Time: 5.4s
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 r570490 = x;
        double r570491 = y;
        double r570492 = z;
        double r570493 = t;
        double r570494 = r570492 - r570493;
        double r570495 = a;
        double r570496 = r570492 - r570495;
        double r570497 = r570494 / r570496;
        double r570498 = r570491 * r570497;
        double r570499 = r570490 + r570498;
        return r570499;
}

double f(double x, double y, double z, double t, double a) {
        double r570500 = x;
        double r570501 = y;
        double r570502 = z;
        double r570503 = t;
        double r570504 = r570502 - r570503;
        double r570505 = a;
        double r570506 = r570502 - r570505;
        double r570507 = r570504 / r570506;
        double r570508 = r570501 * r570507;
        double r570509 = r570500 + r570508;
        return r570509;
}

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