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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.5 |
|---|---|
| Target | 8.7 |
| Herbie | 9.4 |
if a < -2.84625628662862075e-64Initial program 14.6
rmApplied add-cube-cbrt_binary64_1628514.7
Applied times-frac_binary64_162597.6
rmApplied add-cube-cbrt_binary64_162857.6
Applied associate-*l*_binary64_161967.6
Simplified7.6
rmApplied div-inv_binary64_162507.6
Applied cbrt-prod_binary64_162817.6
Applied associate-*r*_binary64_161957.6
if -2.84625628662862075e-64 < a < 2.81449980309609704e-220Initial program 20.9
Taylor expanded around inf 11.0
Simplified11.0
if 2.81449980309609704e-220 < a Initial program 15.4
rmApplied add-cube-cbrt_binary64_1628515.5
Applied times-frac_binary64_162599.7
rmApplied add-cube-cbrt_binary64_162859.8
Applied associate-*l*_binary64_161969.8
Simplified9.8
Final simplification9.4
herbie shell --seed 2020292
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))