\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 r842826 = x;
double r842827 = y;
double r842828 = r842826 * r842827;
double r842829 = z;
double r842830 = t;
double r842831 = r842829 * r842830;
double r842832 = r842828 - r842831;
double r842833 = a;
double r842834 = r842832 / r842833;
return r842834;
}
double f(double x, double y, double z, double t, double a) {
double r842835 = x;
double r842836 = y;
double r842837 = r842835 * r842836;
double r842838 = z;
double r842839 = t;
double r842840 = r842838 * r842839;
double r842841 = r842837 - r842840;
double r842842 = -5.571537105635647e+201;
bool r842843 = r842841 <= r842842;
double r842844 = 1.0;
double r842845 = r842835 / r842844;
double r842846 = a;
double r842847 = r842836 / r842846;
double r842848 = r842846 / r842838;
double r842849 = r842839 / r842848;
double r842850 = -r842849;
double r842851 = fma(r842845, r842847, r842850);
double r842852 = -5.318639919188521e-101;
bool r842853 = r842841 <= r842852;
double r842854 = r842844 / r842846;
double r842855 = r842839 * r842838;
double r842856 = r842837 - r842855;
double r842857 = r842854 * r842856;
double r842858 = 2.7050969328804456e-219;
bool r842859 = r842841 <= r842858;
double r842860 = 9.866299714254809e+207;
bool r842861 = r842841 <= r842860;
double r842862 = r842846 / r842836;
double r842863 = r842835 / r842862;
double r842864 = r842863 - r842849;
double r842865 = r842861 ? r842857 : r842864;
double r842866 = r842859 ? r842851 : r842865;
double r842867 = r842853 ? r842857 : r842866;
double r842868 = r842843 ? r842851 : r842867;
return r842868;
}




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