Average Error: 0.0 → 0.0
Time: 8.4s
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 r1676547 = 1.0;
        double r1676548 = x;
        double r1676549 = r1676547 / r1676548;
        double r1676550 = r1676548 * r1676548;
        double r1676551 = r1676547 - r1676550;
        double r1676552 = sqrt(r1676551);
        double r1676553 = r1676552 / r1676548;
        double r1676554 = r1676549 + r1676553;
        double r1676555 = log(r1676554);
        return r1676555;
}

double f(double x) {
        double r1676556 = 1.0;
        double r1676557 = x;
        double r1676558 = r1676556 / r1676557;
        double r1676559 = r1676557 * r1676557;
        double r1676560 = r1676556 - r1676559;
        double r1676561 = sqrt(r1676560);
        double r1676562 = r1676561 / r1676557;
        double r1676563 = r1676558 + r1676562;
        double r1676564 = log(r1676563);
        return r1676564;
}

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 2019149 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))