\frac{x \cdot y - z \cdot t}{a}\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot t \leq -\infty:\\
\;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)\right) \cdot \frac{\sqrt[3]{y}}{a} - z \cdot \frac{t}{a}\\
\mathbf{elif}\;x \cdot y - z \cdot t \leq 6.724941789042702 \cdot 10^{+303}:\\
\;\;\;\;\frac{x \cdot y - z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{a} - \frac{z}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{t}{\sqrt[3]{a}}\\
\end{array}(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* z t)) a))
(FPCore (x y z t a)
:precision binary64
(if (<= (- (* x y) (* z t)) (- INFINITY))
(- (* (* x (* (cbrt y) (cbrt y))) (/ (cbrt y) a)) (* z (/ t a)))
(if (<= (- (* x y) (* z t)) 6.724941789042702e+303)
(/ (- (* x y) (* z t)) a)
(- (* x (/ y a)) (* (/ z (* (cbrt a) (cbrt a))) (/ t (cbrt a)))))))double code(double x, double y, double z, double t, double a) {
return (((double) (((double) (x * y)) - ((double) (z * t)))) / a);
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((double) (((double) (x * y)) - ((double) (z * t)))) <= ((double) -(((double) INFINITY))))) {
tmp = ((double) (((double) (((double) (x * ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * (((double) cbrt(y)) / a))) - ((double) (z * (t / a)))));
} else {
double tmp_1;
if ((((double) (((double) (x * y)) - ((double) (z * t)))) <= 6.724941789042702e+303)) {
tmp_1 = (((double) (((double) (x * y)) - ((double) (z * t)))) / a);
} else {
tmp_1 = ((double) (((double) (x * (y / a))) - ((double) ((z / ((double) (((double) cbrt(a)) * ((double) cbrt(a))))) * (t / ((double) cbrt(a)))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.6 |
|---|---|
| Target | 6.2 |
| Herbie | 1.8 |
if (- (* x y) (* z t)) < -inf.0Initial program Error: 64.0 bits
rmApplied div-subError: 64.0 bits
SimplifiedError: 32.3 bits
SimplifiedError: 0.2 bits
rmApplied *-un-lft-identityError: 0.2 bits
Applied add-cube-cbrtError: 0.8 bits
Applied times-fracError: 0.8 bits
Applied associate-*r*Error: 18.8 bits
SimplifiedError: 18.8 bits
if -inf.0 < (- (* x y) (* z t)) < 6.7249417890427016e303Initial program Error: 0.9 bits
if 6.7249417890427016e303 < (- (* x y) (* z t)) Initial program Error: 62.1 bits
rmApplied div-subError: 62.1 bits
SimplifiedError: 33.4 bits
SimplifiedError: 0.3 bits
rmApplied add-cube-cbrtError: 0.8 bits
Applied *-un-lft-identityError: 0.8 bits
Applied times-fracError: 0.8 bits
Applied associate-*r*Error: 0.8 bits
SimplifiedError: 0.8 bits
Final simplificationError: 1.8 bits
herbie shell --seed 2020204
(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))