Average Error: 0.0 → 0.0
Time: 4.0s
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 r11777482 = 1.0;
        double r11777483 = x;
        double r11777484 = r11777483 * r11777483;
        double r11777485 = r11777482 - r11777484;
        double r11777486 = sqrt(r11777485);
        return r11777486;
}

double f(double x) {
        double r11777487 = 1.0;
        double r11777488 = x;
        double r11777489 = r11777488 * r11777488;
        double r11777490 = r11777487 - r11777489;
        double r11777491 = sqrt(r11777490);
        double r11777492 = log(r11777491);
        double r11777493 = exp(r11777492);
        return r11777493;
}

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