Average Error: 0.0 → 0.0
Time: 7.7s
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 r2136730 = 1.0;
        double r2136731 = x;
        double r2136732 = r2136730 / r2136731;
        double r2136733 = r2136731 * r2136731;
        double r2136734 = r2136730 - r2136733;
        double r2136735 = sqrt(r2136734);
        double r2136736 = r2136735 / r2136731;
        double r2136737 = r2136732 + r2136736;
        double r2136738 = log(r2136737);
        return r2136738;
}

double f(double x) {
        double r2136739 = 1.0;
        double r2136740 = x;
        double r2136741 = r2136739 / r2136740;
        double r2136742 = r2136740 * r2136740;
        double r2136743 = r2136739 - r2136742;
        double r2136744 = sqrt(r2136743);
        double r2136745 = r2136744 / r2136740;
        double r2136746 = r2136741 + r2136745;
        double r2136747 = log(r2136746);
        return r2136747;
}

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