\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}\;a \le -4.11321520749969792 \cdot 10^{-78}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(\left(c \cdot j\right) \cdot a + \left(y \cdot 1\right) \cdot \left(j \cdot \left(-i\right)\right)\right)\\
\mathbf{elif}\;a \le -2.24542925777398594 \cdot 10^{-268}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(j \cdot \left(c \cdot a\right) + \left(j \cdot \left(-y \cdot \left(\sqrt[3]{i} \cdot \sqrt[3]{i}\right)\right)\right) \cdot \sqrt[3]{i}\right)\\
\mathbf{elif}\;a \le 4.0322180842223631 \cdot 10^{-134}:\\
\;\;\;\;\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(y \cdot z - t \cdot a\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(\left(c \cdot j\right) \cdot a + \left(y \cdot j\right) \cdot \left(-i\right)\right)\\
\mathbf{elif}\;a \le 3.6283701980148593 \cdot 10^{-82}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - 0\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(\left(c \cdot j\right) \cdot a + \left(y \cdot 1\right) \cdot \left(j \cdot \left(-i\right)\right)\right)\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (j * ((double) (((double) (c * a)) - ((double) (y * i))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double VAR;
if ((a <= -4.113215207499698e-78)) {
VAR = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (((double) (((double) (c * j)) * a)) + ((double) (((double) (y * 1.0)) * ((double) (j * ((double) -(i))))))))));
} else {
double VAR_1;
if ((a <= -2.245429257773986e-268)) {
VAR_1 = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (((double) (j * ((double) (c * a)))) + ((double) (((double) (j * ((double) -(((double) (y * ((double) (((double) cbrt(i)) * ((double) cbrt(i)))))))))) * ((double) cbrt(i))))))));
} else {
double VAR_2;
if ((a <= 4.032218084222363e-134)) {
VAR_2 = ((double) (((double) (((double) (((double) (((double) cbrt(x)) * ((double) cbrt(x)))) * ((double) (((double) cbrt(x)) * ((double) (((double) (y * z)) - ((double) (t * a)))))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (((double) (((double) (c * j)) * a)) + ((double) (((double) (y * j)) * ((double) -(i))))))));
} else {
double VAR_3;
if ((a <= 3.6283701980148593e-82)) {
VAR_3 = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - 0.0)) + ((double) (j * ((double) (((double) (c * a)) - ((double) (y * i))))))));
} else {
VAR_3 = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (c * z)) - ((double) (t * i)))))))) + ((double) (((double) (((double) (c * j)) * a)) + ((double) (((double) (y * 1.0)) * ((double) (j * ((double) -(i))))))))));
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




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.3 |
|---|---|
| Target | 19.5 |
| Herbie | 12.6 |
if a < -4.113215207499698e-78 or 3.6283701980148593e-82 < a Initial program 14.5
rmApplied sub-neg14.5
Applied distribute-lft-in14.5
rmApplied distribute-rgt-neg-in14.5
Applied associate-*r*14.3
Simplified14.3
rmApplied associate-*r*11.7
Simplified11.7
rmApplied *-un-lft-identity11.7
Applied associate-*r*11.7
Applied associate-*l*11.8
if -4.113215207499698e-78 < a < -2.245429257773986e-268Initial program 9.4
rmApplied sub-neg9.4
Applied distribute-lft-in9.4
rmApplied add-cube-cbrt9.5
Applied associate-*r*9.6
Applied distribute-lft-neg-in9.6
Applied associate-*r*9.1
if -2.245429257773986e-268 < a < 4.032218084222363e-134Initial program 10.5
rmApplied sub-neg10.5
Applied distribute-lft-in10.5
rmApplied distribute-rgt-neg-in10.5
Applied associate-*r*11.1
Simplified11.1
rmApplied associate-*r*14.4
Simplified14.4
rmApplied add-cube-cbrt14.6
Applied associate-*l*14.6
if 4.032218084222363e-134 < a < 3.6283701980148593e-82Initial program 8.5
Taylor expanded around 0 26.3
Final simplification12.6
herbie shell --seed 2020114
(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)))))