Average Error: 0.0 → 0.0
Time: 12.8s
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 r1465703 = 1.0;
        double r1465704 = x;
        double r1465705 = r1465703 / r1465704;
        double r1465706 = r1465704 * r1465704;
        double r1465707 = r1465703 - r1465706;
        double r1465708 = sqrt(r1465707);
        double r1465709 = r1465708 / r1465704;
        double r1465710 = r1465705 + r1465709;
        double r1465711 = log(r1465710);
        return r1465711;
}

double f(double x) {
        double r1465712 = 1.0;
        double r1465713 = x;
        double r1465714 = r1465712 / r1465713;
        double r1465715 = r1465713 * r1465713;
        double r1465716 = r1465712 - r1465715;
        double r1465717 = sqrt(r1465716);
        double r1465718 = r1465717 / r1465713;
        double r1465719 = r1465714 + r1465718;
        double r1465720 = log(r1465719);
        return r1465720;
}

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 2019163 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))