x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\begin{array}{l}
\mathbf{if}\;z \leq -4.2800453603295935 \cdot 10^{+247} \lor \neg \left(z \leq -6.569825719871904 \cdot 10^{+210} \lor \neg \left(z \leq -2.0363509759686045 \cdot 10^{+110}\right) \land z \leq 5.623859092829061 \cdot 10^{+189}\right):\\
\;\;\;\;t + y \cdot \left(\frac{x}{z} - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{\sqrt[3]{y - z} \cdot \sqrt[3]{y - z}}{\sqrt[3]{a - z}} \cdot \left(\frac{\sqrt[3]{t - x} \cdot \sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z} \cdot \sqrt[3]{a - z}}} \cdot \frac{\sqrt[3]{y - z}}{\sqrt[3]{a - z}}\right)\right) \cdot \frac{\sqrt[3]{t - x}}{\sqrt[3]{\sqrt[3]{a - z}}}\\
\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 (or (<= z -4.2800453603295935e+247)
(not
(or (<= z -6.569825719871904e+210)
(and (not (<= z -2.0363509759686045e+110))
(<= z 5.623859092829061e+189)))))
(+ t (* y (- (/ x z) (/ t z))))
(+
x
(*
(*
(/ (* (cbrt (- y z)) (cbrt (- y z))) (cbrt (- a z)))
(*
(/
(* (cbrt (- t x)) (cbrt (- t x)))
(cbrt (* (cbrt (- a z)) (cbrt (- a z)))))
(/ (cbrt (- y z)) (cbrt (- a z)))))
(/ (cbrt (- t x)) (cbrt (cbrt (- a z))))))))double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2800453603295935e+247) || !((z <= -6.569825719871904e+210) || (!(z <= -2.0363509759686045e+110) && (z <= 5.623859092829061e+189)))) {
tmp = t + (y * ((x / z) - (t / z)));
} else {
tmp = x + ((((cbrt(y - z) * cbrt(y - z)) / cbrt(a - z)) * (((cbrt(t - x) * cbrt(t - x)) / cbrt(cbrt(a - z) * cbrt(a - z))) * (cbrt(y - z) / cbrt(a - z)))) * (cbrt(t - x) / cbrt(cbrt(a - z))));
}
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 | 10.3 |
if z < -4.280045360329593e247 or -6.5698257198719037e210 < z < -2.0363509759686045e110 or 5.6238590928290606e189 < z Initial program 47.0
Taylor expanded around inf 25.2
Simplified16.6
if -4.280045360329593e247 < z < -6.5698257198719037e210 or -2.0363509759686045e110 < z < 5.6238590928290606e189Initial program 16.6
rmApplied add-cube-cbrt_binary6417.1
Applied times-frac_binary648.7
rmApplied add-cube-cbrt_binary648.8
Applied cbrt-prod_binary648.8
Applied add-cube-cbrt_binary648.9
Applied times-frac_binary648.9
Applied associate-*r*_binary648.4
rmApplied add-cube-cbrt_binary648.4
Applied times-frac_binary648.4
Applied associate-*l*_binary648.0
Simplified8.0
Final simplification10.3
herbie shell --seed 2020231
(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))))