Average Error: 0.0 → 0.0
Time: 8.0s
Precision: 64
\[\sqrt{1.0 - x \cdot x}\]
\[\log \left(e^{\sqrt{1.0 - x \cdot x}}\right)\]
\sqrt{1.0 - x \cdot x}
\log \left(e^{\sqrt{1.0 - x \cdot x}}\right)
double f(double x) {
        double r9515668 = 1.0;
        double r9515669 = x;
        double r9515670 = r9515669 * r9515669;
        double r9515671 = r9515668 - r9515670;
        double r9515672 = sqrt(r9515671);
        return r9515672;
}

double f(double x) {
        double r9515673 = 1.0;
        double r9515674 = x;
        double r9515675 = r9515674 * r9515674;
        double r9515676 = r9515673 - r9515675;
        double r9515677 = sqrt(r9515676);
        double r9515678 = exp(r9515677);
        double r9515679 = log(r9515678);
        return r9515679;
}

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.0 - x \cdot x}\]
  2. Using strategy rm
  3. Applied add-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\sqrt{1.0 - x \cdot x}}\right)}\]
  4. Final simplification0.0

    \[\leadsto \log \left(e^{\sqrt{1.0 - x \cdot x}}\right)\]

Reproduce

herbie shell --seed 2019162 
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  (sqrt (- 1.0 (* x x))))