Average Error: 0.1 → 0.1
Time: 11.9s
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 r55753 = 1.0;
        double r55754 = x;
        double r55755 = r55753 / r55754;
        double r55756 = r55754 * r55754;
        double r55757 = r55753 - r55756;
        double r55758 = sqrt(r55757);
        double r55759 = r55758 / r55754;
        double r55760 = r55755 + r55759;
        double r55761 = log(r55760);
        return r55761;
}

double f(double x) {
        double r55762 = 1.0;
        double r55763 = x;
        double r55764 = r55762 / r55763;
        double r55765 = r55763 * r55763;
        double r55766 = r55762 - r55765;
        double r55767 = sqrt(r55766);
        double r55768 = r55767 / r55763;
        double r55769 = r55764 + r55768;
        double r55770 = log(r55769);
        return r55770;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Final simplification0.1

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]

Reproduce

herbie shell --seed 2019212 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))