Average Error: 0.0 → 0.0
Time: 5.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 r84901 = 1.0;
        double r84902 = x;
        double r84903 = r84901 / r84902;
        double r84904 = r84902 * r84902;
        double r84905 = r84901 - r84904;
        double r84906 = sqrt(r84905);
        double r84907 = r84906 / r84902;
        double r84908 = r84903 + r84907;
        double r84909 = log(r84908);
        return r84909;
}

double f(double x) {
        double r84910 = 1.0;
        double r84911 = x;
        double r84912 = r84910 / r84911;
        double r84913 = r84911 * r84911;
        double r84914 = r84910 - r84913;
        double r84915 = sqrt(r84914);
        double r84916 = r84915 / r84911;
        double r84917 = r84912 + r84916;
        double r84918 = log(r84917);
        return r84918;
}

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