Average Error: 0.0 → 0.0
Time: 4.6s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{x} + \frac{\sqrt{\sqrt{1 - x \cdot x}}}{\frac{x}{\sqrt{\sqrt{1 - x \cdot x}}}}\right)\]
\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
\log \left(\frac{1}{x} + \frac{\sqrt{\sqrt{1 - x \cdot x}}}{\frac{x}{\sqrt{\sqrt{1 - x \cdot x}}}}\right)
double f(double x) {
        double r53800 = 1.0;
        double r53801 = x;
        double r53802 = r53800 / r53801;
        double r53803 = r53801 * r53801;
        double r53804 = r53800 - r53803;
        double r53805 = sqrt(r53804);
        double r53806 = r53805 / r53801;
        double r53807 = r53802 + r53806;
        double r53808 = log(r53807);
        return r53808;
}

double f(double x) {
        double r53809 = 1.0;
        double r53810 = x;
        double r53811 = r53809 / r53810;
        double r53812 = r53810 * r53810;
        double r53813 = r53809 - r53812;
        double r53814 = sqrt(r53813);
        double r53815 = sqrt(r53814);
        double r53816 = r53810 / r53815;
        double r53817 = r53815 / r53816;
        double r53818 = r53811 + r53817;
        double r53819 = log(r53818);
        return r53819;
}

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. Using strategy rm
  3. Applied add-sqr-sqrt0.0

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

    \[\leadsto \log \left(\frac{1}{x} + \frac{\color{blue}{\sqrt{\sqrt{1 - x \cdot x}} \cdot \sqrt{\sqrt{1 - x \cdot x}}}}{x}\right)\]
  5. Applied associate-/l*0.0

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

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

Reproduce

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