\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \leq -2.942162967547486 \cdot 10^{-102} \lor \neg \left(a \leq 8.42925508867061 \cdot 10^{-68}\right):\\
\;\;\;\;\left(x + y\right) - \left(\frac{z - t}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right) \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\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 (or (<= a -2.942162967547486e-102) (not (<= a 8.42925508867061e-68)))
(-
(+ x y)
(*
(* (/ (- z t) (* (cbrt (- a t)) (cbrt (- a t)))) (* (cbrt y) (cbrt y)))
(/ (cbrt y) (cbrt (- a t)))))
(+ x (/ (* y z) 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.942162967547486e-102) || !(a <= 8.42925508867061e-68)) {
tmp = (x + y) - ((((z - t) / (cbrt(a - t) * cbrt(a - t))) * (cbrt(y) * cbrt(y))) * (cbrt(y) / cbrt(a - t)));
} else {
tmp = x + ((y * z) / 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 | 15.9 |
|---|---|
| Target | 8.0 |
| Herbie | 9.1 |
if a < -2.9421629675474858e-102 or 8.42925508867061021e-68 < a Initial program 14.0
rmApplied add-cube-cbrt_binary6414.1
Applied times-frac_binary647.4
rmApplied *-un-lft-identity_binary647.4
Applied add-cube-cbrt_binary647.5
Applied times-frac_binary647.5
Applied associate-*r*_binary647.3
Simplified7.3
if -2.9421629675474858e-102 < a < 8.42925508867061021e-68Initial program 19.7
Taylor expanded around inf 12.5
Simplified12.5
Final simplification9.1
herbie shell --seed 2020224
(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))))