Average Error: 0.0 → 0.0
Time: 5.6s
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 r51681 = 1.0;
        double r51682 = x;
        double r51683 = r51681 / r51682;
        double r51684 = r51682 * r51682;
        double r51685 = r51681 - r51684;
        double r51686 = sqrt(r51685);
        double r51687 = r51686 / r51682;
        double r51688 = r51683 + r51687;
        double r51689 = log(r51688);
        return r51689;
}

double f(double x) {
        double r51690 = 1.0;
        double r51691 = x;
        double r51692 = r51690 / r51691;
        double r51693 = r51691 * r51691;
        double r51694 = r51690 - r51693;
        double r51695 = sqrt(r51694);
        double r51696 = r51695 / r51691;
        double r51697 = r51692 + r51696;
        double r51698 = log(r51697);
        return r51698;
}

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