\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;z \cdot t = -\infty:\\
\;\;\;\;\frac{x \cdot y}{a} - \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;z \cdot t \le -3.24224747448874068 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{t \cdot z}{a}\\
\mathbf{elif}\;z \cdot t \le 3.8091633157323544 \cdot 10^{-199}:\\
\;\;\;\;\frac{1}{a \cdot \frac{1}{x \cdot y - z \cdot t}}\\
\mathbf{elif}\;z \cdot t \le 2.0861571477552367 \cdot 10^{-102}:\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{t \cdot z}{a}\\
\mathbf{elif}\;z \cdot t \le 131036.962942321014:\\
\;\;\;\;\frac{1}{a \cdot \frac{1}{x \cdot y - z \cdot t}}\\
\mathbf{elif}\;z \cdot t \le 1.6265335498807516 \cdot 10^{301}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{t \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a} - t \cdot \frac{z}{a}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return (((x * y) - (z * t)) / a);
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((z * t) <= -inf.0)) {
temp = (((x * y) / a) - (t / (a / z)));
} else {
double temp_1;
if (((z * t) <= -3.2422474744887407e-93)) {
temp_1 = ((x / (a / y)) - ((t * z) / a));
} else {
double temp_2;
if (((z * t) <= 3.8091633157323544e-199)) {
temp_2 = (1.0 / (a * (1.0 / ((x * y) - (z * t)))));
} else {
double temp_3;
if (((z * t) <= 2.0861571477552367e-102)) {
temp_3 = ((x * (y / a)) - ((t * z) / a));
} else {
double temp_4;
if (((z * t) <= 131036.96294232101)) {
temp_4 = (1.0 / (a * (1.0 / ((x * y) - (z * t)))));
} else {
double temp_5;
if (((z * t) <= 1.6265335498807516e+301)) {
temp_5 = ((x / (a / y)) - ((t * z) / a));
} else {
temp_5 = (((x * y) / a) - (t * (z / a)));
}
temp_4 = temp_5;
}
temp_3 = temp_4;
}
temp_2 = temp_3;
}
temp_1 = temp_2;
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.4 |
|---|---|
| Target | 5.9 |
| Herbie | 4.2 |
if (* z t) < -inf.0Initial program 64.0
rmApplied div-sub64.0
Simplified64.0
rmApplied associate-/l*7.0
if -inf.0 < (* z t) < -3.2422474744887407e-93 or 131036.96294232101 < (* z t) < 1.6265335498807516e+301Initial program 3.7
rmApplied div-sub3.7
Simplified3.7
rmApplied associate-/l*2.6
if -3.2422474744887407e-93 < (* z t) < 3.8091633157323544e-199 or 2.0861571477552367e-102 < (* z t) < 131036.96294232101Initial program 4.5
rmApplied clear-num4.8
rmApplied div-inv5.1
if 3.8091633157323544e-199 < (* z t) < 2.0861571477552367e-102Initial program 3.3
rmApplied div-sub3.3
Simplified3.3
rmApplied *-un-lft-identity3.3
Applied times-frac5.2
Simplified5.2
if 1.6265335498807516e+301 < (* z t) Initial program 58.5
rmApplied div-sub58.5
Simplified58.5
rmApplied *-un-lft-identity58.5
Applied times-frac7.8
Simplified7.8
Final simplification4.2
herbie shell --seed 2020053
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))