Average Error: 0.0 → 0.0
Time: 6.6s
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 r10351838 = 1.0;
        double r10351839 = x;
        double r10351840 = r10351839 * r10351839;
        double r10351841 = r10351838 - r10351840;
        double r10351842 = sqrt(r10351841);
        return r10351842;
}

double f(double x) {
        double r10351843 = 1.0;
        double r10351844 = r10351843 * r10351843;
        double r10351845 = x;
        double r10351846 = r10351845 * r10351845;
        double r10351847 = r10351846 * r10351846;
        double r10351848 = r10351844 - r10351847;
        double r10351849 = sqrt(r10351848);
        double r10351850 = r10351846 + r10351843;
        double r10351851 = sqrt(r10351850);
        double r10351852 = r10351849 / r10351851;
        return r10351852;
}

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