Average Error: 0.0 → 0.0
Time: 1.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 r61140 = 1.0;
        double r61141 = x;
        double r61142 = r61140 / r61141;
        double r61143 = r61141 * r61141;
        double r61144 = r61140 - r61143;
        double r61145 = sqrt(r61144);
        double r61146 = r61145 / r61141;
        double r61147 = r61142 + r61146;
        double r61148 = log(r61147);
        return r61148;
}

double f(double x) {
        double r61149 = 1.0;
        double r61150 = x;
        double r61151 = r61149 / r61150;
        double r61152 = r61150 * r61150;
        double r61153 = r61149 - r61152;
        double r61154 = sqrt(r61153);
        double r61155 = r61154 / r61150;
        double r61156 = r61151 + r61155;
        double r61157 = log(r61156);
        return r61157;
}

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