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










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

Initial program 30.6
rmApplied count-2_binary64_36730.6
Applied sqrt-prod_binary64_43530.8
Simplified0.4
rmApplied add-cube-cbrt_binary64_4540.4
Applied associate-*l*_binary64_3600.4
Simplified0.4
rmApplied associate-*l*_binary64_3600.6
Simplified0.4
rmApplied add-cube-cbrt_binary64_4540.4
Applied associate-*l*_binary64_3600.4
Simplified0.3
Simplified0.3
Final simplification0.3
herbie shell --seed 2021014
(FPCore (x)
:name "sqrt A"
:precision binary64
(sqrt (+ (* x x) (* x x))))