Average Error: 0.0 → 0.0
Time: 7.4s
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 r1968059 = 1.0;
        double r1968060 = x;
        double r1968061 = r1968059 / r1968060;
        double r1968062 = r1968060 * r1968060;
        double r1968063 = r1968059 - r1968062;
        double r1968064 = sqrt(r1968063);
        double r1968065 = r1968064 / r1968060;
        double r1968066 = r1968061 + r1968065;
        double r1968067 = log(r1968066);
        return r1968067;
}

double f(double x) {
        double r1968068 = 1.0;
        double r1968069 = x;
        double r1968070 = r1968068 / r1968069;
        double r1968071 = r1968069 * r1968069;
        double r1968072 = r1968068 - r1968071;
        double r1968073 = sqrt(r1968072);
        double r1968074 = r1968073 / r1968069;
        double r1968075 = r1968070 + r1968074;
        double r1968076 = log(r1968075);
        return r1968076;
}

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