Average Error: 0.0 → 0.0
Time: 4.7s
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 r140219 = 1.0;
        double r140220 = x;
        double r140221 = r140220 * r140220;
        double r140222 = r140219 - r140221;
        double r140223 = sqrt(r140222);
        return r140223;
}

double f(double x) {
        double r140224 = 1.0;
        double r140225 = x;
        double r140226 = r140225 * r140225;
        double r140227 = r140224 - r140226;
        double r140228 = sqrt(r140227);
        double r140229 = exp(r140228);
        double r140230 = log(r140229);
        return r140230;
}

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