x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;z \leq -9.227758035671217 \cdot 10^{-125} \lor \neg \left(z \leq 8.334207124138048 \cdot 10^{-119}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot \left(\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}\right)\right) \cdot \frac{\sqrt[3]{z - t}}{z - a}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((z <= -9.227758035671217e-125) || !(z <= 8.334207124138048e-119))) {
VAR = ((double) (x + ((double) (y * (((double) (z - t)) / ((double) (z - a)))))));
} else {
VAR = ((double) (x + ((double) (((double) (y * ((double) (((double) cbrt(((double) (z - t)))) * ((double) cbrt(((double) (z - t)))))))) * (((double) cbrt(((double) (z - t)))) / ((double) (z - a)))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.6 |
|---|---|
| Target | 1.4 |
| Herbie | 1.3 |
if z < -9.2277580356712173e-125 or 8.3342071241380482e-119 < z Initial program 0.5
if -9.2277580356712173e-125 < z < 8.3342071241380482e-119Initial program 4.3
rmApplied *-un-lft-identity4.3
Applied add-cube-cbrt4.7
Applied times-frac4.7
Applied associate-*r*3.2
Simplified3.2
Final simplification1.3
herbie shell --seed 2020196
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))