Average Error: 0.0 → 0.0
Time: 12.6s
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 r3083160 = 1.0;
        double r3083161 = x;
        double r3083162 = r3083160 / r3083161;
        double r3083163 = r3083161 * r3083161;
        double r3083164 = r3083160 - r3083163;
        double r3083165 = sqrt(r3083164);
        double r3083166 = r3083165 / r3083161;
        double r3083167 = r3083162 + r3083166;
        double r3083168 = log(r3083167);
        return r3083168;
}

double f(double x) {
        double r3083169 = 1.0;
        double r3083170 = x;
        double r3083171 = r3083169 / r3083170;
        double r3083172 = r3083170 * r3083170;
        double r3083173 = r3083169 - r3083172;
        double r3083174 = sqrt(r3083173);
        double r3083175 = r3083174 / r3083170;
        double r3083176 = r3083171 + r3083175;
        double r3083177 = log(r3083176);
        return r3083177;
}

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