Average Error: 0.0 → 0.0
Time: 2.0s
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 r67610 = 1.0;
        double r67611 = x;
        double r67612 = r67610 / r67611;
        double r67613 = r67611 * r67611;
        double r67614 = r67610 - r67613;
        double r67615 = sqrt(r67614);
        double r67616 = r67615 / r67611;
        double r67617 = r67612 + r67616;
        double r67618 = log(r67617);
        return r67618;
}

double f(double x) {
        double r67619 = 1.0;
        double r67620 = x;
        double r67621 = r67619 / r67620;
        double r67622 = r67620 * r67620;
        double r67623 = r67619 - r67622;
        double r67624 = sqrt(r67623);
        double r67625 = r67624 / r67620;
        double r67626 = r67621 + r67625;
        double r67627 = log(r67626);
        return r67627;
}

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