Average Error: 31.0 → 0.4
Time: 14.8s
Precision: 64
\[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
\[\left(\log x + \left(\log 2 - \frac{\frac{3}{32}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}\right)\right) - \frac{\frac{1}{4}}{x \cdot x}\]
\log \left(x + \sqrt{x \cdot x - 1}\right)
\left(\log x + \left(\log 2 - \frac{\frac{3}{32}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}\right)\right) - \frac{\frac{1}{4}}{x \cdot x}
double f(double x) {
        double r2377973 = x;
        double r2377974 = r2377973 * r2377973;
        double r2377975 = 1.0;
        double r2377976 = r2377974 - r2377975;
        double r2377977 = sqrt(r2377976);
        double r2377978 = r2377973 + r2377977;
        double r2377979 = log(r2377978);
        return r2377979;
}

double f(double x) {
        double r2377980 = x;
        double r2377981 = log(r2377980);
        double r2377982 = 2.0;
        double r2377983 = log(r2377982);
        double r2377984 = 0.09375;
        double r2377985 = r2377980 * r2377980;
        double r2377986 = r2377985 * r2377985;
        double r2377987 = r2377984 / r2377986;
        double r2377988 = r2377983 - r2377987;
        double r2377989 = r2377981 + r2377988;
        double r2377990 = 0.25;
        double r2377991 = r2377990 / r2377985;
        double r2377992 = r2377989 - r2377991;
        return r2377992;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.0

    \[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
  2. Taylor expanded around inf 0.4

    \[\leadsto \color{blue}{\log 2 - \left(\log \left(\frac{1}{x}\right) + \left(\frac{3}{32} \cdot \frac{1}{{x}^{4}} + \frac{1}{4} \cdot \frac{1}{{x}^{2}}\right)\right)}\]
  3. Simplified0.4

    \[\leadsto \color{blue}{\left(\log x + \left(\log 2 - \frac{\frac{3}{32}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}\right)\right) - \frac{\frac{1}{4}}{x \cdot x}}\]
  4. Final simplification0.4

    \[\leadsto \left(\log x + \left(\log 2 - \frac{\frac{3}{32}}{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}\right)\right) - \frac{\frac{1}{4}}{x \cdot x}\]

Reproduce

herbie shell --seed 2019168 
(FPCore (x)
  :name "Hyperbolic arc-cosine"
  (log (+ x (sqrt (- (* x x) 1)))))