Average Error: 1.3 → 1.3
Time: 5.5s
Precision: 64
\[x + y \cdot \frac{z - t}{a - t}\]
\[x + y \cdot \frac{z - t}{a - t}\]
x + y \cdot \frac{z - t}{a - t}
x + y \cdot \frac{z - t}{a - t}
double f(double x, double y, double z, double t, double a) {
        double r685479 = x;
        double r685480 = y;
        double r685481 = z;
        double r685482 = t;
        double r685483 = r685481 - r685482;
        double r685484 = a;
        double r685485 = r685484 - r685482;
        double r685486 = r685483 / r685485;
        double r685487 = r685480 * r685486;
        double r685488 = r685479 + r685487;
        return r685488;
}

double f(double x, double y, double z, double t, double a) {
        double r685489 = x;
        double r685490 = y;
        double r685491 = z;
        double r685492 = t;
        double r685493 = r685491 - r685492;
        double r685494 = a;
        double r685495 = r685494 - r685492;
        double r685496 = r685493 / r685495;
        double r685497 = r685490 * r685496;
        double r685498 = r685489 + r685497;
        return r685498;
}

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.3
Target0.5
Herbie1.3
\[\begin{array}{l} \mathbf{if}\;y \lt -8.50808486055124107 \cdot 10^{-17}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \lt 2.8944268627920891 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \end{array}\]

Derivation

  1. Initial program 1.3

    \[x + y \cdot \frac{z - t}{a - t}\]
  2. Final simplification1.3

    \[\leadsto x + y \cdot \frac{z - t}{a - t}\]

Reproduce

herbie shell --seed 2020060 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

  (+ x (* y (/ (- z t) (- a t)))))