x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.6167968187710304 \cdot 10^{166}:\\
\;\;\;\;\left(y + \frac{x \cdot z}{t}\right) - \frac{z \cdot y}{t}\\
\mathbf{elif}\;t \le -6.9853465173730464 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y - x}{a - t} \cdot \left(z - t\right)\\
\mathbf{elif}\;t \le 1.4625869910697464 \cdot 10^{219}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (x + ((double) (((double) (((double) (y - x)) * ((double) (z - t)))) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((t <= -1.6167968187710304e+166)) {
VAR = ((double) (((double) (y + ((double) (((double) (x * z)) / t)))) - ((double) (((double) (z * y)) / t))));
} else {
double VAR_1;
if ((t <= -6.985346517373046e-84)) {
VAR_1 = ((double) (x + ((double) (((double) (((double) (y - x)) / ((double) (a - t)))) * ((double) (z - t))))));
} else {
double VAR_2;
if ((t <= 1.4625869910697464e+219)) {
VAR_2 = ((double) (x + ((double) (((double) (y - x)) / ((double) (((double) (a - t)) / ((double) (z - t))))))));
} else {
VAR_2 = y;
}
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 | 24.8 |
|---|---|
| Target | 9.3 |
| Herbie | 12.1 |
if t < -1.6167968187710304e166Initial program 48.6
Taylor expanded around inf 25.3
if -1.6167968187710304e166 < t < -6.9853465173730464e-84Initial program 21.7
rmApplied associate-/l*10.4
rmApplied associate-/r/11.6
if -6.9853465173730464e-84 < t < 1.4625869910697464e219Initial program 16.7
rmApplied associate-/l*7.7
if 1.4625869910697464e219 < t Initial program 50.4
rmApplied associate-/l*25.2
Taylor expanded around 0 22.1
Final simplification12.1
herbie shell --seed 2020152
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:herbie-target
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))