\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}\;b \le -1.17511404340090484 \cdot 10^{28} \lor \neg \left(b \le 1.44379345493328866 \cdot 10^{106}\right):\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \left(x \cdot \left(y \cdot z\right) + x \cdot \left(-t \cdot a\right)\right) - \left(b \cdot \left(c \cdot z\right) + b \cdot \left(-i \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, x \cdot \left(y \cdot z - t \cdot a\right) - \left(\left(b \cdot z\right) \cdot c + \left(b \cdot \left(-a\right)\right) \cdot i\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) (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 VAR;
if (((b <= -1.1751140434009048e+28) || !(b <= 1.4437934549332887e+106))) {
VAR = ((double) fma(((double) (((double) (c * t)) - ((double) (i * y)))), j, ((double) (((double) (((double) (x * ((double) (y * z)))) + ((double) (x * ((double) -(((double) (t * a)))))))) - ((double) (((double) (b * ((double) (c * z)))) + ((double) (b * ((double) -(((double) (i * a))))))))))));
} else {
VAR = ((double) fma(((double) (((double) (c * t)) - ((double) (i * y)))), j, ((double) (((double) (x * ((double) (((double) (y * z)) - ((double) (t * a)))))) - ((double) (((double) (((double) (b * z)) * c)) + ((double) (((double) (b * ((double) -(a)))) * 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.1 |
|---|---|
| Target | 15.9 |
| Herbie | 9.2 |
if b < -1.1751140434009048e+28 or 1.4437934549332887e+106 < b Initial program 7.1
Simplified7.1
rmApplied sub-neg7.1
Applied distribute-lft-in7.1
rmApplied sub-neg7.1
Applied distribute-lft-in7.1
if -1.1751140434009048e+28 < b < 1.4437934549332887e+106Initial program 14.0
Simplified14.0
rmApplied sub-neg14.0
Applied distribute-lft-in14.0
rmApplied *-commutative14.0
Applied distribute-lft-neg-in14.0
Applied associate-*r*12.1
rmApplied *-commutative12.1
Applied associate-*r*10.0
Final simplification9.2
herbie shell --seed 2020114 +o rules:numerics
(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) (pow (* i y) 2))) (+ (* 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) (pow (* i y) 2))) (+ (* 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)))))