Average Error: 0.0 → 0.0
Time: 5.2s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}{x \cdot \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{1 \cdot 1 - \left(x \cdot x\right) \cdot \left(x \cdot x\right)}}{x \cdot \sqrt{1 + x \cdot x}}\right)
double f(double x) {
        double r44645 = 1.0;
        double r44646 = x;
        double r44647 = r44645 / r44646;
        double r44648 = r44646 * r44646;
        double r44649 = r44645 - r44648;
        double r44650 = sqrt(r44649);
        double r44651 = r44650 / r44646;
        double r44652 = r44647 + r44651;
        double r44653 = log(r44652);
        return r44653;
}

double f(double x) {
        double r44654 = 1.0;
        double r44655 = x;
        double r44656 = r44654 / r44655;
        double r44657 = r44654 * r44654;
        double r44658 = r44655 * r44655;
        double r44659 = r44658 * r44658;
        double r44660 = r44657 - r44659;
        double r44661 = sqrt(r44660);
        double r44662 = r44654 + r44658;
        double r44663 = sqrt(r44662);
        double r44664 = r44655 * r44663;
        double r44665 = r44661 / r44664;
        double r44666 = r44656 + r44665;
        double r44667 = log(r44666);
        return r44667;
}

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 flip--0.0

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

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

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

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

Reproduce

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