Average Error: 0.0 → 0.0
Time: 6.5s
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 r8600582 = 1.0;
        double r8600583 = x;
        double r8600584 = r8600583 * r8600583;
        double r8600585 = r8600582 - r8600584;
        double r8600586 = sqrt(r8600585);
        return r8600586;
}

double f(double x) {
        double r8600587 = 1.0;
        double r8600588 = r8600587 * r8600587;
        double r8600589 = x;
        double r8600590 = r8600589 * r8600589;
        double r8600591 = r8600590 * r8600590;
        double r8600592 = r8600588 - r8600591;
        double r8600593 = r8600590 + r8600587;
        double r8600594 = r8600592 / r8600593;
        double r8600595 = sqrt(r8600594);
        return r8600595;
}

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