Average Error: 0.0 → 0.0
Time: 12.9s
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 r58441 = 1.0;
        double r58442 = x;
        double r58443 = r58441 / r58442;
        double r58444 = r58442 * r58442;
        double r58445 = r58441 - r58444;
        double r58446 = sqrt(r58445);
        double r58447 = r58446 / r58442;
        double r58448 = r58443 + r58447;
        double r58449 = log(r58448);
        return r58449;
}

double f(double x) {
        double r58450 = 1.0;
        double r58451 = x;
        double r58452 = r58450 / r58451;
        double r58453 = r58451 * r58451;
        double r58454 = r58450 - r58453;
        double r58455 = sqrt(r58454);
        double r58456 = r58455 / r58451;
        double r58457 = r58452 + r58456;
        double r58458 = log(r58457);
        return r58458;
}

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