Average Error: 0.0 → 0.0
Time: 8.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 r7446122 = 1.0;
        double r7446123 = x;
        double r7446124 = r7446122 / r7446123;
        double r7446125 = r7446123 * r7446123;
        double r7446126 = r7446122 - r7446125;
        double r7446127 = sqrt(r7446126);
        double r7446128 = r7446127 / r7446123;
        double r7446129 = r7446124 + r7446128;
        double r7446130 = log(r7446129);
        return r7446130;
}

double f(double x) {
        double r7446131 = 1.0;
        double r7446132 = x;
        double r7446133 = r7446131 / r7446132;
        double r7446134 = r7446132 * r7446132;
        double r7446135 = r7446131 - r7446134;
        double r7446136 = sqrt(r7446135);
        double r7446137 = r7446136 / r7446132;
        double r7446138 = r7446133 + r7446137;
        double r7446139 = log(r7446138);
        return r7446139;
}

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