\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 r744628 = x;
double r744629 = y;
double r744630 = r744628 * r744629;
double r744631 = z;
double r744632 = t;
double r744633 = r744631 * r744632;
double r744634 = r744630 - r744633;
double r744635 = a;
double r744636 = r744634 / r744635;
return r744636;
}
double f(double x, double y, double z, double t, double a) {
double r744637 = x;
double r744638 = y;
double r744639 = r744637 * r744638;
double r744640 = z;
double r744641 = t;
double r744642 = r744640 * r744641;
double r744643 = r744639 - r744642;
double r744644 = -5.571537105635647e+201;
bool r744645 = r744643 <= r744644;
double r744646 = 1.0;
double r744647 = r744637 / r744646;
double r744648 = a;
double r744649 = r744638 / r744648;
double r744650 = r744648 / r744640;
double r744651 = r744641 / r744650;
double r744652 = -r744651;
double r744653 = fma(r744647, r744649, r744652);
double r744654 = -5.318639919188521e-101;
bool r744655 = r744643 <= r744654;
double r744656 = r744646 / r744648;
double r744657 = r744641 * r744640;
double r744658 = r744639 - r744657;
double r744659 = r744656 * r744658;
double r744660 = 2.7050969328804456e-219;
bool r744661 = r744643 <= r744660;
double r744662 = 9.866299714254809e+207;
bool r744663 = r744643 <= r744662;
double r744664 = r744648 / r744638;
double r744665 = r744637 / r744664;
double r744666 = r744665 - r744651;
double r744667 = r744663 ? r744659 : r744666;
double r744668 = r744661 ? r744653 : r744667;
double r744669 = r744655 ? r744659 : r744668;
double r744670 = r744645 ? r744653 : r744669;
return r744670;
}




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