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 r1541019 = 1.0;
        double r1541020 = x;
        double r1541021 = r1541019 / r1541020;
        double r1541022 = r1541020 * r1541020;
        double r1541023 = r1541019 - r1541022;
        double r1541024 = sqrt(r1541023);
        double r1541025 = r1541024 / r1541020;
        double r1541026 = r1541021 + r1541025;
        double r1541027 = log(r1541026);
        return r1541027;
}

double f(double x) {
        double r1541028 = 1.0;
        double r1541029 = x;
        double r1541030 = r1541028 / r1541029;
        double r1541031 = r1541029 * r1541029;
        double r1541032 = r1541028 - r1541031;
        double r1541033 = sqrt(r1541032);
        double r1541034 = r1541033 / r1541029;
        double r1541035 = r1541030 + r1541034;
        double r1541036 = log(r1541035);
        return r1541036;
}

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