Average Error: 0.0 → 0.0
Time: 6.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 r2573084 = 1.0;
        double r2573085 = x;
        double r2573086 = r2573084 / r2573085;
        double r2573087 = r2573085 * r2573085;
        double r2573088 = r2573084 - r2573087;
        double r2573089 = sqrt(r2573088);
        double r2573090 = r2573089 / r2573085;
        double r2573091 = r2573086 + r2573090;
        double r2573092 = log(r2573091);
        return r2573092;
}

double f(double x) {
        double r2573093 = 1.0;
        double r2573094 = x;
        double r2573095 = r2573093 / r2573094;
        double r2573096 = r2573094 * r2573094;
        double r2573097 = r2573093 - r2573096;
        double r2573098 = sqrt(r2573097);
        double r2573099 = r2573098 / r2573094;
        double r2573100 = r2573095 + r2573099;
        double r2573101 = log(r2573100);
        return r2573101;
}

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