Average Error: 1.3 → 1.3
Time: 18.8s
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 r42425753 = x;
        double r42425754 = y;
        double r42425755 = z;
        double r42425756 = t;
        double r42425757 = r42425755 - r42425756;
        double r42425758 = a;
        double r42425759 = r42425758 - r42425756;
        double r42425760 = r42425757 / r42425759;
        double r42425761 = r42425754 * r42425760;
        double r42425762 = r42425753 + r42425761;
        return r42425762;
}

double f(double x, double y, double z, double t, double a) {
        double r42425763 = x;
        double r42425764 = y;
        double r42425765 = z;
        double r42425766 = t;
        double r42425767 = r42425765 - r42425766;
        double r42425768 = a;
        double r42425769 = r42425768 - r42425766;
        double r42425770 = r42425767 / r42425769;
        double r42425771 = r42425764 * r42425770;
        double r42425772 = r42425763 + r42425771;
        return r42425772;
}

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.4
Herbie1.3
\[\begin{array}{l} \mathbf{if}\;y \lt -8.508084860551241069024247453646278348229 \cdot 10^{-17}:\\ \;\;\;\;x + y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \lt 2.894426862792089097262541964056085749132 \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 2019171 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"

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

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