Average Error: 0.0 → 0.0
Time: 1.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 r59456 = 1.0;
        double r59457 = x;
        double r59458 = r59456 / r59457;
        double r59459 = r59457 * r59457;
        double r59460 = r59456 - r59459;
        double r59461 = sqrt(r59460);
        double r59462 = r59461 / r59457;
        double r59463 = r59458 + r59462;
        double r59464 = log(r59463);
        return r59464;
}

double f(double x) {
        double r59465 = 1.0;
        double r59466 = x;
        double r59467 = r59465 / r59466;
        double r59468 = r59466 * r59466;
        double r59469 = r59465 - r59468;
        double r59470 = sqrt(r59469);
        double r59471 = r59470 / r59466;
        double r59472 = r59467 + r59471;
        double r59473 = log(r59472);
        return r59473;
}

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