\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 r833571 = x;
double r833572 = y;
double r833573 = r833571 * r833572;
double r833574 = z;
double r833575 = t;
double r833576 = r833574 * r833575;
double r833577 = r833573 - r833576;
double r833578 = a;
double r833579 = r833577 / r833578;
return r833579;
}
double f(double x, double y, double z, double t, double a) {
double r833580 = x;
double r833581 = y;
double r833582 = r833580 * r833581;
double r833583 = z;
double r833584 = t;
double r833585 = r833583 * r833584;
double r833586 = r833582 - r833585;
double r833587 = a;
double r833588 = r833586 / r833587;
return r833588;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.5 |
|---|---|
| Target | 5.8 |
| Herbie | 7.5 |
Initial program 7.5
rmApplied clear-num7.7
rmApplied *-un-lft-identity7.7
Applied *-un-lft-identity7.7
Applied times-frac7.7
Applied add-cube-cbrt7.7
Applied times-frac7.7
Simplified7.7
Simplified7.5
Final simplification7.5
herbie shell --seed 2020045
(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))