Average Error: 0.0 → 0.0
Time: 10.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 r66615 = 1.0;
        double r66616 = x;
        double r66617 = r66615 / r66616;
        double r66618 = r66616 * r66616;
        double r66619 = r66615 - r66618;
        double r66620 = sqrt(r66619);
        double r66621 = r66620 / r66616;
        double r66622 = r66617 + r66621;
        double r66623 = log(r66622);
        return r66623;
}

double f(double x) {
        double r66624 = 1.0;
        double r66625 = x;
        double r66626 = r66624 / r66625;
        double r66627 = r66625 * r66625;
        double r66628 = r66624 - r66627;
        double r66629 = sqrt(r66628);
        double r66630 = r66629 / r66625;
        double r66631 = r66626 + r66630;
        double r66632 = log(r66631);
        return r66632;
}

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