Average Error: 0.0 → 0.0
Time: 3.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 r68381 = 1.0;
        double r68382 = x;
        double r68383 = r68381 / r68382;
        double r68384 = r68382 * r68382;
        double r68385 = r68381 - r68384;
        double r68386 = sqrt(r68385);
        double r68387 = r68386 / r68382;
        double r68388 = r68383 + r68387;
        double r68389 = log(r68388);
        return r68389;
}

double f(double x) {
        double r68390 = 1.0;
        double r68391 = x;
        double r68392 = r68390 / r68391;
        double r68393 = r68391 * r68391;
        double r68394 = r68390 - r68393;
        double r68395 = sqrt(r68394);
        double r68396 = r68395 / r68391;
        double r68397 = r68392 + r68396;
        double r68398 = log(r68397);
        return r68398;
}

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