Average Error: 0.0 → 0.0
Time: 4.1s
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 r50287 = 1.0;
        double r50288 = x;
        double r50289 = r50287 / r50288;
        double r50290 = r50288 * r50288;
        double r50291 = r50287 - r50290;
        double r50292 = sqrt(r50291);
        double r50293 = r50292 / r50288;
        double r50294 = r50289 + r50293;
        double r50295 = log(r50294);
        return r50295;
}

double f(double x) {
        double r50296 = 1.0;
        double r50297 = x;
        double r50298 = r50296 / r50297;
        double r50299 = r50297 * r50297;
        double r50300 = r50296 - r50299;
        double r50301 = sqrt(r50300);
        double r50302 = r50301 / r50297;
        double r50303 = r50298 + r50302;
        double r50304 = log(r50303);
        return r50304;
}

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