Average Error: 0.0 → 0.0
Time: 7.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 r2377358 = 1.0;
        double r2377359 = x;
        double r2377360 = r2377358 / r2377359;
        double r2377361 = r2377359 * r2377359;
        double r2377362 = r2377358 - r2377361;
        double r2377363 = sqrt(r2377362);
        double r2377364 = r2377363 / r2377359;
        double r2377365 = r2377360 + r2377364;
        double r2377366 = log(r2377365);
        return r2377366;
}

double f(double x) {
        double r2377367 = 1.0;
        double r2377368 = x;
        double r2377369 = r2377367 / r2377368;
        double r2377370 = r2377368 * r2377368;
        double r2377371 = r2377367 - r2377370;
        double r2377372 = sqrt(r2377371);
        double r2377373 = r2377372 / r2377368;
        double r2377374 = r2377369 + r2377373;
        double r2377375 = log(r2377374);
        return r2377375;
}

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 2019192 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1.0 x) (/ (sqrt (- 1.0 (* x x))) x))))