Average Error: 0.0 → 0.0
Time: 1.5s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\sqrt{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}\]
\sqrt{1 - x \cdot x}
\sqrt{\frac{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}{1 + x \cdot x}}
double f(double x) {
        double r212187 = 1.0;
        double r212188 = x;
        double r212189 = r212188 * r212188;
        double r212190 = r212187 - r212189;
        double r212191 = sqrt(r212190);
        return r212191;
}

double f(double x) {
        double r212192 = 1.0;
        double r212193 = r212192 * r212192;
        double r212194 = x;
        double r212195 = r212194 * r212194;
        double r212196 = r212195 * r212195;
        double r212197 = r212193 - r212196;
        double r212198 = r212192 + r212195;
        double r212199 = r212197 / r212198;
        double r212200 = sqrt(r212199);
        return r212200;
}

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. Final simplification0.0

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

Reproduce

herbie shell --seed 2020057 
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  :precision binary64
  (sqrt (- 1 (* x x))))