\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 r811952 = x;
double r811953 = y;
double r811954 = r811952 * r811953;
double r811955 = z;
double r811956 = t;
double r811957 = r811955 * r811956;
double r811958 = r811954 - r811957;
double r811959 = a;
double r811960 = r811958 / r811959;
return r811960;
}
double f(double x, double y, double z, double t, double a) {
double r811961 = x;
double r811962 = y;
double r811963 = r811961 * r811962;
double r811964 = z;
double r811965 = t;
double r811966 = r811964 * r811965;
double r811967 = r811963 - r811966;
double r811968 = -3.7887815466672965e+207;
bool r811969 = r811967 <= r811968;
double r811970 = -7.184454030855425e-77;
bool r811971 = r811967 <= r811970;
double r811972 = 0.0;
bool r811973 = r811967 <= r811972;
double r811974 = 6.902976578749531e+274;
bool r811975 = r811967 <= r811974;
double r811976 = !r811975;
bool r811977 = r811973 || r811976;
double r811978 = !r811977;
bool r811979 = r811971 || r811978;
double r811980 = !r811979;
bool r811981 = r811969 || r811980;
double r811982 = a;
double r811983 = r811962 / r811982;
double r811984 = r811961 * r811983;
double r811985 = r811982 / r811964;
double r811986 = r811965 / r811985;
double r811987 = r811984 - r811986;
double r811988 = r811963 / r811982;
double r811989 = r811965 * r811964;
double r811990 = r811989 / r811982;
double r811991 = r811988 - r811990;
double r811992 = r811981 ? r811987 : r811991;
return r811992;
}




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
rmApplied *-un-lft-identity5.8
Applied *-un-lft-identity5.8
Applied distribute-lft-out--5.8
Simplified0.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))