Average Error: 0.0 → 0.0
Time: 9.4s
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 r57682 = 1.0;
        double r57683 = x;
        double r57684 = r57682 / r57683;
        double r57685 = r57683 * r57683;
        double r57686 = r57682 - r57685;
        double r57687 = sqrt(r57686);
        double r57688 = r57687 / r57683;
        double r57689 = r57684 + r57688;
        double r57690 = log(r57689);
        return r57690;
}

double f(double x) {
        double r57691 = 1.0;
        double r57692 = x;
        double r57693 = r57691 / r57692;
        double r57694 = r57692 * r57692;
        double r57695 = r57691 - r57694;
        double r57696 = sqrt(r57695);
        double r57697 = r57696 / r57692;
        double r57698 = r57693 + r57697;
        double r57699 = log(r57698);
        return r57699;
}

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