\frac{x0}{1 - x1} - x0\frac{x0 \cdot \frac{\frac{{\left(\frac{{x0}^{3}}{\log \left(e^{{\left(1 - x1\right)}^{6}}\right)}\right)}^{3} - {\left({x0}^{3}\right)}^{3}}{\frac{{x0}^{6}}{{\left(1 - x1\right)}^{12}} + \left({x0}^{6} + {\left(\frac{x0}{1 - x1}\right)}^{6}\right)}}{x0 \cdot x0 + \frac{x0}{1 - x1} \cdot \left(\frac{x0}{1 - x1} + \frac{x0}{{\left(1 - x1\right)}^{3}}\right)}}{x0 + \frac{x0}{1 - x1}}(FPCore (x0 x1) :precision binary64 (- (/ x0 (- 1.0 x1)) x0))
(FPCore (x0 x1)
:precision binary64
(/
(*
x0
(/
(/
(-
(pow (/ (pow x0 3.0) (log (exp (pow (- 1.0 x1) 6.0)))) 3.0)
(pow (pow x0 3.0) 3.0))
(+
(/ (pow x0 6.0) (pow (- 1.0 x1) 12.0))
(+ (pow x0 6.0) (pow (/ x0 (- 1.0 x1)) 6.0))))
(+
(* x0 x0)
(* (/ x0 (- 1.0 x1)) (+ (/ x0 (- 1.0 x1)) (/ x0 (pow (- 1.0 x1) 3.0)))))))
(+ x0 (/ x0 (- 1.0 x1)))))double code(double x0, double x1) {
return (x0 / (1.0 - x1)) - x0;
}
double code(double x0, double x1) {
return (x0 * (((pow((pow(x0, 3.0) / log(exp(pow((1.0 - x1), 6.0)))), 3.0) - pow(pow(x0, 3.0), 3.0)) / ((pow(x0, 6.0) / pow((1.0 - x1), 12.0)) + (pow(x0, 6.0) + pow((x0 / (1.0 - x1)), 6.0)))) / ((x0 * x0) + ((x0 / (1.0 - x1)) * ((x0 / (1.0 - x1)) + (x0 / pow((1.0 - x1), 3.0))))))) / (x0 + (x0 / (1.0 - x1)));
}












Bits error versus x0












Bits error versus x1
Results
| Original | 8.4 |
|---|---|
| Target | 0.5 |
| Herbie | 4.5 |
| Alternative 1 | |
|---|---|
| Accuracy | 4.9 |
| Cost | 5120 |
| Alternative 2 | |
|---|---|
| Accuracy | 3.9 |
| Cost | 5889 |
| Alternative 3 | |
|---|---|
| Accuracy | 3.9 |
| Cost | 5505 |
| Alternative 4 | |
|---|---|
| Accuracy | 3.9 |
| Cost | 5441 |
| Alternative 5 | |
|---|---|
| Accuracy | 4.0 |
| Cost | 6081 |
| Alternative 6 | |
|---|---|
| Accuracy | 4.0 |
| Cost | 5441 |
| Alternative 7 | |
|---|---|
| Accuracy | 5.5 |
| Cost | 5120 |
| Alternative 8 | |
|---|---|
| Accuracy | 7.3 |
| Cost | 4160 |
Initial program 8.4
rmApplied flip--_binary64_24407.7
Simplified6.9
Simplified6.9
rmApplied flip3--_binary64_24696.1
Simplified6.1
Simplified6.1
rmApplied flip3--_binary64_24695.3
Simplified5.2
rmApplied add-log-exp_binary64_25044.5
Final simplification4.5
herbie shell --seed 2020322
(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))