Average Error: 0.0 → 0.0
Time: 2.0s
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 r32753 = 1.0;
        double r32754 = x;
        double r32755 = r32753 / r32754;
        double r32756 = r32754 * r32754;
        double r32757 = r32753 - r32756;
        double r32758 = sqrt(r32757);
        double r32759 = r32758 / r32754;
        double r32760 = r32755 + r32759;
        double r32761 = log(r32760);
        return r32761;
}

double f(double x) {
        double r32762 = 1.0;
        double r32763 = x;
        double r32764 = r32762 / r32763;
        double r32765 = r32763 * r32763;
        double r32766 = r32762 - r32765;
        double r32767 = sqrt(r32766);
        double r32768 = r32767 / r32763;
        double r32769 = r32764 + r32768;
        double r32770 = log(r32769);
        return r32770;
}

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