Average Error: 0.0 → 0.0
Time: 9.2s
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 r4567002 = 1.0;
        double r4567003 = x;
        double r4567004 = r4567002 / r4567003;
        double r4567005 = r4567003 * r4567003;
        double r4567006 = r4567002 - r4567005;
        double r4567007 = sqrt(r4567006);
        double r4567008 = r4567007 / r4567003;
        double r4567009 = r4567004 + r4567008;
        double r4567010 = log(r4567009);
        return r4567010;
}

double f(double x) {
        double r4567011 = 1.0;
        double r4567012 = x;
        double r4567013 = r4567011 / r4567012;
        double r4567014 = r4567012 * r4567012;
        double r4567015 = r4567011 - r4567014;
        double r4567016 = sqrt(r4567015);
        double r4567017 = r4567016 / r4567012;
        double r4567018 = r4567013 + r4567017;
        double r4567019 = log(r4567018);
        return r4567019;
}

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