\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\begin{array}{l}
\mathbf{if}\;c \leq -2.210704941227226 \cdot 10^{-47} \lor \neg \left(c \leq 3.620608584093998 \cdot 10^{-11}\right):\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(b \cdot \left(a \cdot i\right) - c \cdot \left(z \cdot b\right)\right)\right) + \left(c \cdot \left(t \cdot j\right) - i \cdot \left(y \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right) \cdot \left(\sqrt[3]{b} \cdot \left(a \cdot i - c \cdot z\right)\right)\right) + j \cdot \left(c \cdot t - y \cdot i\right)\\
\end{array}(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
(FPCore (x y z t a b c i j)
:precision binary64
(if (or (<= c -2.210704941227226e-47) (not (<= c 3.620608584093998e-11)))
(+
(+ (* x (- (* y z) (* t a))) (- (* b (* a i)) (* c (* z b))))
(- (* c (* t j)) (* i (* y j))))
(+
(+
(* x (- (* y z) (* t a)))
(* (* (cbrt b) (cbrt b)) (* (cbrt b) (- (* a i) (* c z)))))
(* j (- (* c t) (* y i))))))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) (i * a)))))))) + ((double) (j * ((double) (((double) (c * t)) - ((double) (i * y))))))));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (((c <= -2.210704941227226e-47) || !(c <= 3.620608584093998e-11))) {
tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (((double) (b * ((double) (a * i)))) - ((double) (c * ((double) (z * b)))))))) + ((double) (((double) (c * ((double) (t * j)))) - ((double) (i * ((double) (y * j))))))));
} else {
tmp = ((double) (((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) + ((double) (((double) (((double) cbrt(b)) * ((double) cbrt(b)))) * ((double) (((double) cbrt(b)) * ((double) (((double) (a * i)) - ((double) (c * z)))))))))) + ((double) (j * ((double) (((double) (c * t)) - ((double) (y * i))))))));
}
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 | 15.9 |
| Herbie | 9.3 |
if c < -2.21070494122722616e-47 or 3.6206085840939979e-11 < c Initial program Error: 15.4 bits
rmApplied sub-negError: 15.4 bits
Applied distribute-lft-inError: 15.4 bits
SimplifiedError: 12.3 bits
SimplifiedError: 12.3 bits
rmApplied sub-negError: 12.3 bits
Applied distribute-lft-inError: 12.3 bits
SimplifiedError: 8.8 bits
SimplifiedError: 8.8 bits
if -2.21070494122722616e-47 < c < 3.6206085840939979e-11Initial program Error: 9.5 bits
rmApplied add-cube-cbrtError: 9.8 bits
Applied associate-*l*Error: 9.8 bits
SimplifiedError: 9.8 bits
Final simplificationError: 9.3 bits
herbie shell --seed 2020204
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -8.120978919195912e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.712553818218485e-169) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (if (< t -7.633533346031584e-308) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 1.0535888557455487e-139) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))