x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.08016826159672186 \cdot 10^{-73}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t \le -7.96333578900575901 \cdot 10^{-299}:\\
\;\;\;\;x + \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{a - t}\right) \cdot \left(\left(z - t\right) \cdot \sqrt[3]{y}\right)\\
\mathbf{elif}\;t \le 3.463479683183646 \cdot 10^{-184}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (y * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((t <= -1.0801682615967219e-73)) {
VAR = ((double) (x + ((double) (y / ((double) (((double) (a - t)) / ((double) (z - t))))))));
} else {
double VAR_1;
if ((t <= -7.963335789005759e-299)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) cbrt(y)) * ((double) (((double) cbrt(y)) / ((double) (a - t)))))) * ((double) (((double) (z - t)) * ((double) cbrt(y))))))));
} else {
double VAR_2;
if ((t <= 3.463479683183646e-184)) {
VAR_2 = ((double) (x + ((double) (((double) (z - t)) * ((double) (y / ((double) (a - t))))))));
} else {
VAR_2 = ((double) (x + ((double) (y / ((double) (((double) (a - t)) / ((double) (z - t))))))));
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.9 |
|---|---|
| Target | 1.2 |
| Herbie | 1.1 |
if t < -1.08016826159672186e-73 or 3.463479683183646e-184 < t Initial program 13.4
Simplified0.4
rmApplied clear-num0.5
rmApplied un-div-inv0.4
if -1.08016826159672186e-73 < t < -7.96333578900575901e-299Initial program 4.3
Simplified3.7
rmApplied clear-num3.8
rmApplied un-div-inv3.5
rmApplied div-inv3.5
Applied add-cube-cbrt3.9
Applied times-frac2.7
Simplified2.7
Simplified2.7
if -7.96333578900575901e-299 < t < 3.463479683183646e-184Initial program 4.1
Simplified3.4
rmApplied clear-num3.5
rmApplied associate-/r/3.5
Applied associate-*r*3.9
Simplified3.9
Final simplification1.1
herbie shell --seed 2020184
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))