Average Error: 0.0 → 0.0
Time: 3.9s
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 r54984 = 1.0;
        double r54985 = x;
        double r54986 = r54984 / r54985;
        double r54987 = r54985 * r54985;
        double r54988 = r54984 - r54987;
        double r54989 = sqrt(r54988);
        double r54990 = r54989 / r54985;
        double r54991 = r54986 + r54990;
        double r54992 = log(r54991);
        return r54992;
}

double f(double x) {
        double r54993 = 1.0;
        double r54994 = x;
        double r54995 = r54993 / r54994;
        double r54996 = r54994 * r54994;
        double r54997 = r54993 - r54996;
        double r54998 = sqrt(r54997);
        double r54999 = r54998 / r54994;
        double r55000 = r54995 + r54999;
        double r55001 = log(r55000);
        return r55001;
}

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