\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -5.571537105635647305055441915656520766598 \cdot 10^{201}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{1}, \frac{y}{a}, -\frac{t}{\frac{a}{z}}\right)\\
\mathbf{elif}\;x \cdot y - z \cdot t \le -5.318639919188520705096400337034496027923 \cdot 10^{-101}:\\
\;\;\;\;\frac{1}{a} \cdot \left(x \cdot y - t \cdot z\right)\\
\mathbf{elif}\;x \cdot y - z \cdot t \le 2.705096932880445635207773638884756059712 \cdot 10^{-219}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{1}, \frac{y}{a}, -\frac{t}{\frac{a}{z}}\right)\\
\mathbf{elif}\;x \cdot y - z \cdot t \le 9.866299714254808615331411381510550183903 \cdot 10^{207}:\\
\;\;\;\;\frac{1}{a} \cdot \left(x \cdot y - t \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{t}{\frac{a}{z}}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r785228 = x;
double r785229 = y;
double r785230 = r785228 * r785229;
double r785231 = z;
double r785232 = t;
double r785233 = r785231 * r785232;
double r785234 = r785230 - r785233;
double r785235 = a;
double r785236 = r785234 / r785235;
return r785236;
}
double f(double x, double y, double z, double t, double a) {
double r785237 = x;
double r785238 = y;
double r785239 = r785237 * r785238;
double r785240 = z;
double r785241 = t;
double r785242 = r785240 * r785241;
double r785243 = r785239 - r785242;
double r785244 = -5.571537105635647e+201;
bool r785245 = r785243 <= r785244;
double r785246 = 1.0;
double r785247 = r785237 / r785246;
double r785248 = a;
double r785249 = r785238 / r785248;
double r785250 = r785248 / r785240;
double r785251 = r785241 / r785250;
double r785252 = -r785251;
double r785253 = fma(r785247, r785249, r785252);
double r785254 = -5.318639919188521e-101;
bool r785255 = r785243 <= r785254;
double r785256 = r785246 / r785248;
double r785257 = r785241 * r785240;
double r785258 = r785239 - r785257;
double r785259 = r785256 * r785258;
double r785260 = 2.7050969328804456e-219;
bool r785261 = r785243 <= r785260;
double r785262 = 9.866299714254809e+207;
bool r785263 = r785243 <= r785262;
double r785264 = r785248 / r785238;
double r785265 = r785237 / r785264;
double r785266 = r785265 - r785251;
double r785267 = r785263 ? r785259 : r785266;
double r785268 = r785261 ? r785253 : r785267;
double r785269 = r785255 ? r785259 : r785268;
double r785270 = r785245 ? r785253 : r785269;
return r785270;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 7.8 |
|---|---|
| Target | 6.1 |
| Herbie | 0.8 |
if (- (* x y) (* z t)) < -5.571537105635647e+201 or -5.318639919188521e-101 < (- (* x y) (* z t)) < 2.7050969328804456e-219Initial program 17.9
rmApplied div-sub17.9
Simplified17.9
rmApplied associate-/l*10.5
rmApplied *-un-lft-identity10.5
Applied times-frac1.8
Applied fma-neg1.8
if -5.571537105635647e+201 < (- (* x y) (* z t)) < -5.318639919188521e-101 or 2.7050969328804456e-219 < (- (* x y) (* z t)) < 9.866299714254809e+207Initial program 0.3
rmApplied div-sub0.3
Simplified0.3
rmApplied div-inv0.3
Applied div-inv0.3
Applied distribute-rgt-out--0.3
if 9.866299714254809e+207 < (- (* x y) (* z t)) Initial program 29.1
rmApplied div-sub29.1
Simplified29.1
rmApplied associate-/l*16.8
rmApplied associate-/l*0.9
Final simplification0.8
herbie shell --seed 2020001 +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))