Average Error: 0.0 → 0.0
Time: 7.3s
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 r32356 = 1.0;
        double r32357 = x;
        double r32358 = r32356 / r32357;
        double r32359 = r32357 * r32357;
        double r32360 = r32356 - r32359;
        double r32361 = sqrt(r32360);
        double r32362 = r32361 / r32357;
        double r32363 = r32358 + r32362;
        double r32364 = log(r32363);
        return r32364;
}

double f(double x) {
        double r32365 = 1.0;
        double r32366 = x;
        double r32367 = r32365 / r32366;
        double r32368 = r32366 * r32366;
        double r32369 = r32365 - r32368;
        double r32370 = sqrt(r32369);
        double r32371 = r32370 / r32366;
        double r32372 = r32367 + r32371;
        double r32373 = log(r32372);
        return r32373;
}

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