Average Error: 0.0 → 0.0
Time: 12.0s
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 r5013129 = 1.0;
        double r5013130 = x;
        double r5013131 = r5013129 / r5013130;
        double r5013132 = r5013130 * r5013130;
        double r5013133 = r5013129 - r5013132;
        double r5013134 = sqrt(r5013133);
        double r5013135 = r5013134 / r5013130;
        double r5013136 = r5013131 + r5013135;
        double r5013137 = log(r5013136);
        return r5013137;
}

double f(double x) {
        double r5013138 = 1.0;
        double r5013139 = x;
        double r5013140 = r5013138 / r5013139;
        double r5013141 = r5013139 * r5013139;
        double r5013142 = r5013138 - r5013141;
        double r5013143 = sqrt(r5013142);
        double r5013144 = r5013143 / r5013139;
        double r5013145 = r5013140 + r5013144;
        double r5013146 = log(r5013145);
        return r5013146;
}

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