Average Error: 0.0 → 0.0
Time: 13.4s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
double f(double x) {
        double r6621212 = 1.0;
        double r6621213 = x;
        double r6621214 = r6621212 / r6621213;
        double r6621215 = r6621213 * r6621213;
        double r6621216 = r6621212 - r6621215;
        double r6621217 = sqrt(r6621216);
        double r6621218 = r6621217 / r6621213;
        double r6621219 = r6621214 + r6621218;
        double r6621220 = log(r6621219);
        return r6621220;
}

double f(double x) {
        double r6621221 = 1.0;
        double r6621222 = x;
        double r6621223 = r6621221 / r6621222;
        double r6621224 = r6621222 * r6621222;
        double r6621225 = r6621221 - r6621224;
        double r6621226 = sqrt(r6621225);
        double r6621227 = r6621226 / r6621222;
        double r6621228 = r6621223 + r6621227;
        double r6621229 = log(r6621228);
        return r6621229;
}

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

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2019124 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))