\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \leq -1.933835084880591 \cdot 10^{-138} \lor \neg \left(z \leq 2.7822942298388567 \cdot 10^{-251}\right):\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sqrt[3]{t - z} \cdot \sqrt[3]{t - z}} \cdot \frac{y - z}{\sqrt[3]{t - z}}\\
\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.933835084880591e-138) (not (<= z 2.7822942298388567e-251))) (/ x (/ (- t z) (- y z))) (* (/ x (* (cbrt (- t z)) (cbrt (- t z)))) (/ (- y z) (cbrt (- t z))))))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.933835084880591e-138) || !(z <= 2.7822942298388567e-251)) {
tmp = x / ((t - z) / (y - z));
} else {
tmp = (x / (cbrt(t - z) * cbrt(t - z))) * ((y - z) / cbrt(t - z));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.4 |
|---|---|
| Target | 2.3 |
| Herbie | 2.1 |
if z < -1.93383508488059105e-138 or 2.7822942298388567e-251 < z Initial program 12.5
rmApplied associate-/l*_binary641.4
if -1.93383508488059105e-138 < z < 2.7822942298388567e-251Initial program 6.0
rmApplied add-cube-cbrt_binary646.8
Applied times-frac_binary645.3
Final simplification2.1
herbie shell --seed 2020224
(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)))