Average Error: 0.0 → 0.0
Time: 7.3s
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 r57537 = 1.0;
        double r57538 = x;
        double r57539 = r57537 / r57538;
        double r57540 = r57538 * r57538;
        double r57541 = r57537 - r57540;
        double r57542 = sqrt(r57541);
        double r57543 = r57542 / r57538;
        double r57544 = r57539 + r57543;
        double r57545 = log(r57544);
        return r57545;
}

double f(double x) {
        double r57546 = 1.0;
        double r57547 = x;
        double r57548 = r57546 / r57547;
        double r57549 = r57547 * r57547;
        double r57550 = r57546 - r57549;
        double r57551 = sqrt(r57550);
        double r57552 = r57551 / r57547;
        double r57553 = r57548 + r57552;
        double r57554 = log(r57553);
        return r57554;
}

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 2019350 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))