Average Error: 1.2 → 1.2
Time: 13.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 r423869 = x;
        double r423870 = y;
        double r423871 = z;
        double r423872 = t;
        double r423873 = r423871 - r423872;
        double r423874 = a;
        double r423875 = r423874 - r423872;
        double r423876 = r423873 / r423875;
        double r423877 = r423870 * r423876;
        double r423878 = r423869 + r423877;
        return r423878;
}

double f(double x, double y, double z, double t, double a) {
        double r423879 = x;
        double r423880 = y;
        double r423881 = z;
        double r423882 = t;
        double r423883 = r423881 - r423882;
        double r423884 = a;
        double r423885 = r423884 - r423882;
        double r423886 = r423883 / r423885;
        double r423887 = r423880 * r423886;
        double r423888 = r423879 + r423887;
        return r423888;
}

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.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.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 2019304 
(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.50808486055124107e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.8944268627920891e-49) (+ x (* (* y (- z t)) (/ 1 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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