Average Error: 0.0 → 0.0
Time: 8.7s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\sqrt{\log \left(e^{1 - x \cdot x}\right)}\]
\sqrt{1 - x \cdot x}
\sqrt{\log \left(e^{1 - x \cdot x}\right)}
double f(double x) {
        double r129667 = 1.0;
        double r129668 = x;
        double r129669 = r129668 * r129668;
        double r129670 = r129667 - r129669;
        double r129671 = sqrt(r129670);
        return r129671;
}

double f(double x) {
        double r129672 = 1.0;
        double r129673 = x;
        double r129674 = r129673 * r129673;
        double r129675 = r129672 - r129674;
        double r129676 = exp(r129675);
        double r129677 = log(r129676);
        double r129678 = sqrt(r129677);
        return r129678;
}

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 \sqrt{1 - \color{blue}{\log \left(e^{x \cdot x}\right)}}\]
  4. Applied add-log-exp0.0

    \[\leadsto \sqrt{\color{blue}{\log \left(e^{1}\right)} - \log \left(e^{x \cdot x}\right)}\]
  5. Applied diff-log0.0

    \[\leadsto \sqrt{\color{blue}{\log \left(\frac{e^{1}}{e^{x \cdot x}}\right)}}\]
  6. Simplified0.0

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

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

Reproduce

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