x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.77395754520233479 \cdot 10^{-156} \lor \neg \left(t \le 3.35743028334156564 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{z - t}{a - t} \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r568671 = x;
double r568672 = y;
double r568673 = z;
double r568674 = t;
double r568675 = r568673 - r568674;
double r568676 = r568672 * r568675;
double r568677 = a;
double r568678 = r568677 - r568674;
double r568679 = r568676 / r568678;
double r568680 = r568671 + r568679;
return r568680;
}
double f(double x, double y, double z, double t, double a) {
double r568681 = t;
double r568682 = -1.7739575452023348e-156;
bool r568683 = r568681 <= r568682;
double r568684 = 3.3574302833415656e-19;
bool r568685 = r568681 <= r568684;
double r568686 = !r568685;
bool r568687 = r568683 || r568686;
double r568688 = z;
double r568689 = r568688 - r568681;
double r568690 = a;
double r568691 = r568690 - r568681;
double r568692 = r568689 / r568691;
double r568693 = y;
double r568694 = r568692 * r568693;
double r568695 = x;
double r568696 = r568694 + r568695;
double r568697 = r568689 * r568693;
double r568698 = r568697 / r568691;
double r568699 = r568698 + r568695;
double r568700 = r568687 ? r568696 : r568699;
return r568700;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.0 |
|---|---|
| Target | 1.3 |
| Herbie | 1.4 |
if t < -1.7739575452023348e-156 or 3.3574302833415656e-19 < t Initial program 14.7
Simplified2.9
rmApplied clear-num3.1
rmApplied fma-udef3.1
Simplified3.0
rmApplied associate-/r/0.4
if -1.7739575452023348e-156 < t < 3.3574302833415656e-19Initial program 3.5
Simplified3.5
rmApplied clear-num3.6
rmApplied fma-udef3.6
Simplified3.4
rmApplied associate-/r/3.5
rmApplied associate-*l/3.5
Final simplification1.4
herbie shell --seed 2020081 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))