Average Error: 0.0 → 0.0
Time: 4.9s
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 r719109 = 1.0;
        double r719110 = x;
        double r719111 = r719109 / r719110;
        double r719112 = r719110 * r719110;
        double r719113 = r719109 - r719112;
        double r719114 = sqrt(r719113);
        double r719115 = r719114 / r719110;
        double r719116 = r719111 + r719115;
        double r719117 = log(r719116);
        return r719117;
}

double f(double x) {
        double r719118 = 1.0;
        double r719119 = x;
        double r719120 = r719118 / r719119;
        double r719121 = r719119 * r719119;
        double r719122 = r719118 - r719121;
        double r719123 = sqrt(r719122);
        double r719124 = r719123 / r719119;
        double r719125 = r719120 + r719124;
        double r719126 = log(r719125);
        return r719126;
}

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