Average Error: 0.0 → 0.0
Time: 5.8s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\frac{\sqrt{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}{\sqrt{x \cdot x + 1}}\]
\sqrt{1 - x \cdot x}
\frac{\sqrt{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}{\sqrt{x \cdot x + 1}}
double f(double x) {
        double r10716600 = 1.0;
        double r10716601 = x;
        double r10716602 = r10716601 * r10716601;
        double r10716603 = r10716600 - r10716602;
        double r10716604 = sqrt(r10716603);
        return r10716604;
}

double f(double x) {
        double r10716605 = 1.0;
        double r10716606 = r10716605 * r10716605;
        double r10716607 = x;
        double r10716608 = r10716607 * r10716607;
        double r10716609 = r10716608 * r10716608;
        double r10716610 = r10716606 - r10716609;
        double r10716611 = sqrt(r10716610);
        double r10716612 = r10716608 + r10716605;
        double r10716613 = sqrt(r10716612);
        double r10716614 = r10716611 / r10716613;
        return r10716614;
}

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 - x \cdot x}\]
  2. Using strategy rm
  3. Applied flip--0.0

    \[\leadsto \sqrt{\color{blue}{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}}\]
  4. Applied sqrt-div0.0

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

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

Reproduce

herbie shell --seed 2019171 
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  (sqrt (- 1.0 (* x x))))