\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y - z \cdot t}{a} \le -2.05893380679011527 \cdot 10^{303} \lor \neg \left(\frac{x \cdot y - z \cdot t}{a} \le -2.2499496249160079 \cdot 10^{-304} \lor \neg \left(\frac{x \cdot y - z \cdot t}{a} \le 2.96439 \cdot 10^{-323}\right) \land \frac{x \cdot y - z \cdot t}{a} \le 1.74421414347862621 \cdot 10^{294}\right):\\
\;\;\;\;x \cdot \frac{y}{a} - t \cdot \frac{z}{{\left(\sqrt[3]{a}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{a}{x \cdot y - z \cdot t}}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r1111221 = x;
double r1111222 = y;
double r1111223 = r1111221 * r1111222;
double r1111224 = z;
double r1111225 = t;
double r1111226 = r1111224 * r1111225;
double r1111227 = r1111223 - r1111226;
double r1111228 = a;
double r1111229 = r1111227 / r1111228;
return r1111229;
}
double f(double x, double y, double z, double t, double a) {
double r1111230 = x;
double r1111231 = y;
double r1111232 = r1111230 * r1111231;
double r1111233 = z;
double r1111234 = t;
double r1111235 = r1111233 * r1111234;
double r1111236 = r1111232 - r1111235;
double r1111237 = a;
double r1111238 = r1111236 / r1111237;
double r1111239 = -2.0589338067901153e+303;
bool r1111240 = r1111238 <= r1111239;
double r1111241 = -2.249949624916008e-304;
bool r1111242 = r1111238 <= r1111241;
double r1111243 = 2.9643938750475e-323;
bool r1111244 = r1111238 <= r1111243;
double r1111245 = !r1111244;
double r1111246 = 1.7442141434786262e+294;
bool r1111247 = r1111238 <= r1111246;
bool r1111248 = r1111245 && r1111247;
bool r1111249 = r1111242 || r1111248;
double r1111250 = !r1111249;
bool r1111251 = r1111240 || r1111250;
double r1111252 = r1111231 / r1111237;
double r1111253 = r1111230 * r1111252;
double r1111254 = cbrt(r1111237);
double r1111255 = 3.0;
double r1111256 = pow(r1111254, r1111255);
double r1111257 = r1111233 / r1111256;
double r1111258 = r1111234 * r1111257;
double r1111259 = r1111253 - r1111258;
double r1111260 = 1.0;
double r1111261 = r1111237 / r1111236;
double r1111262 = r1111260 / r1111261;
double r1111263 = r1111251 ? r1111259 : r1111262;
return r1111263;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.9 |
|---|---|
| Target | 6.0 |
| Herbie | 0.9 |
if (/ (- (* x y) (* z t)) a) < -2.0589338067901153e+303 or -2.249949624916008e-304 < (/ (- (* x y) (* z t)) a) < 2.9643938750475e-323 or 1.7442141434786262e+294 < (/ (- (* x y) (* z t)) a) Initial program 37.8
rmApplied div-sub37.8
Simplified37.8
rmApplied add-cube-cbrt37.8
Applied times-frac20.5
rmApplied *-un-lft-identity20.5
Applied times-frac2.4
Simplified2.4
rmApplied div-inv2.4
Applied associate-*l*2.5
Simplified2.5
if -2.0589338067901153e+303 < (/ (- (* x y) (* z t)) a) < -2.249949624916008e-304 or 2.9643938750475e-323 < (/ (- (* x y) (* z t)) a) < 1.7442141434786262e+294Initial program 0.3
rmApplied clear-num0.5
Final simplification0.9
herbie shell --seed 2020047
(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))