\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -9.10096076332943717401674543850064881245 \cdot 10^{207}:\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{z}{\frac{a}{t}}\\
\mathbf{elif}\;x \cdot y - z \cdot t \le 2.746849764792953097926317250912086301221 \cdot 10^{224}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{t}{a} \cdot z\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r49474385 = x;
double r49474386 = y;
double r49474387 = r49474385 * r49474386;
double r49474388 = z;
double r49474389 = t;
double r49474390 = r49474388 * r49474389;
double r49474391 = r49474387 - r49474390;
double r49474392 = a;
double r49474393 = r49474391 / r49474392;
return r49474393;
}
double f(double x, double y, double z, double t, double a) {
double r49474394 = x;
double r49474395 = y;
double r49474396 = r49474394 * r49474395;
double r49474397 = z;
double r49474398 = t;
double r49474399 = r49474397 * r49474398;
double r49474400 = r49474396 - r49474399;
double r49474401 = -9.100960763329437e+207;
bool r49474402 = r49474400 <= r49474401;
double r49474403 = a;
double r49474404 = r49474395 / r49474403;
double r49474405 = r49474394 * r49474404;
double r49474406 = r49474403 / r49474398;
double r49474407 = r49474397 / r49474406;
double r49474408 = r49474405 - r49474407;
double r49474409 = 2.746849764792953e+224;
bool r49474410 = r49474400 <= r49474409;
double r49474411 = r49474400 / r49474403;
double r49474412 = r49474403 / r49474395;
double r49474413 = r49474394 / r49474412;
double r49474414 = r49474398 / r49474403;
double r49474415 = r49474414 * r49474397;
double r49474416 = r49474413 - r49474415;
double r49474417 = r49474410 ? r49474411 : r49474416;
double r49474418 = r49474402 ? r49474408 : r49474417;
return r49474418;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.8 |
|---|---|
| Target | 5.9 |
| Herbie | 0.8 |
if (- (* x y) (* z t)) < -9.100960763329437e+207Initial program 29.1
rmApplied div-sub29.1
rmApplied associate-/l*14.7
rmApplied *-un-lft-identity14.7
Applied times-frac1.1
Simplified1.1
if -9.100960763329437e+207 < (- (* x y) (* z t)) < 2.746849764792953e+224Initial program 0.8
rmApplied div-sub0.8
rmApplied *-un-lft-identity0.8
Applied times-frac5.6
Simplified5.6
rmApplied associate-*r/0.8
Applied sub-div0.8
if 2.746849764792953e+224 < (- (* x y) (* z t)) Initial program 34.2
rmApplied div-sub34.2
rmApplied *-un-lft-identity34.2
Applied times-frac18.2
Simplified18.2
rmApplied associate-/l*0.7
Final simplification0.8
herbie shell --seed 2019171
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
: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))