\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t = -\infty \lor \neg \left(x \cdot y - z \cdot t \le 6.2688458872086312 \cdot 10^{203}\right):\\
\;\;\;\;\frac{x}{\frac{a}{y}} - \frac{z}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a} \cdot \left(x \cdot y - z \cdot t\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r995817 = x;
double r995818 = y;
double r995819 = r995817 * r995818;
double r995820 = z;
double r995821 = t;
double r995822 = r995820 * r995821;
double r995823 = r995819 - r995822;
double r995824 = a;
double r995825 = r995823 / r995824;
return r995825;
}
double f(double x, double y, double z, double t, double a) {
double r995826 = x;
double r995827 = y;
double r995828 = r995826 * r995827;
double r995829 = z;
double r995830 = t;
double r995831 = r995829 * r995830;
double r995832 = r995828 - r995831;
double r995833 = -inf.0;
bool r995834 = r995832 <= r995833;
double r995835 = 6.268845887208631e+203;
bool r995836 = r995832 <= r995835;
double r995837 = !r995836;
bool r995838 = r995834 || r995837;
double r995839 = a;
double r995840 = r995839 / r995827;
double r995841 = r995826 / r995840;
double r995842 = r995839 / r995830;
double r995843 = r995829 / r995842;
double r995844 = r995841 - r995843;
double r995845 = 1.0;
double r995846 = r995845 / r995839;
double r995847 = r995846 * r995832;
double r995848 = r995838 ? r995844 : r995847;
return r995848;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.5 |
|---|---|
| Target | 6.1 |
| Herbie | 0.8 |
if (- (* x y) (* z t)) < -inf.0 or 6.268845887208631e+203 < (- (* x y) (* z t)) Initial program 38.9
rmApplied div-sub38.9
rmApplied associate-/l*20.3
rmApplied associate-/l*0.9
if -inf.0 < (- (* x y) (* z t)) < 6.268845887208631e+203Initial program 0.7
rmApplied div-sub0.7
rmApplied div-inv0.8
Applied div-inv0.8
Applied distribute-rgt-out--0.8
Final simplification0.8
herbie shell --seed 2020046
(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))