Average Error: 0.0 → 0.0
Time: 6.7s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\sqrt{1 - x \cdot x}\]
\sqrt{1 - x \cdot x}
\sqrt{1 - x \cdot x}
double f(double x) {
        double r102729 = 1.0;
        double r102730 = x;
        double r102731 = r102730 * r102730;
        double r102732 = r102729 - r102731;
        double r102733 = sqrt(r102732);
        return r102733;
}

double f(double x) {
        double r102734 = 1.0;
        double r102735 = x;
        double r102736 = r102735 * r102735;
        double r102737 = r102734 - r102736;
        double r102738 = sqrt(r102737);
        return r102738;
}

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 add-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\sqrt{1 - x \cdot x}}\right)}\]
  4. Final simplification0.0

    \[\leadsto \sqrt{1 - x \cdot x}\]

Reproduce

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