\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}\;x \leq -1.111560812378541 \cdot 10^{+131}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\right) + \sqrt[3]{a \cdot c - y \cdot i} \cdot \left(j \cdot \left(\sqrt[3]{a \cdot c - y \cdot i} \cdot \sqrt[3]{a \cdot c - y \cdot i}\right)\right)\\
\mathbf{elif}\;x \leq 6.812278623510992 \cdot 10^{-211}:\\
\;\;\;\;\left(\left(y \cdot \left(x \cdot z\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 - t \cdot a\right) + \left(t \cdot \left(b \cdot i\right) - c \cdot \left(z \cdot b\right)\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 (<= x -1.111560812378541e+131)
(+
(+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c))))
(*
(cbrt (- (* a c) (* y i)))
(* j (* (cbrt (- (* a c) (* y i))) (cbrt (- (* a c) (* y i)))))))
(if (<= x 6.812278623510992e-211)
(+
(+ (- (* y (* x z)) (* a (* x t))) (* b (- (* t i) (* z c))))
(* j (- (* a c) (* y i))))
(+
(* j (- (* a c) (* y i)))
(+ (* x (- (* y z) (* t a))) (- (* t (* b i)) (* c (* z 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 ((x <= -1.111560812378541e+131)) {
tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (b * ((double) (((double) (t * i)) - ((double) (z * c)))))))) + ((double) (((double) cbrt(((double) (((double) (a * c)) - ((double) (y * i)))))) * ((double) (j * ((double) (((double) cbrt(((double) (((double) (a * c)) - ((double) (y * i)))))) * ((double) cbrt(((double) (((double) (a * c)) - ((double) (y * i))))))))))))));
} else {
double tmp_1;
if ((x <= 6.812278623510992e-211)) {
tmp_1 = ((double) (((double) (((double) (((double) (y * ((double) (x * z)))) - ((double) (a * ((double) (x * t)))))) + ((double) (b * ((double) (((double) (t * i)) - ((double) (z * c)))))))) + ((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) (t * ((double) (b * i)))) - ((double) (c * ((double) (z * 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.1 |
|---|---|
| Target | 19.5 |
| Herbie | 10.2 |
if x < -1.111560812378541e131Initial program Error: 6.3 bits
rmApplied add-cube-cbrtError: 6.5 bits
Applied associate-*r*Error: 6.6 bits
if -1.111560812378541e131 < x < 6.81227862351099209e-211Initial program Error: 14.2 bits
rmApplied sub-negError: 14.2 bits
Applied distribute-lft-inError: 14.2 bits
SimplifiedError: 12.5 bits
SimplifiedError: 10.4 bits
if 6.81227862351099209e-211 < x Initial program Error: 10.8 bits
rmApplied sub-negError: 10.8 bits
Applied distribute-lft-inError: 10.8 bits
SimplifiedError: 11.0 bits
SimplifiedError: 10.9 bits
Final simplificationError: 10.2 bits
herbie shell --seed 2020203
(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)))))