\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\begin{array}{l}
\mathbf{if}\;b \le -2.43573431022587006539678668819771121502 \cdot 10^{-55}:\\
\;\;\;\;\left(\left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(a \cdot \left(j \cdot c\right) + y \cdot \left(-i \cdot j\right)\right)\\
\mathbf{elif}\;b \le -3.247942119715740045247268518672381664306 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(x \cdot \left(z \cdot y\right) + \left(-t \cdot \left(x \cdot a\right)\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;b \le -1.795486041934680815088450859297908251741 \cdot 10^{-305}:\\
\;\;\;\;\left(x \cdot \left(z \cdot y\right) + \left(-a \cdot \left(x \cdot t\right)\right)\right) + \left(a \cdot \left(j \cdot c\right) + y \cdot \left(-i \cdot j\right)\right)\\
\mathbf{elif}\;b \le 2.370330019284661706130848263045197366618 \cdot 10^{-276}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot 0\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;b \le 40241249613545970408093533024125341138940:\\
\;\;\;\;\left(\left(x \cdot \left(z \cdot y\right) + \left(-a \cdot \left(x \cdot t\right)\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-t \cdot i\right) \cdot b\right)\right) + \left(a \cdot \left(j \cdot c\right) + y \cdot \left(-i \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(a \cdot \left(j \cdot c\right) + \left(-y \cdot i\right) \cdot j\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r531703 = x;
double r531704 = y;
double r531705 = z;
double r531706 = r531704 * r531705;
double r531707 = t;
double r531708 = a;
double r531709 = r531707 * r531708;
double r531710 = r531706 - r531709;
double r531711 = r531703 * r531710;
double r531712 = b;
double r531713 = c;
double r531714 = r531713 * r531705;
double r531715 = i;
double r531716 = r531707 * r531715;
double r531717 = r531714 - r531716;
double r531718 = r531712 * r531717;
double r531719 = r531711 - r531718;
double r531720 = j;
double r531721 = r531713 * r531708;
double r531722 = r531704 * r531715;
double r531723 = r531721 - r531722;
double r531724 = r531720 * r531723;
double r531725 = r531719 + r531724;
return r531725;
}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r531726 = b;
double r531727 = -2.43573431022587e-55;
bool r531728 = r531726 <= r531727;
double r531729 = x;
double r531730 = z;
double r531731 = r531729 * r531730;
double r531732 = y;
double r531733 = r531731 * r531732;
double r531734 = a;
double r531735 = t;
double r531736 = r531729 * r531735;
double r531737 = r531734 * r531736;
double r531738 = -r531737;
double r531739 = r531733 + r531738;
double r531740 = c;
double r531741 = r531740 * r531730;
double r531742 = i;
double r531743 = r531735 * r531742;
double r531744 = r531741 - r531743;
double r531745 = r531726 * r531744;
double r531746 = r531739 - r531745;
double r531747 = j;
double r531748 = r531747 * r531740;
double r531749 = r531734 * r531748;
double r531750 = r531742 * r531747;
double r531751 = -r531750;
double r531752 = r531732 * r531751;
double r531753 = r531749 + r531752;
double r531754 = r531746 + r531753;
double r531755 = -3.24794211971574e-183;
bool r531756 = r531726 <= r531755;
double r531757 = r531730 * r531732;
double r531758 = r531729 * r531757;
double r531759 = r531729 * r531734;
double r531760 = r531735 * r531759;
double r531761 = -r531760;
double r531762 = r531758 + r531761;
double r531763 = r531762 - r531745;
double r531764 = r531740 * r531734;
double r531765 = r531732 * r531742;
double r531766 = r531764 - r531765;
double r531767 = r531747 * r531766;
double r531768 = r531763 + r531767;
double r531769 = -1.7954860419346808e-305;
bool r531770 = r531726 <= r531769;
double r531771 = r531758 + r531738;
double r531772 = r531771 + r531753;
double r531773 = 2.3703300192846617e-276;
bool r531774 = r531726 <= r531773;
double r531775 = r531732 * r531730;
double r531776 = r531735 * r531734;
double r531777 = r531775 - r531776;
double r531778 = r531729 * r531777;
double r531779 = 0.0;
double r531780 = r531726 * r531779;
double r531781 = r531778 - r531780;
double r531782 = r531781 + r531767;
double r531783 = 4.024124961354597e+40;
bool r531784 = r531726 <= r531783;
double r531785 = r531726 * r531740;
double r531786 = r531730 * r531785;
double r531787 = -r531743;
double r531788 = r531787 * r531726;
double r531789 = r531786 + r531788;
double r531790 = r531771 - r531789;
double r531791 = r531790 + r531753;
double r531792 = -r531765;
double r531793 = r531792 * r531747;
double r531794 = r531749 + r531793;
double r531795 = r531746 + r531794;
double r531796 = r531784 ? r531791 : r531795;
double r531797 = r531774 ? r531782 : r531796;
double r531798 = r531770 ? r531772 : r531797;
double r531799 = r531756 ? r531768 : r531798;
double r531800 = r531728 ? r531754 : r531799;
return r531800;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus i




Bits error versus j
Results
| Original | 12.1 |
|---|---|
| Target | 19.7 |
| Herbie | 11.0 |
if b < -2.43573431022587e-55Initial program 8.6
rmApplied sub-neg8.6
Applied distribute-lft-in8.6
Simplified8.6
Simplified8.9
rmApplied sub-neg8.9
Applied distribute-lft-in8.9
Simplified8.4
Simplified8.4
rmApplied distribute-rgt-neg-in8.4
Applied associate-*l*8.2
Simplified8.2
rmApplied associate-*r*7.6
if -2.43573431022587e-55 < b < -3.24794211971574e-183Initial program 14.6
rmApplied sub-neg14.6
Applied distribute-lft-in14.6
Simplified14.6
Simplified15.3
Taylor expanded around inf 14.6
if -3.24794211971574e-183 < b < -1.7954860419346808e-305Initial program 16.6
rmApplied sub-neg16.6
Applied distribute-lft-in16.6
Simplified16.6
Simplified16.7
rmApplied sub-neg16.7
Applied distribute-lft-in16.7
Simplified15.9
Simplified15.9
rmApplied distribute-rgt-neg-in15.9
Applied associate-*l*16.5
Simplified16.5
Taylor expanded around 0 17.3
if -1.7954860419346808e-305 < b < 2.3703300192846617e-276Initial program 20.5
Taylor expanded around 0 16.1
if 2.3703300192846617e-276 < b < 4.024124961354597e+40Initial program 13.7
rmApplied sub-neg13.7
Applied distribute-lft-in13.7
Simplified13.7
Simplified13.8
rmApplied sub-neg13.8
Applied distribute-lft-in13.8
Simplified13.7
Simplified13.7
rmApplied distribute-rgt-neg-in13.7
Applied associate-*l*13.0
Simplified13.0
rmApplied sub-neg13.0
Applied distribute-lft-in13.0
Simplified11.0
Simplified11.0
if 4.024124961354597e+40 < b Initial program 7.1
rmApplied sub-neg7.1
Applied distribute-lft-in7.1
Simplified7.1
Simplified7.0
rmApplied sub-neg7.0
Applied distribute-lft-in7.0
Simplified6.9
Simplified6.9
rmApplied associate-*r*6.9
Final simplification11.0
herbie shell --seed 2019325
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:herbie-target
(if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 3.2113527362226803e-147) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))