Average Error: 0.0 → 0.0
Time: 6.5s
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 r62566 = 1.0;
        double r62567 = x;
        double r62568 = r62566 / r62567;
        double r62569 = r62567 * r62567;
        double r62570 = r62566 - r62569;
        double r62571 = sqrt(r62570);
        double r62572 = r62571 / r62567;
        double r62573 = r62568 + r62572;
        double r62574 = log(r62573);
        return r62574;
}

double f(double x) {
        double r62575 = 1.0;
        double r62576 = x;
        double r62577 = r62575 / r62576;
        double r62578 = r62576 * r62576;
        double r62579 = r62575 - r62578;
        double r62580 = sqrt(r62579);
        double r62581 = r62580 / r62576;
        double r62582 = r62577 + r62581;
        double r62583 = log(r62582);
        return r62583;
}

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