Average Error: 0.0 → 0.0
Time: 4.3s
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 r7191466 = 1.0;
        double r7191467 = x;
        double r7191468 = r7191467 * r7191467;
        double r7191469 = r7191466 - r7191468;
        double r7191470 = sqrt(r7191469);
        return r7191470;
}

double f(double x) {
        double r7191471 = 1.0;
        double r7191472 = x;
        double r7191473 = r7191472 * r7191472;
        double r7191474 = r7191471 - r7191473;
        double r7191475 = sqrt(r7191474);
        double r7191476 = log(r7191475);
        double r7191477 = exp(r7191476);
        return r7191477;
}

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 +o rules:numerics
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  (sqrt (- 1.0 (* x x))))