Average Error: 0.0 → 0.0
Time: 11.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 r70559 = 1.0;
        double r70560 = x;
        double r70561 = r70559 / r70560;
        double r70562 = r70560 * r70560;
        double r70563 = r70559 - r70562;
        double r70564 = sqrt(r70563);
        double r70565 = r70564 / r70560;
        double r70566 = r70561 + r70565;
        double r70567 = log(r70566);
        return r70567;
}

double f(double x) {
        double r70568 = 1.0;
        double r70569 = x;
        double r70570 = r70568 / r70569;
        double r70571 = r70569 * r70569;
        double r70572 = r70568 - r70571;
        double r70573 = sqrt(r70572);
        double r70574 = r70573 / r70569;
        double r70575 = r70570 + r70574;
        double r70576 = log(r70575);
        return r70576;
}

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 2019325 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))