Average Error: 0.0 → 0.0
Time: 13.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 r14882850 = 1.0;
        double r14882851 = x;
        double r14882852 = r14882850 / r14882851;
        double r14882853 = r14882851 * r14882851;
        double r14882854 = r14882850 - r14882853;
        double r14882855 = sqrt(r14882854);
        double r14882856 = r14882855 / r14882851;
        double r14882857 = r14882852 + r14882856;
        double r14882858 = log(r14882857);
        return r14882858;
}

double f(double x) {
        double r14882859 = 1.0;
        double r14882860 = x;
        double r14882861 = r14882859 / r14882860;
        double r14882862 = r14882860 * r14882860;
        double r14882863 = r14882859 - r14882862;
        double r14882864 = sqrt(r14882863);
        double r14882865 = r14882864 / r14882860;
        double r14882866 = r14882861 + r14882865;
        double r14882867 = log(r14882866);
        return r14882867;
}

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