Average Error: 0.1 → 0.1
Time: 10.3s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\left(1 + \sqrt{1 - x \cdot x}\right) \cdot \frac{1}{x}\right)\]
\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
\log \left(\left(1 + \sqrt{1 - x \cdot x}\right) \cdot \frac{1}{x}\right)
double f(double x) {
        double r1785178 = 1.0;
        double r1785179 = x;
        double r1785180 = r1785178 / r1785179;
        double r1785181 = r1785179 * r1785179;
        double r1785182 = r1785178 - r1785181;
        double r1785183 = sqrt(r1785182);
        double r1785184 = r1785183 / r1785179;
        double r1785185 = r1785180 + r1785184;
        double r1785186 = log(r1785185);
        return r1785186;
}

double f(double x) {
        double r1785187 = 1.0;
        double r1785188 = x;
        double r1785189 = r1785188 * r1785188;
        double r1785190 = r1785187 - r1785189;
        double r1785191 = sqrt(r1785190);
        double r1785192 = r1785187 + r1785191;
        double r1785193 = r1785187 / r1785188;
        double r1785194 = r1785192 * r1785193;
        double r1785195 = log(r1785194);
        return r1785195;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Using strategy rm
  3. Applied div-inv0.1

    \[\leadsto \log \left(\frac{1}{x} + \color{blue}{\sqrt{1 - x \cdot x} \cdot \frac{1}{x}}\right)\]
  4. Applied distribute-rgt1-in0.1

    \[\leadsto \log \color{blue}{\left(\left(\sqrt{1 - x \cdot x} + 1\right) \cdot \frac{1}{x}\right)}\]
  5. Final simplification0.1

    \[\leadsto \log \left(\left(1 + \sqrt{1 - x \cdot x}\right) \cdot \frac{1}{x}\right)\]

Reproduce

herbie shell --seed 2019164 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))