Average Error: 0.0 → 0.0
Time: 2.1s
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 r204958 = 1.0;
        double r204959 = x;
        double r204960 = r204959 * r204959;
        double r204961 = r204958 - r204960;
        double r204962 = sqrt(r204961);
        return r204962;
}

double f(double x) {
        double r204963 = 1.0;
        double r204964 = x;
        double r204965 = r204964 * r204964;
        double r204966 = r204963 - r204965;
        double r204967 = sqrt(r204966);
        double r204968 = exp(r204967);
        double r204969 = log(r204968);
        return r204969;
}

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