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 r245583 = 1.0;
        double r245584 = x;
        double r245585 = sqrt(r245584);
        double r245586 = r245583 / r245585;
        return r245586;
}

double f(double x) {
        double r245587 = 1.0;
        double r245588 = x;
        double r245589 = sqrt(r245588);
        double r245590 = r245587 / r245589;
        double r245591 = r245590 * r245587;
        double r245592 = r245591 / r245589;
        double r245593 = sqrt(r245592);
        return r245593;
}

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 add-sqr-sqrt0.6

    \[\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)))