\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}\;x \le -1.4891416355699024 \cdot 10^{-67} \lor \neg \left(x \le 9.75163448126466317 \cdot 10^{-175}\right):\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(z, y, -t \cdot a\right) \cdot x + \left(\mathsf{fma}\left(-t, a, t \cdot a\right) \cdot x - b \cdot \left(c \cdot z - i \cdot a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c \cdot t - i \cdot y, j, \mathsf{fma}\left(a, i \cdot b, -\mathsf{fma}\left(z, b \cdot c, t \cdot \left(x \cdot a\right)\right)\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 (((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (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 (((x <= -1.4891416355699024e-67) || !(x <= 9.751634481264663e-175))) {
VAR = fma(((c * t) - (i * y)), j, ((fma(z, y, -(t * a)) * x) + ((fma(-t, a, (t * a)) * x) - (b * ((c * z) - (i * a))))));
} else {
VAR = fma(((c * t) - (i * y)), j, fma(a, (i * b), -fma(z, (b * c), (t * (x * a)))));
}
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 | 11.8 |
|---|---|
| Target | 16.1 |
| Herbie | 10.9 |
if x < -1.4891416355699024e-67 or 9.751634481264663e-175 < x Initial program 9.3
Simplified9.2
rmApplied *-commutative9.2
Applied *-commutative9.2
Applied prod-diff9.2
Applied distribute-rgt-in9.2
Applied associate--l+9.2
if -1.4891416355699024e-67 < x < 9.751634481264663e-175Initial program 16.1
Simplified16.1
Taylor expanded around inf 13.8
Simplified13.8
Taylor expanded around inf 13.7
Simplified13.7
Final simplification10.9
herbie shell --seed 2020071 +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)))))