\frac{1}{x + 1} - \frac{1}{x}\frac{\frac{-1}{x}}{x + 1}(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))
(FPCore (x) :precision binary64 (/ (/ -1.0 x) (+ x 1.0)))
double code(double x) {
return (1.0 / (x + 1.0)) - (1.0 / x);
}
double code(double x) {
return (-1.0 / x) / (x + 1.0);
}
























Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 1.1 |
| Cost | 39872 |
| Alternative 2 | |
|---|---|
| Error | 1.1 |
| Cost | 39680 |
| Alternative 3 | |
|---|---|
| Error | 14.7 |
| Cost | 21056 |
| Alternative 4 | |
|---|---|
| Error | 0.1 |
| Cost | 19904 |
| Alternative 5 | |
|---|---|
| Error | 32.3 |
| Cost | 13760 |
| Alternative 6 | |
|---|---|
| Error | 32.6 |
| Cost | 13504 |
| Alternative 7 | |
|---|---|
| Error | 32.0 |
| Cost | 13376 |
| Alternative 8 | |
|---|---|
| Error | 31.4 |
| Cost | 13312 |
| Alternative 9 | |
|---|---|
| Error | 23.4 |
| Cost | 7296 |
| Alternative 10 | |
|---|---|
| Error | 5.1 |
| Cost | 7040 |
| Alternative 11 | |
|---|---|
| Error | 32.9 |
| Cost | 7040 |
| Alternative 12 | |
|---|---|
| Error | 0.1 |
| Cost | 576 |
| Alternative 13 | |
|---|---|
| Error | 14.1 |
| Cost | 576 |
| Alternative 14 | |
|---|---|
| Error | 0.1 |
| Cost | 448 |
| Alternative 15 | |
|---|---|
| Error | 0.4 |
| Cost | 448 |
| Alternative 16 | |
|---|---|
| Error | 32.7 |
| Cost | 320 |
| Alternative 17 | |
|---|---|
| Error | 31.3 |
| Cost | 320 |
| Alternative 18 | |
|---|---|
| Error | 30.6 |
| Cost | 192 |
| Alternative 19 | |
|---|---|
| Error | 62.1 |
| Cost | 64 |
| Alternative 20 | |
|---|---|
| Error | 46.5 |
| Cost | 64 |
| Alternative 21 | |
|---|---|
| Error | 61.6 |
| Cost | 64 |

Initial program 14.1
rmApplied frac-sub_binary64_74613.5
Simplified0.4
Simplified0.4
rmApplied associate-/r*_binary64_6810.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021042
(FPCore (x)
:name "2frac (problem 3.3.1)"
:precision binary64
(- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))