\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} \le 0.0:\\
\;\;\;\;\frac{x}{1 \cdot \frac{t - z}{y - z}}\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le 2.28593216958903165 \cdot 10^{67}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r663786 = x;
double r663787 = y;
double r663788 = z;
double r663789 = r663787 - r663788;
double r663790 = r663786 * r663789;
double r663791 = t;
double r663792 = r663791 - r663788;
double r663793 = r663790 / r663792;
return r663793;
}
double f(double x, double y, double z, double t) {
double r663794 = x;
double r663795 = y;
double r663796 = z;
double r663797 = r663795 - r663796;
double r663798 = r663794 * r663797;
double r663799 = t;
double r663800 = r663799 - r663796;
double r663801 = r663798 / r663800;
double r663802 = 0.0;
bool r663803 = r663801 <= r663802;
double r663804 = 1.0;
double r663805 = r663800 / r663797;
double r663806 = r663804 * r663805;
double r663807 = r663794 / r663806;
double r663808 = 2.2859321695890317e+67;
bool r663809 = r663801 <= r663808;
double r663810 = r663794 / r663800;
double r663811 = r663810 * r663797;
double r663812 = r663809 ? r663801 : r663811;
double r663813 = r663803 ? r663807 : r663812;
return r663813;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.4 |
|---|---|
| Target | 2.1 |
| Herbie | 1.7 |
if (/ (* x (- y z)) (- t z)) < 0.0Initial program 11.1
rmApplied associate-/l*2.0
rmApplied *-un-lft-identity2.0
Applied *-un-lft-identity2.0
Applied times-frac2.0
Simplified2.0
if 0.0 < (/ (* x (- y z)) (- t z)) < 2.2859321695890317e+67Initial program 0.3
if 2.2859321695890317e+67 < (/ (* x (- y z)) (- t z)) Initial program 29.5
rmApplied associate-/l*2.6
rmApplied associate-/r/3.1
Final simplification1.7
herbie shell --seed 2020062
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))