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









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

Initial program 30.7
Simplified30.7
rmApplied sqrt-prod_binary6430.8
Simplified0.4
rmApplied add-cube-cbrt_binary640.4
Applied associate-*l*_binary640.4
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021044
(FPCore (x)
:name "sqrt E"
:precision binary64
(sqrt (+ (pow x 2.0) (pow x 2.0))))