Average Error: 0.0 → 0.0
Time: 9.2s
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 r8883243 = 1.0;
        double r8883244 = x;
        double r8883245 = r8883244 * r8883244;
        double r8883246 = r8883243 - r8883245;
        double r8883247 = sqrt(r8883246);
        return r8883247;
}

double f(double x) {
        double r8883248 = 1.0;
        double r8883249 = x;
        double r8883250 = r8883249 * r8883249;
        double r8883251 = r8883248 - r8883250;
        double r8883252 = sqrt(r8883251);
        double r8883253 = exp(r8883252);
        double r8883254 = log(r8883253);
        return r8883254;
}

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