\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 \le 2.1690370237060838 \cdot 10^{98}:\\
\;\;\;\;\left(\left(\left(x \cdot y\right) \cdot z + {\left(-1 \cdot \left(a \cdot \left(x \cdot t\right)\right)\right)}^{1}\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(\sqrt[3]{j \cdot \left(c \cdot a - y \cdot i\right)} \cdot \sqrt[3]{j \cdot \left(c \cdot a - y \cdot i\right)}\right) \cdot \sqrt[3]{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(j \cdot \left(\sqrt[3]{c \cdot a - y \cdot i} \cdot \sqrt[3]{c \cdot a - y \cdot i}\right)\right) \cdot \sqrt[3]{c \cdot a - y \cdot i}\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (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 ((x <= 2.169037023706084e+98)) {
VAR = (((((x * y) * z) + pow((-1.0 * (a * (x * t))), 1.0)) - (b * ((c * z) - (t * i)))) + ((cbrt((j * ((c * a) - (y * i)))) * cbrt((j * ((c * a) - (y * i))))) * cbrt((j * ((c * a) - (y * i))))));
} else {
VAR = (((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + ((j * (cbrt(((c * a) - (y * i))) * cbrt(((c * a) - (y * i))))) * cbrt(((c * a) - (y * i)))));
}
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 | 20.1 |
| Herbie | 11.5 |
if x < 2.169037023706084e+98Initial program 12.8
rmApplied sub-neg12.8
Applied distribute-lft-in12.8
rmApplied pow112.8
Applied pow112.8
Applied pow-prod-down12.8
Simplified12.2
rmApplied associate-*r*11.6
rmApplied add-cube-cbrt11.9
if 2.169037023706084e+98 < x Initial program 8.3
rmApplied add-cube-cbrt8.5
Applied associate-*r*8.5
Final simplification11.5
herbie shell --seed 2020078
(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)))))