Average Error: 0.0 → 0.0
Time: 2.1s
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 r70448 = 1.0;
        double r70449 = x;
        double r70450 = r70448 / r70449;
        double r70451 = r70449 * r70449;
        double r70452 = r70448 - r70451;
        double r70453 = sqrt(r70452);
        double r70454 = r70453 / r70449;
        double r70455 = r70450 + r70454;
        double r70456 = log(r70455);
        return r70456;
}

double f(double x) {
        double r70457 = 1.0;
        double r70458 = x;
        double r70459 = r70457 / r70458;
        double r70460 = r70458 * r70458;
        double r70461 = r70457 - r70460;
        double r70462 = sqrt(r70461);
        double r70463 = r70462 / r70458;
        double r70464 = r70459 + r70463;
        double r70465 = log(r70464);
        return r70465;
}

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