\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 r554390 = x;
double r554391 = y;
double r554392 = z;
double r554393 = r554391 - r554392;
double r554394 = r554390 * r554393;
double r554395 = t;
double r554396 = r554395 - r554392;
double r554397 = r554394 / r554396;
return r554397;
}
double f(double x, double y, double z, double t) {
double r554398 = x;
double r554399 = y;
double r554400 = z;
double r554401 = r554399 - r554400;
double r554402 = r554398 * r554401;
double r554403 = t;
double r554404 = r554403 - r554400;
double r554405 = r554402 / r554404;
double r554406 = 0.0;
bool r554407 = r554405 <= r554406;
double r554408 = 1.0;
double r554409 = r554404 / r554401;
double r554410 = r554408 * r554409;
double r554411 = r554398 / r554410;
double r554412 = 2.2859321695890317e+67;
bool r554413 = r554405 <= r554412;
double r554414 = r554398 / r554404;
double r554415 = r554414 * r554401;
double r554416 = r554413 ? r554405 : r554415;
double r554417 = r554407 ? r554411 : r554416;
return r554417;
}




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 +o rules:numerics
(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)))