x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -46720587756088048:\\
\;\;\;\;x + y \cdot \left(\left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\mathbf{elif}\;y \le 9.58917763687226783 \cdot 10^{-126}:\\
\;\;\;\;x + \frac{1}{\frac{a - t}{y \cdot \left(z - t\right)}}\\
\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 ((y <= -4.672058775608805e+16)) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (z - t)) * ((double) (1.0 / ((double) (a - t))))))))));
} else {
double VAR_1;
if ((y <= 9.589177636872268e-126)) {
VAR_1 = ((double) (x + ((double) (1.0 / ((double) (((double) (a - t)) / ((double) (y * ((double) (z - t))))))))));
} else {
VAR_1 = ((double) (x + ((double) (y / ((double) (((double) (a - t)) / ((double) (z - t))))))));
}
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.8 |
|---|---|
| Target | 1.2 |
| Herbie | 0.6 |
if y < -4.672058775608805e+16Initial program 24.6
rmApplied *-un-lft-identity24.6
Applied times-frac0.4
Simplified0.4
rmApplied div-inv0.5
if -4.672058775608805e+16 < y < 9.589177636872268e-126Initial program 0.4
rmApplied clear-num0.5
if 9.589177636872268e-126 < y Initial program 15.8
rmApplied associate-/l*0.7
Final simplification0.6
herbie shell --seed 2020123
(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))))