Average Error: 1.2 → 1.2
Time: 7.7s
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 r1180543 = x;
        double r1180544 = y;
        double r1180545 = z;
        double r1180546 = t;
        double r1180547 = r1180545 - r1180546;
        double r1180548 = a;
        double r1180549 = r1180548 - r1180546;
        double r1180550 = r1180547 / r1180549;
        double r1180551 = r1180544 * r1180550;
        double r1180552 = r1180543 + r1180551;
        return r1180552;
}

double f(double x, double y, double z, double t, double a) {
        double r1180553 = x;
        double r1180554 = y;
        double r1180555 = z;
        double r1180556 = t;
        double r1180557 = r1180555 - r1180556;
        double r1180558 = a;
        double r1180559 = r1180558 - r1180556;
        double r1180560 = r1180557 / r1180559;
        double r1180561 = r1180554 * r1180560;
        double r1180562 = r1180553 + r1180561;
        return r1180562;
}

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
Target0.4
Herbie1.2
\[\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.2

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

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

Reproduce

herbie shell --seed 2020047 
(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)))))