Average Error: 0.0 → 0.0
Time: 3.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 r71085 = 1.0;
        double r71086 = x;
        double r71087 = r71085 / r71086;
        double r71088 = r71086 * r71086;
        double r71089 = r71085 - r71088;
        double r71090 = sqrt(r71089);
        double r71091 = r71090 / r71086;
        double r71092 = r71087 + r71091;
        double r71093 = log(r71092);
        return r71093;
}

double f(double x) {
        double r71094 = 1.0;
        double r71095 = x;
        double r71096 = r71094 / r71095;
        double r71097 = r71095 * r71095;
        double r71098 = r71094 - r71097;
        double r71099 = sqrt(r71098);
        double r71100 = r71099 / r71095;
        double r71101 = r71096 + r71100;
        double r71102 = log(r71101);
        return r71102;
}

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