Average Error: 0.0 → 0.0
Time: 5.7s
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 r27069 = 1.0;
        double r27070 = x;
        double r27071 = r27069 / r27070;
        double r27072 = r27070 * r27070;
        double r27073 = r27069 - r27072;
        double r27074 = sqrt(r27073);
        double r27075 = r27074 / r27070;
        double r27076 = r27071 + r27075;
        double r27077 = log(r27076);
        return r27077;
}

double f(double x) {
        double r27078 = 1.0;
        double r27079 = x;
        double r27080 = r27078 / r27079;
        double r27081 = r27079 * r27079;
        double r27082 = r27078 - r27081;
        double r27083 = sqrt(r27082);
        double r27084 = r27083 / r27079;
        double r27085 = r27080 + r27084;
        double r27086 = log(r27085);
        return r27086;
}

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