Average Error: 0.0 → 0.0
Time: 6.2s
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 r1968092 = 1.0;
        double r1968093 = x;
        double r1968094 = r1968092 / r1968093;
        double r1968095 = r1968093 * r1968093;
        double r1968096 = r1968092 - r1968095;
        double r1968097 = sqrt(r1968096);
        double r1968098 = r1968097 / r1968093;
        double r1968099 = r1968094 + r1968098;
        double r1968100 = log(r1968099);
        return r1968100;
}

double f(double x) {
        double r1968101 = 1.0;
        double r1968102 = x;
        double r1968103 = r1968101 / r1968102;
        double r1968104 = r1968102 * r1968102;
        double r1968105 = r1968101 - r1968104;
        double r1968106 = sqrt(r1968105);
        double r1968107 = r1968106 / r1968102;
        double r1968108 = r1968103 + r1968107;
        double r1968109 = log(r1968108);
        return r1968109;
}

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