\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 -4.8212496187944244 \cdot 10^{+32}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right) + \left(\sqrt[3]{j} \cdot \sqrt[3]{j}\right) \cdot \left(\sqrt[3]{j} \cdot \left(a \cdot c - y \cdot i\right)\right)\\
\mathbf{elif}\;b \leq 1.2070106218244255 \cdot 10^{-84}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - \left(z \cdot \left(b \cdot c\right) - i \cdot \left(b \cdot t\right)\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 - t \cdot a\right) - \sqrt{b} \cdot \left(\left(z \cdot c - t \cdot i\right) \cdot \sqrt{b}\right)\right)\\
\end{array}(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -4.8212496187944244e+32)
(+
(- (* x (- (* y z) (* t a))) (* b (- (* z c) (* t i))))
(* (* (cbrt j) (cbrt j)) (* (cbrt j) (- (* a c) (* y i)))))
(if (<= b 1.2070106218244255e-84)
(+
(- (* x (- (* y z) (* t a))) (- (* z (* b c)) (* i (* b t))))
(* j (- (* a c) (* y i))))
(+
(* j (- (* a c) (* y i)))
(-
(* x (- (* y z) (* t a)))
(* (sqrt b) (* (- (* z c) (* t i)) (sqrt b))))))))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 tmp;
if ((b <= -4.8212496187944244e+32)) {
tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (b * ((double) (((double) (z * c)) - ((double) (t * i)))))))) + ((double) (((double) (((double) cbrt(j)) * ((double) cbrt(j)))) * ((double) (((double) cbrt(j)) * ((double) (((double) (a * c)) - ((double) (y * i))))))))));
} else {
double tmp_1;
if ((b <= 1.2070106218244255e-84)) {
tmp_1 = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (((double) (z * ((double) (b * c)))) - ((double) (i * ((double) (b * t)))))))) + ((double) (j * ((double) (((double) (a * c)) - ((double) (y * i))))))));
} else {
tmp_1 = ((double) (((double) (j * ((double) (((double) (a * c)) - ((double) (y * i)))))) + ((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (((double) sqrt(b)) * ((double) (((double) (((double) (z * c)) - ((double) (t * i)))) * ((double) sqrt(b))))))))));
}
tmp = tmp_1;
}
return tmp;
}




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.6 |
| Herbie | 9.5 |
if b < -4.821249618794424e32Initial program 6.9
rmApplied add-cube-cbrt_binary647.1
Applied associate-*l*_binary647.1
Simplified7.1
if -4.821249618794424e32 < b < 1.20701062182442546e-84Initial program 15.8
rmApplied sub-neg_binary6415.8
Applied distribute-lft-in_binary6415.8
rmApplied associate-*r*_binary6413.4
rmApplied distribute-lft-neg-in_binary6413.4
Applied associate-*r*_binary6410.7
if 1.20701062182442546e-84 < b Initial program 8.4
rmApplied add-sqr-sqrt_binary648.5
Applied associate-*l*_binary648.5
Simplified8.5
Final simplification9.5
herbie shell --seed 2020205
(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)))))