Average Error: 0.0 → 0.0
Time: 3.2s
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 r150776 = 1.0;
        double r150777 = x;
        double r150778 = r150777 * r150777;
        double r150779 = r150776 - r150778;
        double r150780 = sqrt(r150779);
        return r150780;
}

double f(double x) {
        double r150781 = 1.0;
        double r150782 = x;
        double r150783 = r150782 * r150782;
        double r150784 = r150781 - r150783;
        double r150785 = exp(r150784);
        double r150786 = log(r150785);
        double r150787 = sqrt(r150786);
        return r150787;
}

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