Average Error: 0.0 → 0.0
Time: 7.9s
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 r2447536 = 1.0;
        double r2447537 = x;
        double r2447538 = r2447536 / r2447537;
        double r2447539 = r2447537 * r2447537;
        double r2447540 = r2447536 - r2447539;
        double r2447541 = sqrt(r2447540);
        double r2447542 = r2447541 / r2447537;
        double r2447543 = r2447538 + r2447542;
        double r2447544 = log(r2447543);
        return r2447544;
}

double f(double x) {
        double r2447545 = 1.0;
        double r2447546 = x;
        double r2447547 = r2447545 / r2447546;
        double r2447548 = r2447546 * r2447546;
        double r2447549 = r2447545 - r2447548;
        double r2447550 = sqrt(r2447549);
        double r2447551 = r2447550 / r2447546;
        double r2447552 = r2447547 + r2447551;
        double r2447553 = log(r2447552);
        return r2447553;
}

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