Average Error: 0.0 → 0.0
Time: 1.3s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\log \left(e^{\sqrt{1 - x \cdot x}}\right)\]
\sqrt{1 - x \cdot x}
\log \left(e^{\sqrt{1 - x \cdot x}}\right)
double f(double x) {
        double r190438 = 1.0;
        double r190439 = x;
        double r190440 = r190439 * r190439;
        double r190441 = r190438 - r190440;
        double r190442 = sqrt(r190441);
        return r190442;
}

double f(double x) {
        double r190443 = 1.0;
        double r190444 = x;
        double r190445 = r190444 * r190444;
        double r190446 = r190443 - r190445;
        double r190447 = sqrt(r190446);
        double r190448 = exp(r190447);
        double r190449 = log(r190448);
        return r190449;
}

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 \log \left(e^{\sqrt{1 - x \cdot x}}\right)\]

Reproduce

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