Average Error: 0.3 → 0.3
Time: 8.7s
Precision: 64
$\frac{1}{\sqrt{x}}$
$\sqrt{\frac{\frac{1}{\sqrt{x}} \cdot 1}{\sqrt{x}}}$
\frac{1}{\sqrt{x}}
\sqrt{\frac{\frac{1}{\sqrt{x}} \cdot 1}{\sqrt{x}}}
double f(double x) {
double r1617375 = 1.0;
double r1617376 = x;
double r1617377 = sqrt(r1617376);
double r1617378 = r1617375 / r1617377;
return r1617378;
}


double f(double x) {
double r1617379 = 1.0;
double r1617380 = x;
double r1617381 = sqrt(r1617380);
double r1617382 = r1617379 / r1617381;
double r1617383 = r1617382 * r1617379;
double r1617384 = r1617383 / r1617381;
double r1617385 = sqrt(r1617384);
return r1617385;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.3

$\frac{1}{\sqrt{x}}$
2. Using strategy rm

$\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{x}}} \cdot \sqrt{\frac{1}{\sqrt{x}}}}$
4. Using strategy rm
5. Applied sqrt-unprod0.3

$\leadsto \color{blue}{\sqrt{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}}}}$
6. Simplified0.3

$\leadsto \sqrt{\color{blue}{\frac{\frac{1}{\sqrt{x}} \cdot 1}{\sqrt{x}}}}$
7. Final simplification0.3

$\leadsto \sqrt{\frac{\frac{1}{\sqrt{x}} \cdot 1}{\sqrt{x}}}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "1/sqrt(x)"
:precision binary64
(/ 1 (sqrt x)))