Average Error: 0.0 → 0.0
Time: 4.0s
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 r70340 = 1.0;
        double r70341 = x;
        double r70342 = r70340 / r70341;
        double r70343 = r70341 * r70341;
        double r70344 = r70340 - r70343;
        double r70345 = sqrt(r70344);
        double r70346 = r70345 / r70341;
        double r70347 = r70342 + r70346;
        double r70348 = log(r70347);
        return r70348;
}

double f(double x) {
        double r70349 = 1.0;
        double r70350 = x;
        double r70351 = r70349 / r70350;
        double r70352 = r70350 * r70350;
        double r70353 = r70349 - r70352;
        double r70354 = sqrt(r70353);
        double r70355 = r70354 / r70350;
        double r70356 = r70351 + r70355;
        double r70357 = log(r70356);
        return r70357;
}

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