Average Error: 0.0 → 0.0
Time: 6.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 r1576750 = 1.0;
        double r1576751 = x;
        double r1576752 = r1576750 / r1576751;
        double r1576753 = r1576751 * r1576751;
        double r1576754 = r1576750 - r1576753;
        double r1576755 = sqrt(r1576754);
        double r1576756 = r1576755 / r1576751;
        double r1576757 = r1576752 + r1576756;
        double r1576758 = log(r1576757);
        return r1576758;
}

double f(double x) {
        double r1576759 = 1.0;
        double r1576760 = x;
        double r1576761 = r1576759 / r1576760;
        double r1576762 = r1576760 * r1576760;
        double r1576763 = r1576759 - r1576762;
        double r1576764 = sqrt(r1576763);
        double r1576765 = r1576764 / r1576760;
        double r1576766 = r1576761 + r1576765;
        double r1576767 = log(r1576766);
        return r1576767;
}

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