Average Error: 0.0 → 0.0
Time: 5.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 r2943817 = 1.0;
        double r2943818 = x;
        double r2943819 = r2943817 / r2943818;
        double r2943820 = r2943818 * r2943818;
        double r2943821 = r2943817 - r2943820;
        double r2943822 = sqrt(r2943821);
        double r2943823 = r2943822 / r2943818;
        double r2943824 = r2943819 + r2943823;
        double r2943825 = log(r2943824);
        return r2943825;
}

double f(double x) {
        double r2943826 = 1.0;
        double r2943827 = x;
        double r2943828 = r2943826 / r2943827;
        double r2943829 = r2943827 * r2943827;
        double r2943830 = r2943826 - r2943829;
        double r2943831 = sqrt(r2943830);
        double r2943832 = r2943831 / r2943827;
        double r2943833 = r2943828 + r2943832;
        double r2943834 = log(r2943833);
        return r2943834;
}

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