Average Error: 0.0 → 0.0
Time: 2.4s
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 r69137 = 1.0;
        double r69138 = x;
        double r69139 = r69137 / r69138;
        double r69140 = r69138 * r69138;
        double r69141 = r69137 - r69140;
        double r69142 = sqrt(r69141);
        double r69143 = r69142 / r69138;
        double r69144 = r69139 + r69143;
        double r69145 = log(r69144);
        return r69145;
}

double f(double x) {
        double r69146 = 1.0;
        double r69147 = x;
        double r69148 = r69146 / r69147;
        double r69149 = r69147 * r69147;
        double r69150 = r69146 - r69149;
        double r69151 = sqrt(r69150);
        double r69152 = r69151 / r69147;
        double r69153 = r69148 + r69152;
        double r69154 = log(r69153);
        return r69154;
}

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