Average Error: 0.3 → 0
Time: 6.6s
Precision: 64
\[\frac{\sqrt{x}}{x}\]
\[{x}^{\frac{-1}{2}}\]
\frac{\sqrt{x}}{x}
{x}^{\frac{-1}{2}}
double f(double x) {
        double r3410818 = x;
        double r3410819 = sqrt(r3410818);
        double r3410820 = r3410819 / r3410818;
        return r3410820;
}

double f(double x) {
        double r3410821 = x;
        double r3410822 = -0.5;
        double r3410823 = pow(r3410821, r3410822);
        return r3410823;
}

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{\sqrt{x}}{x}\]
  2. Using strategy rm
  3. Applied pow10.3

    \[\leadsto \frac{\sqrt{x}}{\color{blue}{{x}^{1}}}\]
  4. Applied pow1/20.3

    \[\leadsto \frac{\color{blue}{{x}^{\frac{1}{2}}}}{{x}^{1}}\]
  5. Applied pow-div0

    \[\leadsto \color{blue}{{x}^{\left(\frac{1}{2} - 1\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 "sqrt(x)/x"
  :precision binary64
  (/ (sqrt x) x))