Average Error: 0.0 → 0.0
Time: 3.7s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[e^{\log \left(\sqrt{1 - x \cdot x}\right)}\]
\sqrt{1 - x \cdot x}
e^{\log \left(\sqrt{1 - x \cdot x}\right)}
double f(double x) {
        double r9082567 = 1.0;
        double r9082568 = x;
        double r9082569 = r9082568 * r9082568;
        double r9082570 = r9082567 - r9082569;
        double r9082571 = sqrt(r9082570);
        return r9082571;
}

double f(double x) {
        double r9082572 = 1.0;
        double r9082573 = x;
        double r9082574 = r9082573 * r9082573;
        double r9082575 = r9082572 - r9082574;
        double r9082576 = sqrt(r9082575);
        double r9082577 = log(r9082576);
        double r9082578 = exp(r9082577);
        return r9082578;
}

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-exp-log0.0

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

    \[\leadsto e^{\log \left(\sqrt{1 - x \cdot x}\right)}\]

Reproduce

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