Average Error: 0.0 → 0.0
Time: 4.8s
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 r59981 = 1.0;
        double r59982 = x;
        double r59983 = r59981 / r59982;
        double r59984 = r59982 * r59982;
        double r59985 = r59981 - r59984;
        double r59986 = sqrt(r59985);
        double r59987 = r59986 / r59982;
        double r59988 = r59983 + r59987;
        double r59989 = log(r59988);
        return r59989;
}

double f(double x) {
        double r59990 = 1.0;
        double r59991 = x;
        double r59992 = r59990 / r59991;
        double r59993 = r59991 * r59991;
        double r59994 = r59990 - r59993;
        double r59995 = sqrt(r59994);
        double r59996 = r59995 / r59991;
        double r59997 = r59992 + r59996;
        double r59998 = log(r59997);
        return r59998;
}

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