\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}\;j \le -7.426419963249853361219422223192527763444 \cdot 10^{76}:\\
\;\;\;\;\left(a \cdot c - i \cdot y\right) \cdot j + \left(\sqrt[3]{\mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(z \cdot y - t \cdot a\right) \cdot x\right)} \cdot \sqrt[3]{\mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(z \cdot y - t \cdot a\right) \cdot x\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(z \cdot y - t \cdot a\right) \cdot x\right)}\\
\mathbf{elif}\;j \le 1.613592276650847279046100377055682446527 \cdot 10^{-83}:\\
\;\;\;\;\mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(z \cdot y - t \cdot a\right) \cdot x\right) + \left(a \cdot \left(c \cdot j\right) - i \cdot \left(j \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(z \cdot y - t \cdot a\right) \cdot x\right) + \left(\sqrt[3]{\sqrt[3]{j} \cdot \sqrt[3]{j}} \cdot \left(\left(\sqrt[3]{j} \cdot \sqrt[3]{j}\right) \cdot \left(a \cdot c - i \cdot y\right)\right)\right) \cdot \sqrt[3]{\sqrt[3]{j}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r38588187 = x;
double r38588188 = y;
double r38588189 = z;
double r38588190 = r38588188 * r38588189;
double r38588191 = t;
double r38588192 = a;
double r38588193 = r38588191 * r38588192;
double r38588194 = r38588190 - r38588193;
double r38588195 = r38588187 * r38588194;
double r38588196 = b;
double r38588197 = c;
double r38588198 = r38588197 * r38588189;
double r38588199 = i;
double r38588200 = r38588191 * r38588199;
double r38588201 = r38588198 - r38588200;
double r38588202 = r38588196 * r38588201;
double r38588203 = r38588195 - r38588202;
double r38588204 = j;
double r38588205 = r38588197 * r38588192;
double r38588206 = r38588188 * r38588199;
double r38588207 = r38588205 - r38588206;
double r38588208 = r38588204 * r38588207;
double r38588209 = r38588203 + r38588208;
return r38588209;
}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r38588210 = j;
double r38588211 = -7.426419963249853e+76;
bool r38588212 = r38588210 <= r38588211;
double r38588213 = a;
double r38588214 = c;
double r38588215 = r38588213 * r38588214;
double r38588216 = i;
double r38588217 = y;
double r38588218 = r38588216 * r38588217;
double r38588219 = r38588215 - r38588218;
double r38588220 = r38588219 * r38588210;
double r38588221 = b;
double r38588222 = t;
double r38588223 = r38588222 * r38588216;
double r38588224 = z;
double r38588225 = r38588224 * r38588214;
double r38588226 = r38588223 - r38588225;
double r38588227 = r38588224 * r38588217;
double r38588228 = r38588222 * r38588213;
double r38588229 = r38588227 - r38588228;
double r38588230 = x;
double r38588231 = r38588229 * r38588230;
double r38588232 = fma(r38588221, r38588226, r38588231);
double r38588233 = cbrt(r38588232);
double r38588234 = r38588233 * r38588233;
double r38588235 = r38588234 * r38588233;
double r38588236 = r38588220 + r38588235;
double r38588237 = 1.6135922766508473e-83;
bool r38588238 = r38588210 <= r38588237;
double r38588239 = r38588214 * r38588210;
double r38588240 = r38588213 * r38588239;
double r38588241 = r38588210 * r38588217;
double r38588242 = r38588216 * r38588241;
double r38588243 = r38588240 - r38588242;
double r38588244 = r38588232 + r38588243;
double r38588245 = cbrt(r38588210);
double r38588246 = r38588245 * r38588245;
double r38588247 = cbrt(r38588246);
double r38588248 = r38588246 * r38588219;
double r38588249 = r38588247 * r38588248;
double r38588250 = cbrt(r38588245);
double r38588251 = r38588249 * r38588250;
double r38588252 = r38588232 + r38588251;
double r38588253 = r38588238 ? r38588244 : r38588252;
double r38588254 = r38588212 ? r38588236 : r38588253;
return r38588254;
}




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
| Original | 12.3 |
|---|---|
| Target | 20.2 |
| Herbie | 9.8 |
if j < -7.426419963249853e+76Initial program 7.8
Simplified7.8
rmApplied fma-udef7.8
rmApplied add-cube-cbrt8.2
if -7.426419963249853e+76 < j < 1.6135922766508473e-83Initial program 15.3
Simplified15.3
rmApplied fma-udef15.3
rmApplied add-cube-cbrt15.5
Applied associate-*r*15.5
Taylor expanded around inf 10.8
if 1.6135922766508473e-83 < j Initial program 7.9
Simplified7.9
rmApplied fma-udef7.9
rmApplied add-cube-cbrt8.3
Applied associate-*r*8.3
rmApplied add-cube-cbrt8.3
Applied cbrt-prod8.4
Applied associate-*r*8.4
Final simplification9.8
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
: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)))))