Average Error: 0.0 → 0.0
Time: 6.6s
Precision: 64
\[\sqrt{1.0 - x \cdot x}\]
\[\sqrt{\frac{1.0 \cdot 1.0 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{x \cdot x + 1.0}}\]
\sqrt{1.0 - x \cdot x}
\sqrt{\frac{1.0 \cdot 1.0 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{x \cdot x + 1.0}}
double f(double x) {
        double r7971827 = 1.0;
        double r7971828 = x;
        double r7971829 = r7971828 * r7971828;
        double r7971830 = r7971827 - r7971829;
        double r7971831 = sqrt(r7971830);
        return r7971831;
}

double f(double x) {
        double r7971832 = 1.0;
        double r7971833 = r7971832 * r7971832;
        double r7971834 = x;
        double r7971835 = r7971834 * r7971834;
        double r7971836 = r7971835 * r7971835;
        double r7971837 = r7971833 - r7971836;
        double r7971838 = r7971835 + r7971832;
        double r7971839 = r7971837 / r7971838;
        double r7971840 = sqrt(r7971839);
        return r7971840;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\sqrt{1.0 - x \cdot x}\]
  2. Using strategy rm
  3. Applied flip--0.0

    \[\leadsto \sqrt{\color{blue}{\frac{1.0 \cdot 1.0 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1.0 + x \cdot x}}}\]
  4. Final simplification0.0

    \[\leadsto \sqrt{\frac{1.0 \cdot 1.0 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{x \cdot x + 1.0}}\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  (sqrt (- 1.0 (* x x))))