Average Error: 0.0 → 0.0
Time: 4.0s
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 r66393 = 1.0;
        double r66394 = x;
        double r66395 = r66393 / r66394;
        double r66396 = r66394 * r66394;
        double r66397 = r66393 - r66396;
        double r66398 = sqrt(r66397);
        double r66399 = r66398 / r66394;
        double r66400 = r66395 + r66399;
        double r66401 = log(r66400);
        return r66401;
}

double f(double x) {
        double r66402 = 1.0;
        double r66403 = x;
        double r66404 = r66402 / r66403;
        double r66405 = r66403 * r66403;
        double r66406 = r66402 - r66405;
        double r66407 = sqrt(r66406);
        double r66408 = r66407 / r66403;
        double r66409 = r66404 + r66408;
        double r66410 = log(r66409);
        return r66410;
}

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 2020042 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))