\frac{x0}{1 - x1} - x0\frac{x0 \cdot \log \left(e^{\frac{x0}{1 + x1 \cdot \left(x1 - 2\right)} - x0}\right)}{x0 + \frac{1}{\frac{1 - x1}{x0}}}double code(double x0, double x1) {
return ((double) (((double) (x0 / ((double) (1.0 - x1)))) - x0));
}
double code(double x0, double x1) {
return ((double) (((double) (x0 * ((double) log(((double) exp(((double) (((double) (x0 / ((double) (1.0 + ((double) (x1 * ((double) (x1 - 2.0)))))))) - x0)))))))) / ((double) (x0 + ((double) (1.0 / ((double) (((double) (1.0 - x1)) / x0))))))));
}




Bits error versus x0




Bits error versus x1
Results
| Original | 8.4 |
|---|---|
| Target | 0.5 |
| Herbie | 4.4 |
Initial program 8.4
rmApplied flip--7.7
Simplified6.9
Simplified6.9
Taylor expanded around 0 7.1
Simplified5.9
rmApplied add-log-exp5.9
Applied add-log-exp5.9
Applied diff-log6.4
Simplified4.9
rmApplied clear-num4.4
Final simplification4.4
herbie shell --seed 2020184
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:precision binary64
:pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))
:herbie-target
(/ (* x0 x1) (- 1.0 x1))
(- (/ x0 (- 1.0 x1)) x0))