x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;a \leq -5.227043820240027 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{\frac{y - z}{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}}{\sqrt[3]{\sqrt[3]{a - z}} \cdot \sqrt[3]{\sqrt[3]{a - z}}} \cdot \frac{t - x}{\sqrt[3]{\sqrt[3]{a - z}}}\\
\mathbf{elif}\;a \leq 1.5504634327615182 \cdot 10^{-167}:\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.227043820240027e-69)
(+
x
(*
(/
(/ (- y z) (* (cbrt (- a z)) (cbrt (- a z))))
(* (cbrt (cbrt (- a z))) (cbrt (cbrt (- a z)))))
(/ (- t x) (cbrt (cbrt (- a z))))))
(if (<= a 1.5504634327615182e-167)
(+ t (* y (- (/ x z) (/ t z))))
(+ x (/ (- y z) (/ (- a z) (- t x)))))))double code(double x, double y, double z, double t, double a) {
return ((double) (x + (((double) (((double) (y - z)) * ((double) (t - x)))) / ((double) (a - z)))));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.227043820240027e-69)) {
tmp = ((double) (x + ((double) (((((double) (y - z)) / ((double) (((double) cbrt(((double) (a - z)))) * ((double) cbrt(((double) (a - z))))))) / ((double) (((double) cbrt(((double) cbrt(((double) (a - z)))))) * ((double) cbrt(((double) cbrt(((double) (a - z))))))))) * (((double) (t - x)) / ((double) cbrt(((double) cbrt(((double) (a - z)))))))))));
} else {
double tmp_1;
if ((a <= 1.5504634327615182e-167)) {
tmp_1 = ((double) (t + ((double) (y * ((double) ((x / z) - (t / z)))))));
} else {
tmp_1 = ((double) (x + (((double) (y - z)) / (((double) (a - z)) / ((double) (t - x))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 24.6 |
|---|---|
| Target | 12.1 |
| Herbie | 11.2 |
if a < -5.2270438202400269e-69Initial program 21.7
rmApplied add-cube-cbrt_binary6422.0
Applied times-frac_binary647.5
rmApplied add-cube-cbrt_binary647.7
Applied *-un-lft-identity_binary647.7
Applied times-frac_binary647.7
Applied associate-*r*_binary647.7
Simplified7.6
if -5.2270438202400269e-69 < a < 1.55046343276151818e-167Initial program 29.3
Taylor expanded around inf 16.2
Simplified14.0
if 1.55046343276151818e-167 < a Initial program 23.7
rmApplied associate-/l*_binary6412.1
Final simplification11.2
herbie shell --seed 2020210
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< z -1.2536131056095036e+188) (- t (* (/ y z) (- t x))) (if (< z 4.446702369113811e+64) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x)))))
(+ x (/ (* (- y z) (- t x)) (- a z))))