Average Error: 0.0 → 0.0
Time: 1.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 r52564 = 1.0;
        double r52565 = x;
        double r52566 = r52564 / r52565;
        double r52567 = r52565 * r52565;
        double r52568 = r52564 - r52567;
        double r52569 = sqrt(r52568);
        double r52570 = r52569 / r52565;
        double r52571 = r52566 + r52570;
        double r52572 = log(r52571);
        return r52572;
}

double f(double x) {
        double r52573 = 1.0;
        double r52574 = x;
        double r52575 = r52573 / r52574;
        double r52576 = r52574 * r52574;
        double r52577 = r52573 - r52576;
        double r52578 = sqrt(r52577);
        double r52579 = r52578 / r52574;
        double r52580 = r52575 + r52579;
        double r52581 = log(r52580);
        return r52581;
}

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