Average Error: 0.3 → 0
Time: 8.2s
Precision: 64
\[\frac{1}{\sqrt{x}}\]
\[{x}^{\frac{-1}{2}}\]
\frac{1}{\sqrt{x}}
{x}^{\frac{-1}{2}}
double f(double x) {
        double r15123498 = 1.0;
        double r15123499 = x;
        double r15123500 = sqrt(r15123499);
        double r15123501 = r15123498 / r15123500;
        return r15123501;
}

double f(double x) {
        double r15123502 = x;
        double r15123503 = -0.5;
        double r15123504 = pow(r15123502, r15123503);
        return r15123504;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

    \[\frac{1}{\sqrt{x}}\]
  2. Using strategy rm
  3. Applied pow10.3

    \[\leadsto \frac{1}{\sqrt{\color{blue}{{x}^{1}}}}\]
  4. Applied sqrt-pow10.3

    \[\leadsto \frac{1}{\color{blue}{{x}^{\left(\frac{1}{2}\right)}}}\]
  5. Applied pow-flip0

    \[\leadsto \color{blue}{{x}^{\left(-\frac{1}{2}\right)}}\]
  6. Simplified0

    \[\leadsto {x}^{\color{blue}{\frac{-1}{2}}}\]
  7. Final simplification0

    \[\leadsto {x}^{\frac{-1}{2}}\]

Reproduce

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