Average Error: 0.0 → 0.0
Time: 4.1s
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 r71328 = 1.0;
        double r71329 = x;
        double r71330 = r71328 / r71329;
        double r71331 = r71329 * r71329;
        double r71332 = r71328 - r71331;
        double r71333 = sqrt(r71332);
        double r71334 = r71333 / r71329;
        double r71335 = r71330 + r71334;
        double r71336 = log(r71335);
        return r71336;
}

double f(double x) {
        double r71337 = 1.0;
        double r71338 = x;
        double r71339 = r71337 / r71338;
        double r71340 = r71338 * r71338;
        double r71341 = r71337 - r71340;
        double r71342 = sqrt(r71341);
        double r71343 = r71342 / r71338;
        double r71344 = r71339 + r71343;
        double r71345 = log(r71344);
        return r71345;
}

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