\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 r704852 = x;
double r704853 = y;
double r704854 = z;
double r704855 = r704853 - r704854;
double r704856 = r704852 * r704855;
double r704857 = t;
double r704858 = r704857 - r704854;
double r704859 = r704856 / r704858;
return r704859;
}
double f(double x, double y, double z, double t) {
double r704860 = x;
double r704861 = y;
double r704862 = z;
double r704863 = r704861 - r704862;
double r704864 = r704860 * r704863;
double r704865 = t;
double r704866 = r704865 - r704862;
double r704867 = r704864 / r704866;
double r704868 = 0.0;
bool r704869 = r704867 <= r704868;
double r704870 = 1.0;
double r704871 = r704866 / r704863;
double r704872 = r704870 * r704871;
double r704873 = r704860 / r704872;
double r704874 = 2.2859321695890317e+67;
bool r704875 = r704867 <= r704874;
double r704876 = r704860 / r704866;
double r704877 = r704876 * r704863;
double r704878 = r704875 ? r704867 : r704877;
double r704879 = r704869 ? r704873 : r704878;
return r704879;
}




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)))