Average Error: 0.0 → 0.0
Time: 11.5s
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 r1795260 = 1.0;
        double r1795261 = x;
        double r1795262 = r1795260 / r1795261;
        double r1795263 = r1795261 * r1795261;
        double r1795264 = r1795260 - r1795263;
        double r1795265 = sqrt(r1795264);
        double r1795266 = r1795265 / r1795261;
        double r1795267 = r1795262 + r1795266;
        double r1795268 = log(r1795267);
        return r1795268;
}

double f(double x) {
        double r1795269 = 1.0;
        double r1795270 = x;
        double r1795271 = r1795269 / r1795270;
        double r1795272 = r1795270 * r1795270;
        double r1795273 = r1795269 - r1795272;
        double r1795274 = sqrt(r1795273);
        double r1795275 = r1795274 / r1795270;
        double r1795276 = r1795271 + r1795275;
        double r1795277 = log(r1795276);
        return r1795277;
}

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