Average Error: 0.0 → 0.0
Time: 12.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 r4388030 = 1.0;
        double r4388031 = x;
        double r4388032 = r4388030 / r4388031;
        double r4388033 = r4388031 * r4388031;
        double r4388034 = r4388030 - r4388033;
        double r4388035 = sqrt(r4388034);
        double r4388036 = r4388035 / r4388031;
        double r4388037 = r4388032 + r4388036;
        double r4388038 = log(r4388037);
        return r4388038;
}

double f(double x) {
        double r4388039 = 1.0;
        double r4388040 = x;
        double r4388041 = r4388039 / r4388040;
        double r4388042 = r4388040 * r4388040;
        double r4388043 = r4388039 - r4388042;
        double r4388044 = sqrt(r4388043);
        double r4388045 = r4388044 / r4388040;
        double r4388046 = r4388041 + r4388045;
        double r4388047 = log(r4388046);
        return r4388047;
}

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