\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 r44711585 = x;
double r44711586 = y;
double r44711587 = r44711585 * r44711586;
double r44711588 = z;
double r44711589 = t;
double r44711590 = r44711588 * r44711589;
double r44711591 = r44711587 - r44711590;
double r44711592 = a;
double r44711593 = r44711591 / r44711592;
return r44711593;
}
double f(double x, double y, double z, double t, double a) {
double r44711594 = x;
double r44711595 = y;
double r44711596 = r44711594 * r44711595;
double r44711597 = z;
double r44711598 = t;
double r44711599 = r44711597 * r44711598;
double r44711600 = r44711596 - r44711599;
double r44711601 = -9.100960763329437e+207;
bool r44711602 = r44711600 <= r44711601;
double r44711603 = a;
double r44711604 = r44711595 / r44711603;
double r44711605 = r44711594 * r44711604;
double r44711606 = r44711603 / r44711598;
double r44711607 = r44711597 / r44711606;
double r44711608 = r44711605 - r44711607;
double r44711609 = 2.746849764792953e+224;
bool r44711610 = r44711600 <= r44711609;
double r44711611 = r44711600 / r44711603;
double r44711612 = r44711603 / r44711595;
double r44711613 = r44711594 / r44711612;
double r44711614 = r44711598 / r44711603;
double r44711615 = r44711614 * r44711597;
double r44711616 = r44711613 - r44711615;
double r44711617 = r44711610 ? r44711611 : r44711616;
double r44711618 = r44711602 ? r44711608 : r44711617;
return r44711618;
}




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))