x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;\frac{\left(z - t\right) \cdot y}{a - t} = -\infty:\\
\;\;\;\;x + \frac{y}{a - t} \cdot \left(z - t\right)\\
\mathbf{elif}\;\frac{\left(z - t\right) \cdot y}{a - t} \le 4.883366253508727 \cdot 10^{+293}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r21712673 = x;
double r21712674 = y;
double r21712675 = z;
double r21712676 = t;
double r21712677 = r21712675 - r21712676;
double r21712678 = r21712674 * r21712677;
double r21712679 = a;
double r21712680 = r21712679 - r21712676;
double r21712681 = r21712678 / r21712680;
double r21712682 = r21712673 + r21712681;
return r21712682;
}
double f(double x, double y, double z, double t, double a) {
double r21712683 = z;
double r21712684 = t;
double r21712685 = r21712683 - r21712684;
double r21712686 = y;
double r21712687 = r21712685 * r21712686;
double r21712688 = a;
double r21712689 = r21712688 - r21712684;
double r21712690 = r21712687 / r21712689;
double r21712691 = -inf.0;
bool r21712692 = r21712690 <= r21712691;
double r21712693 = x;
double r21712694 = r21712686 / r21712689;
double r21712695 = r21712694 * r21712685;
double r21712696 = r21712693 + r21712695;
double r21712697 = 4.883366253508727e+293;
bool r21712698 = r21712690 <= r21712697;
double r21712699 = r21712690 + r21712693;
double r21712700 = r21712685 / r21712689;
double r21712701 = r21712686 * r21712700;
double r21712702 = r21712701 + r21712693;
double r21712703 = r21712698 ? r21712699 : r21712702;
double r21712704 = r21712692 ? r21712696 : r21712703;
return r21712704;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 9.8 |
|---|---|
| Target | 1.2 |
| Herbie | 0.2 |
if (/ (* y (- z t)) (- a t)) < -inf.0Initial program 60.2
Simplified0.1
rmApplied fma-udef0.1
if -inf.0 < (/ (* y (- z t)) (- a t)) < 4.883366253508727e+293Initial program 0.2
Simplified3.2
rmApplied fma-udef3.2
rmApplied associate-*l/0.2
if 4.883366253508727e+293 < (/ (* y (- z t)) (- a t)) Initial program 58.0
Simplified0.7
rmApplied fma-udef0.7
rmApplied div-inv0.7
Applied associate-*l*0.6
Simplified0.5
Final simplification0.2
herbie shell --seed 2019158 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))