Average Error: 0.0 → 0.0
Time: 23.7s
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 r1976975 = 1.0;
        double r1976976 = x;
        double r1976977 = r1976975 / r1976976;
        double r1976978 = r1976976 * r1976976;
        double r1976979 = r1976975 - r1976978;
        double r1976980 = sqrt(r1976979);
        double r1976981 = r1976980 / r1976976;
        double r1976982 = r1976977 + r1976981;
        double r1976983 = log(r1976982);
        return r1976983;
}

double f(double x) {
        double r1976984 = 1.0;
        double r1976985 = x;
        double r1976986 = r1976984 / r1976985;
        double r1976987 = r1976985 * r1976985;
        double r1976988 = r1976984 - r1976987;
        double r1976989 = sqrt(r1976988);
        double r1976990 = r1976989 / r1976985;
        double r1976991 = r1976986 + r1976990;
        double r1976992 = log(r1976991);
        return r1976992;
}

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