\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 -7.98155654580347545345036736346737136654 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot c - i \cdot y, j, \mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(\left(\sqrt[3]{z \cdot y - t \cdot a} \cdot \sqrt[3]{z \cdot y - t \cdot a}\right) \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{z \cdot y - t \cdot a}\right)\right) \cdot \sqrt[3]{x}\right)\right)\\
\mathbf{elif}\;x \le 4.340999817937329746967166771511970045509 \cdot 10^{-204}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot c - i \cdot y, j, \mathsf{fma}\left(b, t \cdot i - z \cdot c, 0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot c - i \cdot y, j, \mathsf{fma}\left(b, t \cdot i - z \cdot c, \left(\left(\sqrt[3]{z \cdot y - t \cdot a} \cdot \sqrt[3]{z \cdot y - t \cdot a}\right) \cdot \left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{z \cdot y - t \cdot a}\right)\right) \cdot \sqrt[3]{x}\right)\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r26176268 = x;
double r26176269 = y;
double r26176270 = z;
double r26176271 = r26176269 * r26176270;
double r26176272 = t;
double r26176273 = a;
double r26176274 = r26176272 * r26176273;
double r26176275 = r26176271 - r26176274;
double r26176276 = r26176268 * r26176275;
double r26176277 = b;
double r26176278 = c;
double r26176279 = r26176278 * r26176270;
double r26176280 = i;
double r26176281 = r26176272 * r26176280;
double r26176282 = r26176279 - r26176281;
double r26176283 = r26176277 * r26176282;
double r26176284 = r26176276 - r26176283;
double r26176285 = j;
double r26176286 = r26176278 * r26176273;
double r26176287 = r26176269 * r26176280;
double r26176288 = r26176286 - r26176287;
double r26176289 = r26176285 * r26176288;
double r26176290 = r26176284 + r26176289;
return r26176290;
}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r26176291 = x;
double r26176292 = -7.981556545803475e-228;
bool r26176293 = r26176291 <= r26176292;
double r26176294 = a;
double r26176295 = c;
double r26176296 = r26176294 * r26176295;
double r26176297 = i;
double r26176298 = y;
double r26176299 = r26176297 * r26176298;
double r26176300 = r26176296 - r26176299;
double r26176301 = j;
double r26176302 = b;
double r26176303 = t;
double r26176304 = r26176303 * r26176297;
double r26176305 = z;
double r26176306 = r26176305 * r26176295;
double r26176307 = r26176304 - r26176306;
double r26176308 = r26176305 * r26176298;
double r26176309 = r26176303 * r26176294;
double r26176310 = r26176308 - r26176309;
double r26176311 = cbrt(r26176310);
double r26176312 = r26176311 * r26176311;
double r26176313 = cbrt(r26176291);
double r26176314 = r26176313 * r26176313;
double r26176315 = r26176314 * r26176311;
double r26176316 = r26176312 * r26176315;
double r26176317 = r26176316 * r26176313;
double r26176318 = fma(r26176302, r26176307, r26176317);
double r26176319 = fma(r26176300, r26176301, r26176318);
double r26176320 = 4.34099981793733e-204;
bool r26176321 = r26176291 <= r26176320;
double r26176322 = 0.0;
double r26176323 = fma(r26176302, r26176307, r26176322);
double r26176324 = fma(r26176300, r26176301, r26176323);
double r26176325 = r26176321 ? r26176324 : r26176319;
double r26176326 = r26176293 ? r26176319 : r26176325;
return r26176326;
}




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 | 19.7 |
| Herbie | 12.4 |
if x < -7.981556545803475e-228 or 4.34099981793733e-204 < x Initial program 10.9
Simplified10.9
rmApplied add-cube-cbrt11.2
Applied associate-*r*11.2
rmApplied add-cube-cbrt11.3
Applied associate-*l*11.3
if -7.981556545803475e-228 < x < 4.34099981793733e-204Initial program 18.3
Simplified18.3
Taylor expanded around 0 17.0
Final simplification12.4
herbie shell --seed 2019192 +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)))))