Average Error: 0.0 → 0.0
Time: 9.8s
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 r70013 = 1.0;
        double r70014 = x;
        double r70015 = r70013 / r70014;
        double r70016 = r70014 * r70014;
        double r70017 = r70013 - r70016;
        double r70018 = sqrt(r70017);
        double r70019 = r70018 / r70014;
        double r70020 = r70015 + r70019;
        double r70021 = log(r70020);
        return r70021;
}

double f(double x) {
        double r70022 = 1.0;
        double r70023 = x;
        double r70024 = r70022 / r70023;
        double r70025 = r70023 * r70023;
        double r70026 = r70022 - r70025;
        double r70027 = sqrt(r70026);
        double r70028 = r70027 / r70023;
        double r70029 = r70024 + r70028;
        double r70030 = log(r70029);
        return r70030;
}

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