Average Error: 0.0 → 0.0
Time: 3.4s
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 r9799315 = 1.0;
        double r9799316 = x;
        double r9799317 = r9799316 * r9799316;
        double r9799318 = r9799315 - r9799317;
        double r9799319 = sqrt(r9799318);
        return r9799319;
}

double f(double x) {
        double r9799320 = 1.0;
        double r9799321 = x;
        double r9799322 = r9799321 * r9799321;
        double r9799323 = r9799320 - r9799322;
        double r9799324 = sqrt(r9799323);
        double r9799325 = log(r9799324);
        double r9799326 = exp(r9799325);
        return r9799326;
}

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