x + x \cdot x
x \cdot \left(x + 1\right)
(FPCore (x) :precision binary64 (+ x (* x x)))
(FPCore (x) :precision binary64 (* x (+ x 1.0)))
double code(double x) {
return x + (x * x);
}
double code(double x) {
return x * (x + 1.0);
}





Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 1.9 |
| Cost | 520 |
| Alternative 2 | |
|---|---|
| Error | 21.3 |
| Cost | 64 |

Initial program 0.0
rmApplied add-exp-log_binary64_386725.2
rmApplied *-un-lft-identity_binary64_382925.2
Applied distribute-rgt-out_binary64_378225.2
Applied log-prod_binary64_391535.1
Applied exp-sum_binary64_387535.0
Simplified11.6
Simplified0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2021014
(FPCore (x)
:name "Main:bigenough1 from B"
:precision binary64
(+ x (* x x)))