Average Error: 0.0 → 0.0
Time: 8.7s
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 r65402 = 1.0;
        double r65403 = x;
        double r65404 = r65402 / r65403;
        double r65405 = r65403 * r65403;
        double r65406 = r65402 - r65405;
        double r65407 = sqrt(r65406);
        double r65408 = r65407 / r65403;
        double r65409 = r65404 + r65408;
        double r65410 = log(r65409);
        return r65410;
}

double f(double x) {
        double r65411 = 1.0;
        double r65412 = x;
        double r65413 = r65411 / r65412;
        double r65414 = r65412 * r65412;
        double r65415 = r65411 - r65414;
        double r65416 = sqrt(r65415);
        double r65417 = r65416 / r65412;
        double r65418 = r65413 + r65417;
        double r65419 = log(r65418);
        return r65419;
}

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