\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}\;\left(i \le -2.079426442203953165914746046308740028089 \cdot 10^{80} \lor i \le -1.439590553357621205743260829622743759452 \cdot 10^{-119}\right) \lor \left(i \le -3.639434921777483705099275009427059968093 \cdot 10^{-234} \lor i \le -1.603394320863634609170070211543361553855 \cdot 10^{-282}\right):\\
\;\;\;\;\left(j \cdot \left(c \cdot a - y \cdot i\right) + x \cdot \left(y \cdot z - t \cdot a\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(c \cdot a - y \cdot i\right) + x \cdot \left(y \cdot z - t \cdot a\right)\right) - b \cdot \left(c \cdot z - t \cdot i\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r629140 = x;
double r629141 = y;
double r629142 = z;
double r629143 = r629141 * r629142;
double r629144 = t;
double r629145 = a;
double r629146 = r629144 * r629145;
double r629147 = r629143 - r629146;
double r629148 = r629140 * r629147;
double r629149 = b;
double r629150 = c;
double r629151 = r629150 * r629142;
double r629152 = i;
double r629153 = r629144 * r629152;
double r629154 = r629151 - r629153;
double r629155 = r629149 * r629154;
double r629156 = r629148 - r629155;
double r629157 = j;
double r629158 = r629150 * r629145;
double r629159 = r629141 * r629152;
double r629160 = r629158 - r629159;
double r629161 = r629157 * r629160;
double r629162 = r629156 + r629161;
return r629162;
}
double f(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double r629163 = i;
double r629164 = -2.0794264422039532e+80;
bool r629165 = r629163 <= r629164;
double r629166 = -1.4395905533576212e-119;
bool r629167 = r629163 <= r629166;
bool r629168 = r629165 || r629167;
double r629169 = -3.6394349217774837e-234;
bool r629170 = r629163 <= r629169;
double r629171 = -1.6033943208636346e-282;
bool r629172 = r629163 <= r629171;
bool r629173 = r629170 || r629172;
bool r629174 = r629168 || r629173;
double r629175 = j;
double r629176 = c;
double r629177 = a;
double r629178 = r629176 * r629177;
double r629179 = y;
double r629180 = r629179 * r629163;
double r629181 = r629178 - r629180;
double r629182 = r629175 * r629181;
double r629183 = x;
double r629184 = z;
double r629185 = r629179 * r629184;
double r629186 = t;
double r629187 = r629186 * r629177;
double r629188 = r629185 - r629187;
double r629189 = r629183 * r629188;
double r629190 = r629182 + r629189;
double r629191 = b;
double r629192 = r629176 * r629184;
double r629193 = r629186 * r629163;
double r629194 = r629192 - r629193;
double r629195 = r629191 * r629194;
double r629196 = r629190 - r629195;
double r629197 = r629174 ? r629196 : r629196;
return r629197;
}




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.0 |
|---|---|
| Target | 19.6 |
| Herbie | 12.0 |
if i < -2.0794264422039532e+80Initial program 18.8
rmApplied sub-neg18.8
Applied distribute-lft-in18.8
Simplified19.0
rmApplied associate-*r*19.1
rmApplied sub-neg19.1
Applied distribute-rgt-in19.1
Simplified18.4
Simplified19.3
if -2.0794264422039532e+80 < i < -1.4395905533576212e-119 or 4.963520937120174e-177 < i < 2.530556207066626e-42Initial program 9.4
rmApplied sub-neg9.4
Applied distribute-lft-in9.4
Simplified9.8
rmApplied sub-neg9.8
Applied distribute-rgt-in9.8
Simplified10.4
Simplified10.5
if -1.4395905533576212e-119 < i < -3.6394349217774837e-234Initial program 8.3
rmApplied sub-neg8.3
Applied distribute-rgt-in8.3
Simplified8.3
if -3.6394349217774837e-234 < i < -1.6033943208636346e-282 or 9.66752343858949e-219 < i < 4.963520937120174e-177Initial program 9.5
rmApplied sub-neg9.5
Applied distribute-lft-in9.5
Simplified9.7
rmApplied associate-*r*9.2
rmApplied add-cube-cbrt9.4
if -1.6033943208636346e-282 < i < 9.66752343858949e-219 or 2.530556207066626e-42 < i Initial program 13.6
rmApplied sub-neg13.6
Applied distribute-lft-in13.6
Simplified12.7
Final simplification12.0
herbie shell --seed 2019291
(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.46969429677770502e-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)))))