Average Error: 0.0 → 0.0
Time: 6.8s
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 r44407 = 1.0;
        double r44408 = x;
        double r44409 = r44407 / r44408;
        double r44410 = r44408 * r44408;
        double r44411 = r44407 - r44410;
        double r44412 = sqrt(r44411);
        double r44413 = r44412 / r44408;
        double r44414 = r44409 + r44413;
        double r44415 = log(r44414);
        return r44415;
}

double f(double x) {
        double r44416 = 1.0;
        double r44417 = x;
        double r44418 = r44416 / r44417;
        double r44419 = r44417 * r44417;
        double r44420 = r44416 - r44419;
        double r44421 = sqrt(r44420);
        double r44422 = r44421 / r44417;
        double r44423 = r44418 + r44422;
        double r44424 = log(r44423);
        return r44424;
}

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