Average Error: 0.0 → 0.0
Time: 1.9s
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 r58177 = 1.0;
        double r58178 = x;
        double r58179 = r58177 / r58178;
        double r58180 = r58178 * r58178;
        double r58181 = r58177 - r58180;
        double r58182 = sqrt(r58181);
        double r58183 = r58182 / r58178;
        double r58184 = r58179 + r58183;
        double r58185 = log(r58184);
        return r58185;
}

double f(double x) {
        double r58186 = 1.0;
        double r58187 = x;
        double r58188 = r58186 / r58187;
        double r58189 = r58187 * r58187;
        double r58190 = r58186 - r58189;
        double r58191 = sqrt(r58190);
        double r58192 = r58191 / r58187;
        double r58193 = r58188 + r58192;
        double r58194 = log(r58193);
        return r58194;
}

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