Average Error: 0.0 → 0.0
Time: 32.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 r12576334 = 1.0;
        double r12576335 = x;
        double r12576336 = r12576334 / r12576335;
        double r12576337 = r12576335 * r12576335;
        double r12576338 = r12576334 - r12576337;
        double r12576339 = sqrt(r12576338);
        double r12576340 = r12576339 / r12576335;
        double r12576341 = r12576336 + r12576340;
        double r12576342 = log(r12576341);
        return r12576342;
}

double f(double x) {
        double r12576343 = 1.0;
        double r12576344 = x;
        double r12576345 = r12576343 / r12576344;
        double r12576346 = r12576344 * r12576344;
        double r12576347 = r12576343 - r12576346;
        double r12576348 = sqrt(r12576347);
        double r12576349 = r12576348 / r12576344;
        double r12576350 = r12576345 + r12576349;
        double r12576351 = log(r12576350);
        return r12576351;
}

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