\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}\;b \le -2.43573431022587006539678668819771121502 \cdot 10^{-55}:\\
\;\;\;\;\left(\left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(a \cdot \left(j \cdot c\right) + \left(-y\right) \cdot \left(i \cdot j\right)\right)\\
\mathbf{elif}\;b \le -3.247942119715740045247268518672381664306 \cdot 10^{-183}:\\
\;\;\;\;\left(\left(\left(-t \cdot \left(x \cdot a\right)\right) + x \cdot \left(z \cdot y\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;b \le -1.795486041934680815088450859297908251741 \cdot 10^{-305}:\\
\;\;\;\;\left(a \cdot \left(j \cdot c\right) + \left(-y\right) \cdot \left(i \cdot j\right)\right) + \left(x \cdot \left(z \cdot y\right) + \left(-a \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \le 2.370330019284661706130848263045197366618 \cdot 10^{-276}:\\
\;\;\;\;j \cdot \left(c \cdot a - y \cdot i\right) + x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{elif}\;b \le 40241249613545970408093533024125341138940:\\
\;\;\;\;\left(\left(x \cdot \left(z \cdot y\right) + \left(-a \cdot \left(x \cdot t\right)\right)\right) - \left(z \cdot \left(b \cdot c\right) + \left(-t \cdot i\right) \cdot b\right)\right) + \left(a \cdot \left(j \cdot c\right) + \left(-y\right) \cdot \left(i \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot z\right) \cdot y + \left(-a \cdot \left(x \cdot t\right)\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(a \cdot \left(j \cdot c\right) + \left(-y \cdot i\right) \cdot j\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r595429 = x;
double r595430 = y;
double r595431 = z;
double r595432 = r595430 * r595431;
double r595433 = t;
double r595434 = a;
double r595435 = r595433 * r595434;
double r595436 = r595432 - r595435;
double r595437 = r595429 * r595436;
double r595438 = b;
double r595439 = c;
double r595440 = r595439 * r595431;
double r595441 = i;
double r595442 = r595433 * r595441;
double r595443 = r595440 - r595442;
double r595444 = r595438 * r595443;
double r595445 = r595437 - r595444;
double r595446 = j;
double r595447 = r595439 * r595434;
double r595448 = r595430 * r595441;
double r595449 = r595447 - r595448;
double r595450 = r595446 * r595449;
double r595451 = r595445 + r595450;
return r595451;
}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r595452 = b;
double r595453 = -2.43573431022587e-55;
bool r595454 = r595452 <= r595453;
double r595455 = x;
double r595456 = z;
double r595457 = r595455 * r595456;
double r595458 = y;
double r595459 = r595457 * r595458;
double r595460 = a;
double r595461 = t;
double r595462 = r595455 * r595461;
double r595463 = r595460 * r595462;
double r595464 = -r595463;
double r595465 = r595459 + r595464;
double r595466 = c;
double r595467 = r595466 * r595456;
double r595468 = i;
double r595469 = r595461 * r595468;
double r595470 = r595467 - r595469;
double r595471 = r595452 * r595470;
double r595472 = r595465 - r595471;
double r595473 = j;
double r595474 = r595473 * r595466;
double r595475 = r595460 * r595474;
double r595476 = -r595458;
double r595477 = r595468 * r595473;
double r595478 = r595476 * r595477;
double r595479 = r595475 + r595478;
double r595480 = r595472 + r595479;
double r595481 = -3.24794211971574e-183;
bool r595482 = r595452 <= r595481;
double r595483 = r595455 * r595460;
double r595484 = r595461 * r595483;
double r595485 = -r595484;
double r595486 = r595456 * r595458;
double r595487 = r595455 * r595486;
double r595488 = r595485 + r595487;
double r595489 = r595488 - r595471;
double r595490 = r595466 * r595460;
double r595491 = r595458 * r595468;
double r595492 = r595490 - r595491;
double r595493 = r595473 * r595492;
double r595494 = r595489 + r595493;
double r595495 = -1.7954860419346808e-305;
bool r595496 = r595452 <= r595495;
double r595497 = r595487 + r595464;
double r595498 = r595479 + r595497;
double r595499 = 2.3703300192846617e-276;
bool r595500 = r595452 <= r595499;
double r595501 = r595458 * r595456;
double r595502 = r595461 * r595460;
double r595503 = r595501 - r595502;
double r595504 = r595455 * r595503;
double r595505 = r595493 + r595504;
double r595506 = 4.024124961354597e+40;
bool r595507 = r595452 <= r595506;
double r595508 = r595452 * r595466;
double r595509 = r595456 * r595508;
double r595510 = -r595469;
double r595511 = r595510 * r595452;
double r595512 = r595509 + r595511;
double r595513 = r595497 - r595512;
double r595514 = r595513 + r595479;
double r595515 = -r595491;
double r595516 = r595515 * r595473;
double r595517 = r595475 + r595516;
double r595518 = r595472 + r595517;
double r595519 = r595507 ? r595514 : r595518;
double r595520 = r595500 ? r595505 : r595519;
double r595521 = r595496 ? r595498 : r595520;
double r595522 = r595482 ? r595494 : r595521;
double r595523 = r595454 ? r595480 : r595522;
return r595523;
}




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 | 19.7 |
| Herbie | 11.0 |
if b < -2.43573431022587e-55Initial program 8.6
rmApplied sub-neg8.6
Applied distribute-lft-in8.6
Simplified8.6
Simplified8.9
rmApplied sub-neg8.9
Applied distribute-lft-in8.9
Simplified8.4
Simplified8.4
rmApplied distribute-lft-neg-in8.4
Applied associate-*l*8.2
rmApplied associate-*r*7.6
if -2.43573431022587e-55 < b < -3.24794211971574e-183Initial program 14.6
rmApplied sub-neg14.6
Applied distribute-lft-in14.6
Simplified14.6
Simplified15.3
rmApplied *-un-lft-identity15.3
Applied associate-*l*15.3
Simplified14.6
if -3.24794211971574e-183 < b < -1.7954860419346808e-305Initial program 16.6
rmApplied sub-neg16.6
Applied distribute-lft-in16.6
Simplified16.6
Simplified16.7
rmApplied sub-neg16.7
Applied distribute-lft-in16.7
Simplified15.9
Simplified15.9
rmApplied distribute-lft-neg-in15.9
Applied associate-*l*16.5
Taylor expanded around 0 17.3
if -1.7954860419346808e-305 < b < 2.3703300192846617e-276Initial program 20.5
Taylor expanded around 0 16.1
if 2.3703300192846617e-276 < b < 4.024124961354597e+40Initial program 13.7
rmApplied sub-neg13.7
Applied distribute-lft-in13.7
Simplified13.7
Simplified13.8
rmApplied sub-neg13.8
Applied distribute-lft-in13.8
Simplified13.7
Simplified13.7
rmApplied distribute-lft-neg-in13.7
Applied associate-*l*13.0
rmApplied sub-neg13.0
Applied distribute-lft-in13.0
Simplified11.0
Simplified11.0
if 4.024124961354597e+40 < b Initial program 7.1
rmApplied sub-neg7.1
Applied distribute-lft-in7.1
Simplified7.1
Simplified7.0
rmApplied sub-neg7.0
Applied distribute-lft-in7.0
Simplified6.9
Simplified6.9
rmApplied associate-*r*6.9
Final simplification11.0
herbie shell --seed 2019325
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:herbie-target
(if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* 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) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))