\frac{x \cdot \left(y - z\right)}{t - z}
\begin{array}{l}
\mathbf{if}\;z \leq -8.064804884425737 \cdot 10^{-131}:\\
\;\;\;\;\frac{x}{\frac{t - z}{y - z}}\\
\mathbf{elif}\;z \leq 2.295152313413225 \cdot 10^{-182}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{t - z} \cdot \frac{\sqrt[3]{x}}{\frac{1}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\end{array}
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
(FPCore (x y z t)
:precision binary64
(if (<= z -8.064804884425737e-131)
(/ x (/ (- t z) (- y z)))
(if (<= z 2.295152313413225e-182)
(* (/ (* (cbrt x) (cbrt x)) (- t z)) (/ (cbrt x) (/ 1.0 (- y z))))
(* x (/ (- y z) (- 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 <= -8.064804884425737e-131) {
tmp = x / ((t - z) / (y - z));
} else if (z <= 2.295152313413225e-182) {
tmp = ((cbrt(x) * cbrt(x)) / (t - z)) * (cbrt(x) / (1.0 / (y - z)));
} else {
tmp = x * ((y - z) / (t - z));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.2 |
|---|---|
| Target | 2.4 |
| Herbie | 1.9 |
if z < -8.06480488442573712e-131Initial program 13.6
Applied associate-/l*_binary640.8
if -8.06480488442573712e-131 < z < 2.295152313413225e-182Initial program 5.7
Applied associate-/l*_binary646.6
Applied div-inv_binary646.7
Applied add-cube-cbrt_binary647.4
Applied times-frac_binary644.7
if 2.295152313413225e-182 < z Initial program 12.1
Applied *-un-lft-identity_binary6412.1
Applied times-frac_binary641.4
Simplified1.4
Final simplification1.9
herbie shell --seed 2022125
(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)))