\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \le -3.78878154666729648028756748998228310304 \cdot 10^{207} \lor \neg \left(x \cdot y - z \cdot t \le -7.184454030855425458741927392588250354613 \cdot 10^{-77} \lor \neg \left(x \cdot y - z \cdot t \le 0.0 \lor \neg \left(x \cdot y - z \cdot t \le 6.902976578749531265225690058079584054697 \cdot 10^{274}\right)\right)\right):\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{t}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a} - \frac{t \cdot z}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r794547 = x;
double r794548 = y;
double r794549 = r794547 * r794548;
double r794550 = z;
double r794551 = t;
double r794552 = r794550 * r794551;
double r794553 = r794549 - r794552;
double r794554 = a;
double r794555 = r794553 / r794554;
return r794555;
}
double f(double x, double y, double z, double t, double a) {
double r794556 = x;
double r794557 = y;
double r794558 = r794556 * r794557;
double r794559 = z;
double r794560 = t;
double r794561 = r794559 * r794560;
double r794562 = r794558 - r794561;
double r794563 = -3.7887815466672965e+207;
bool r794564 = r794562 <= r794563;
double r794565 = -7.184454030855425e-77;
bool r794566 = r794562 <= r794565;
double r794567 = 0.0;
bool r794568 = r794562 <= r794567;
double r794569 = 6.902976578749531e+274;
bool r794570 = r794562 <= r794569;
double r794571 = !r794570;
bool r794572 = r794568 || r794571;
double r794573 = !r794572;
bool r794574 = r794566 || r794573;
double r794575 = !r794574;
bool r794576 = r794564 || r794575;
double r794577 = a;
double r794578 = r794557 / r794577;
double r794579 = r794556 * r794578;
double r794580 = r794577 / r794559;
double r794581 = r794560 / r794580;
double r794582 = r794579 - r794581;
double r794583 = r794558 / r794577;
double r794584 = r794560 * r794559;
double r794585 = r794584 / r794577;
double r794586 = r794583 - r794585;
double r794587 = r794576 ? r794582 : r794586;
return r794587;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.8 |
|---|---|
| Target | 6.1 |
| Herbie | 0.8 |
if (- (* x y) (* z t)) < -3.7887815466672965e+207 or -7.184454030855425e-77 < (- (* x y) (* z t)) < 0.0 or 6.902976578749531e+274 < (- (* x y) (* z t)) Initial program 25.3
rmApplied div-sub25.4
Simplified25.4
rmApplied associate-/l*14.6
rmApplied *-un-lft-identity14.6
Applied times-frac1.9
Simplified1.9
if -3.7887815466672965e+207 < (- (* x y) (* z t)) < -7.184454030855425e-77 or 0.0 < (- (* x y) (* z t)) < 6.902976578749531e+274Initial program 0.5
rmApplied div-sub0.5
Simplified0.5
rmApplied associate-/l*5.8
Taylor expanded around 0 0.5
Final simplification0.8
herbie shell --seed 2020001
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))