\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 \leq -1.9562468092035635 \cdot 10^{-38} \lor \neg \left(b \leq 5.9759261791165706 \cdot 10^{+85}\right):\\
\;\;\;\;\left(\left(y \cdot \left(z \cdot x\right) - a \cdot \left(x \cdot t\right)\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right) + \left(x \cdot \left(y \cdot z - a \cdot t\right) + \left(i \cdot \left(b \cdot t\right) - z \cdot \left(b \cdot c\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 (((b <= -1.9562468092035635e-38) || !(b <= 5.9759261791165706e+85))) {
VAR = ((double) (((double) (((double) (((double) (y * ((double) (z * x)))) - ((double) (a * ((double) (x * t)))))) + ((double) (b * ((double) (((double) (t * i)) - ((double) (z * c)))))))) + ((double) (j * ((double) (((double) (a * c)) - ((double) (y * i))))))));
} else {
VAR = ((double) (((double) (j * ((double) (((double) (a * c)) - ((double) (y * i)))))) + ((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (a * t)))))) + ((double) (((double) (i * ((double) (b * t)))) - ((double) (z * ((double) (b * c))))))))));
}
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.4 |
|---|---|
| Target | 19.5 |
| Herbie | 9.1 |
if b < -1.95624680920356354e-38 or 5.97592617911657063e85 < b Initial program Error: 8.0 bits
rmApplied sub-negError: 8.0 bits
Applied distribute-lft-inError: 8.0 bits
SimplifiedError: 8.0 bits
SimplifiedError: 7.5 bits
if -1.95624680920356354e-38 < b < 5.97592617911657063e85Initial program Error: 14.8 bits
rmApplied sub-negError: 14.8 bits
Applied distribute-lft-inError: 14.8 bits
SimplifiedError: 12.4 bits
SimplifiedError: 10.0 bits
rmApplied associate-*r*Error: 10.0 bits
Final simplificationError: 9.1 bits
herbie shell --seed 2020200
(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)))))