\sqrt{x \cdot x + x \cdot x}\left(\sqrt[3]{\sqrt{2}} \cdot \sqrt[3]{\sqrt{2}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{\sqrt{2}}} \cdot \left(\left|x\right| \cdot {2}^{0.1111111111111111}\right)\right)(FPCore (x) :precision binary64 (sqrt (+ (* x x) (* x x))))
(FPCore (x) :precision binary64 (* (* (cbrt (sqrt 2.0)) (cbrt (sqrt 2.0))) (* (cbrt (cbrt (sqrt 2.0))) (* (fabs x) (pow 2.0 0.1111111111111111)))))
double code(double x) {
return sqrt((x * x) + (x * x));
}
double code(double x) {
return (cbrt(sqrt(2.0)) * cbrt(sqrt(2.0))) * (cbrt(cbrt(sqrt(2.0))) * (fabs(x) * pow(2.0, 0.1111111111111111)));
}











Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 0.4 |
| Cost | 51584 |
| Alternative 2 | |
|---|---|
| Error | 0.4 |
| Cost | 45248 |
| Alternative 3 | |
|---|---|
| Error | 0.4 |
| Cost | 32384 |
| Alternative 4 | |
|---|---|
| Error | 0.4 |
| Cost | 32320 |
| Alternative 5 | |
|---|---|
| Error | 0.4 |
| Cost | 12992 |
| Alternative 6 | |
|---|---|
| Error | 0.4 |
| Cost | 6977 |
| Alternative 7 | |
|---|---|
| Error | 30.2 |
| Cost | 6913 |
| Alternative 8 | |
|---|---|
| Error | 60.6 |
| Cost | 64 |


Initial program 30.5
rmApplied count-2_binary64_2630.5
Applied sqrt-prod_binary64_9430.7
Simplified0.4
rmApplied add-cube-cbrt_binary64_1130.4
Applied associate-*l*_binary64_190.4
Simplified0.4
rmApplied add-cube-cbrt_binary64_1130.4
Applied associate-*r*_binary64_180.4
Taylor expanded around 0 0.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021065
(FPCore (x)
:name "sqrt A"
:precision binary64
(sqrt (+ (* x x) (* x x))))