Average Error: 0.1 → 0.1
Time: 11.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 r53465 = 1.0;
        double r53466 = x;
        double r53467 = r53465 / r53466;
        double r53468 = r53466 * r53466;
        double r53469 = r53465 - r53468;
        double r53470 = sqrt(r53469);
        double r53471 = r53470 / r53466;
        double r53472 = r53467 + r53471;
        double r53473 = log(r53472);
        return r53473;
}

double f(double x) {
        double r53474 = 1.0;
        double r53475 = x;
        double r53476 = r53474 / r53475;
        double r53477 = r53475 * r53475;
        double r53478 = r53474 - r53477;
        double r53479 = sqrt(r53478);
        double r53480 = r53479 / r53475;
        double r53481 = r53476 + r53480;
        double r53482 = log(r53481);
        return r53482;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Final simplification0.1

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]

Reproduce

herbie shell --seed 2019212 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))