\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \leq -1.153141386606573 \cdot 10^{+56} \lor \neg \left(z \leq 4.4134199192979195 \cdot 10^{+34}\right):\\
\;\;\;\;x \cdot \left(\frac{y}{t - z} - \frac{z}{t - z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\end{array}(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.153141386606573e+56) (not (<= z 4.4134199192979195e+34))) (* x (- (/ y (- t z)) (/ z (- t z)))) (* (/ x (- t z)) (- y z))))
double code(double x, double y, double z, double t) {
return (((double) (x * ((double) (y - z)))) / ((double) (t - z)));
}
double code(double x, double y, double z, double t) {
double tmp;
if (((z <= -1.153141386606573e+56) || !(z <= 4.4134199192979195e+34))) {
tmp = ((double) (x * ((double) ((y / ((double) (t - z))) - (z / ((double) (t - z)))))));
} else {
tmp = ((double) ((x / ((double) (t - z))) * ((double) (y - z))));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.9 |
|---|---|
| Target | 2.2 |
| Herbie | 2.7 |
if z < -1.1531413866065731e56 or 4.4134199192979195e34 < z Initial program Error: 19.3 bits
SimplifiedError: 0.1 bits
rmApplied div-subError: 0.1 bits
if -1.1531413866065731e56 < z < 4.4134199192979195e34Initial program Error: 5.6 bits
SimplifiedError: 4.0 bits
rmApplied div-subError: 4.0 bits
rmApplied div-invError: 4.0 bits
Applied div-invError: 4.1 bits
Applied distribute-rgt-out--Error: 4.1 bits
Applied associate-*r*Error: 5.0 bits
SimplifiedError: 4.9 bits
Final simplificationError: 2.7 bits
herbie shell --seed 2020204
(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)))