\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}\;i \le -3.62476977029911861 \cdot 10^{-134} \lor \neg \left(i \le 2.419900472875752 \cdot 10^{63}\right):\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(i \cdot \left(t \cdot b\right) - c \cdot \left(z \cdot b\right)\right)\right) + \left(c \cdot \left(a \cdot j\right) - i \cdot \left(y \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z \cdot \left(x \cdot y\right) - t \cdot \left(x \cdot a\right)\right) + b \cdot \left(i \cdot t - z \cdot c\right)\right) + j \cdot \left(a \cdot c - i \cdot y\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 (((i <= -3.6247697702991186e-134) || !(i <= 2.419900472875752e+63))) {
VAR = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (((double) (i * ((double) (t * b)))) - ((double) (c * ((double) (z * b)))))))) + ((double) (((double) (c * ((double) (a * j)))) - ((double) (i * ((double) (y * j))))))));
} else {
VAR = ((double) (((double) (((double) (((double) (z * ((double) (x * y)))) - ((double) (t * ((double) (x * a)))))) + ((double) (b * ((double) (((double) (i * t)) - ((double) (z * c)))))))) + ((double) (j * ((double) (((double) (a * c)) - ((double) (i * y))))))));
}
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.1 |
|---|---|
| Target | 20.1 |
| Herbie | 9.4 |
if i < -3.62476977029911861e-134 or 2.419900472875752e63 < i Initial program 15.3
rmApplied sub-neg15.3
Applied distribute-lft-in15.3
Simplified15.7
Simplified12.6
rmApplied sub-neg12.6
Applied distribute-lft-in12.6
Simplified12.4
Simplified9.0
if -3.62476977029911861e-134 < i < 2.419900472875752e63Initial program 9.4
rmApplied sub-neg9.4
Applied distribute-lft-in9.4
Simplified10.3
Simplified9.7
Final simplification9.4
herbie shell --seed 2020185
(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.0) (pow (* t i) 2.0))) (+ (* 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.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))