Average Error: 0.0 → 0.0
Time: 13.3s
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 r76749 = 1.0;
        double r76750 = x;
        double r76751 = r76749 / r76750;
        double r76752 = r76750 * r76750;
        double r76753 = r76749 - r76752;
        double r76754 = sqrt(r76753);
        double r76755 = r76754 / r76750;
        double r76756 = r76751 + r76755;
        double r76757 = log(r76756);
        return r76757;
}

double f(double x) {
        double r76758 = 1.0;
        double r76759 = x;
        double r76760 = r76758 / r76759;
        double r76761 = r76759 * r76759;
        double r76762 = r76758 - r76761;
        double r76763 = sqrt(r76762);
        double r76764 = r76763 / r76759;
        double r76765 = r76760 + r76764;
        double r76766 = log(r76765);
        return r76766;
}

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