Average Error: 0.0 → 0.0
Time: 17.5s
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 r2233273 = 1.0;
        double r2233274 = x;
        double r2233275 = r2233273 / r2233274;
        double r2233276 = r2233274 * r2233274;
        double r2233277 = r2233273 - r2233276;
        double r2233278 = sqrt(r2233277);
        double r2233279 = r2233278 / r2233274;
        double r2233280 = r2233275 + r2233279;
        double r2233281 = log(r2233280);
        return r2233281;
}

double f(double x) {
        double r2233282 = 1.0;
        double r2233283 = x;
        double r2233284 = r2233282 / r2233283;
        double r2233285 = r2233283 * r2233283;
        double r2233286 = r2233282 - r2233285;
        double r2233287 = sqrt(r2233286);
        double r2233288 = r2233287 / r2233283;
        double r2233289 = r2233284 + r2233288;
        double r2233290 = log(r2233289);
        return r2233290;
}

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