Average Error: 0.0 → 0.0
Time: 14.1s
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 r1929625 = 1.0;
        double r1929626 = x;
        double r1929627 = r1929625 / r1929626;
        double r1929628 = r1929626 * r1929626;
        double r1929629 = r1929625 - r1929628;
        double r1929630 = sqrt(r1929629);
        double r1929631 = r1929630 / r1929626;
        double r1929632 = r1929627 + r1929631;
        double r1929633 = log(r1929632);
        return r1929633;
}

double f(double x) {
        double r1929634 = 1.0;
        double r1929635 = x;
        double r1929636 = r1929634 / r1929635;
        double r1929637 = r1929635 * r1929635;
        double r1929638 = r1929634 - r1929637;
        double r1929639 = sqrt(r1929638);
        double r1929640 = r1929639 / r1929635;
        double r1929641 = r1929636 + r1929640;
        double r1929642 = log(r1929641);
        return r1929642;
}

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