\frac{x \cdot y - z \cdot t}{a}\frac{x \cdot y - z \cdot t}{a}double f(double x, double y, double z, double t, double a) {
double r476065 = x;
double r476066 = y;
double r476067 = r476065 * r476066;
double r476068 = z;
double r476069 = t;
double r476070 = r476068 * r476069;
double r476071 = r476067 - r476070;
double r476072 = a;
double r476073 = r476071 / r476072;
return r476073;
}
double f(double x, double y, double z, double t, double a) {
double r476074 = x;
double r476075 = y;
double r476076 = r476074 * r476075;
double r476077 = z;
double r476078 = t;
double r476079 = r476077 * r476078;
double r476080 = r476076 - r476079;
double r476081 = a;
double r476082 = r476080 / r476081;
return r476082;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 8.0 |
|---|---|
| Target | 6.2 |
| Herbie | 8.0 |
Initial program 8.0
rmApplied clear-num8.3
rmApplied *-un-lft-identity8.3
Applied *-un-lft-identity8.3
Applied times-frac8.3
Applied add-cube-cbrt8.3
Applied times-frac8.3
Simplified8.3
Simplified8.0
Final simplification8.0
herbie shell --seed 2019304 +o rules:numerics
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.46868496869954822e170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.30983112197837121e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))