\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(\left(a \cdot a\right) \cdot \left(1 - a\right) + \left(b \cdot b\right) \cdot \left(3 + a\right)\right)\right) - 1\left({b}^{4} + \left(\left(b \cdot b\right) \cdot 12 + \left({a}^{4} + a \cdot \left(4 \cdot \left(a - a \cdot a\right)\right)\right)\right)\right) - 1(FPCore (a b) :precision binary64 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ 3.0 a))))) 1.0))
(FPCore (a b) :precision binary64 (- (+ (pow b 4.0) (+ (* (* b b) 12.0) (+ (pow a 4.0) (* a (* 4.0 (- a (* a a))))))) 1.0))
double code(double a, double b) {
return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (((a * a) * (1.0 - a)) + ((b * b) * (3.0 + a))))) - 1.0;
}
double code(double a, double b) {
return (pow(b, 4.0) + (((b * b) * 12.0) + (pow(a, 4.0) + (a * (4.0 * (a - (a * a))))))) - 1.0;
}












Bits error versus a












Bits error versus b
Results
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 2240 |
| Alternative 2 | |
|---|---|
| Error | 2.3 |
| Cost | 2184 |
| Alternative 3 | |
|---|---|
| Error | 2.4 |
| Cost | 1928 |
| Alternative 4 | |
|---|---|
| Error | 2.7 |
| Cost | 1416 |
| Alternative 5 | |
|---|---|
| Error | 12.5 |
| Cost | 960 |
| Alternative 6 | |
|---|---|
| Error | 12.5 |
| Cost | 960 |
| Alternative 7 | |
|---|---|
| Error | 12.5 |
| Cost | 704 |
| Alternative 8 | |
|---|---|
| Error | 13.5 |
| Cost | 576 |
| Alternative 9 | |
|---|---|
| Error | 24.0 |
| Cost | 64 |

Initial program 0.2
Taylor expanded around 0 0.0
Simplified0.0
Taylor expanded around 0 0.4
Simplified0.4
rmApplied unpow3_binary64_32130.4
Applied distribute-rgt-out--_binary64_31010.4
Applied associate-*l*_binary64_30880.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021042
(FPCore (a b)
:name "Bouland and Aaronson, Equation (24)"
:precision binary64
(- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (+ (* (* a a) (- 1.0 a)) (* (* b b) (+ 3.0 a))))) 1.0))