Average Error: 0.0 → 0.0
Time: 3.5s
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 r48041 = 1.0;
        double r48042 = x;
        double r48043 = r48041 / r48042;
        double r48044 = r48042 * r48042;
        double r48045 = r48041 - r48044;
        double r48046 = sqrt(r48045);
        double r48047 = r48046 / r48042;
        double r48048 = r48043 + r48047;
        double r48049 = log(r48048);
        return r48049;
}

double f(double x) {
        double r48050 = 1.0;
        double r48051 = x;
        double r48052 = r48050 / r48051;
        double r48053 = r48051 * r48051;
        double r48054 = r48050 - r48053;
        double r48055 = sqrt(r48054);
        double r48056 = r48055 / r48051;
        double r48057 = r48052 + r48056;
        double r48058 = log(r48057);
        return r48058;
}

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