\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \le -1.0585773649804962 \cdot 10^{295}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + 27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;\left(y \cdot 9\right) \cdot z \le 7609499462.3579979:\\
\;\;\;\;\left(2 \cdot x - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot x - \left(\left(9 \cdot t\right) \cdot z\right) \cdot y\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((((y * 9.0) * z) <= -1.0585773649804962e+295)) {
VAR = (((x * 2.0) - ((y * 9.0) * (z * t))) + (27.0 * (a * b)));
} else {
double VAR_1;
if ((((y * 9.0) * z) <= 7609499462.357998)) {
VAR_1 = (((2.0 * x) - (9.0 * (t * (z * y)))) + ((a * 27.0) * b));
} else {
VAR_1 = (((2.0 * x) - (((9.0 * t) * z) * y)) + ((a * 27.0) * b));
}
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




Bits error versus b
Results
| Original | 3.6 |
|---|---|
| Target | 2.6 |
| Herbie | 1.2 |
if (* (* y 9.0) z) < -1.0585773649804962e+295Initial program 55.6
Taylor expanded around 0 55.6
rmApplied associate-*l*1.6
if -1.0585773649804962e+295 < (* (* y 9.0) z) < 7609499462.357998Initial program 0.5
Taylor expanded around inf 0.5
if 7609499462.357998 < (* (* y 9.0) z) Initial program 8.3
Taylor expanded around inf 8.2
rmApplied associate-*r*8.1
rmApplied associate-*r*4.2
Final simplification1.2
herbie shell --seed 2020100
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< y 7.590524218811189e-161) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b)))
(+ (- (* x 2) (* (* (* y 9) z) t)) (* (* a 27) b)))