Average Error: 0.0 → 0.0
Time: 16.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 r2180885 = 1.0;
        double r2180886 = x;
        double r2180887 = r2180885 / r2180886;
        double r2180888 = r2180886 * r2180886;
        double r2180889 = r2180885 - r2180888;
        double r2180890 = sqrt(r2180889);
        double r2180891 = r2180890 / r2180886;
        double r2180892 = r2180887 + r2180891;
        double r2180893 = log(r2180892);
        return r2180893;
}

double f(double x) {
        double r2180894 = 1.0;
        double r2180895 = x;
        double r2180896 = r2180894 / r2180895;
        double r2180897 = r2180895 * r2180895;
        double r2180898 = r2180894 - r2180897;
        double r2180899 = sqrt(r2180898);
        double r2180900 = r2180899 / r2180895;
        double r2180901 = r2180896 + r2180900;
        double r2180902 = log(r2180901);
        return r2180902;
}

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