\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -1.84983714649141212 \cdot 10^{228}:\\
\;\;\;\;x \cdot \frac{y}{a} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y - z \cdot t \le -3.89245830945422355 \cdot 10^{-123} \lor \neg \left(x \cdot y - z \cdot t \le 8.05837194167480624 \cdot 10^{-141}\right) \land x \cdot y - z \cdot t \le 1.06699263789496906 \cdot 10^{186}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, -t \cdot z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{y}{a}, \frac{-t}{\frac{a}{z}}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r806122 = x;
double r806123 = y;
double r806124 = r806122 * r806123;
double r806125 = z;
double r806126 = t;
double r806127 = r806125 * r806126;
double r806128 = r806124 - r806127;
double r806129 = a;
double r806130 = r806128 / r806129;
return r806130;
}
double f(double x, double y, double z, double t, double a) {
double r806131 = x;
double r806132 = y;
double r806133 = r806131 * r806132;
double r806134 = z;
double r806135 = t;
double r806136 = r806134 * r806135;
double r806137 = r806133 - r806136;
double r806138 = -1.849837146491412e+228;
bool r806139 = r806137 <= r806138;
double r806140 = a;
double r806141 = r806132 / r806140;
double r806142 = r806131 * r806141;
double r806143 = r806135 / r806140;
double r806144 = r806134 * r806143;
double r806145 = r806142 - r806144;
double r806146 = -3.8924583094542236e-123;
bool r806147 = r806137 <= r806146;
double r806148 = 8.058371941674806e-141;
bool r806149 = r806137 <= r806148;
double r806150 = !r806149;
double r806151 = 1.066992637894969e+186;
bool r806152 = r806137 <= r806151;
bool r806153 = r806150 && r806152;
bool r806154 = r806147 || r806153;
double r806155 = r806135 * r806134;
double r806156 = -r806155;
double r806157 = fma(r806131, r806132, r806156);
double r806158 = r806157 / r806140;
double r806159 = -r806135;
double r806160 = r806140 / r806134;
double r806161 = r806159 / r806160;
double r806162 = fma(r806131, r806141, r806161);
double r806163 = r806154 ? r806158 : r806162;
double r806164 = r806139 ? r806145 : r806163;
return r806164;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 7.9 |
|---|---|
| Target | 6.0 |
| Herbie | 0.9 |
if (- (* x y) (* z t)) < -1.849837146491412e+228Initial program 34.5
rmApplied div-sub34.5
Simplified19.9
rmApplied *-un-lft-identity19.9
Applied times-frac0.8
Simplified0.8
if -1.849837146491412e+228 < (- (* x y) (* z t)) < -3.8924583094542236e-123 or 8.058371941674806e-141 < (- (* x y) (* z t)) < 1.066992637894969e+186Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied associate-/r*0.3
Simplified0.3
if -3.8924583094542236e-123 < (- (* x y) (* z t)) < 8.058371941674806e-141 or 1.066992637894969e+186 < (- (* x y) (* z t)) Initial program 15.5
rmApplied div-sub15.5
Simplified9.4
rmApplied fma-neg9.4
Simplified2.6
Final simplification0.9
herbie shell --seed 2020047 +o rules:numerics
(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))