Average Error: 0.0 → 0.0
Time: 7.8s
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 r2287591 = 1.0;
        double r2287592 = x;
        double r2287593 = r2287591 / r2287592;
        double r2287594 = r2287592 * r2287592;
        double r2287595 = r2287591 - r2287594;
        double r2287596 = sqrt(r2287595);
        double r2287597 = r2287596 / r2287592;
        double r2287598 = r2287593 + r2287597;
        double r2287599 = log(r2287598);
        return r2287599;
}

double f(double x) {
        double r2287600 = 1.0;
        double r2287601 = x;
        double r2287602 = r2287600 / r2287601;
        double r2287603 = r2287601 * r2287601;
        double r2287604 = r2287600 - r2287603;
        double r2287605 = sqrt(r2287604);
        double r2287606 = r2287605 / r2287601;
        double r2287607 = r2287602 + r2287606;
        double r2287608 = log(r2287607);
        return r2287608;
}

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