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







Bits error versus x







Bits error versus y
Results
| Alternative 1 | |
|---|---|
| Error | 14.5 |
| Cost | 712 |
| Alternative 2 | |
|---|---|
| Error | 21.1 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 61.3 |
| Cost | 64 |
| Alternative 4 | |
|---|---|
| Error | 61.7 |
| Cost | 64 |

Initial program 0.1
rmApplied sub-neg_binary64_17760.1
Applied distribute-rgt-in_binary64_17330.1
Simplified0.1
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021044
(FPCore (x y)
:name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
:precision binary64
(* x (- 1.0 (* x y))))