Average Error: 31.8 → 0.2
Time: 6.6s
Precision: 64
\[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
\[\log \left(\left(2 \cdot x - \frac{0.5}{x}\right) - \frac{0.125}{{x}^{3}}\right)\]
\log \left(x + \sqrt{x \cdot x - 1}\right)
\log \left(\left(2 \cdot x - \frac{0.5}{x}\right) - \frac{0.125}{{x}^{3}}\right)
double f(double x) {
        double r72463 = x;
        double r72464 = r72463 * r72463;
        double r72465 = 1.0;
        double r72466 = r72464 - r72465;
        double r72467 = sqrt(r72466);
        double r72468 = r72463 + r72467;
        double r72469 = log(r72468);
        return r72469;
}

double f(double x) {
        double r72470 = 2.0;
        double r72471 = x;
        double r72472 = r72470 * r72471;
        double r72473 = 0.5;
        double r72474 = r72473 / r72471;
        double r72475 = r72472 - r72474;
        double r72476 = 0.125;
        double r72477 = 3.0;
        double r72478 = pow(r72471, r72477);
        double r72479 = r72476 / r72478;
        double r72480 = r72475 - r72479;
        double r72481 = log(r72480);
        return r72481;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 31.8

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

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

    \[\leadsto \log \color{blue}{\left(\left(2 \cdot x - \frac{0.5}{x}\right) - \frac{0.125}{{x}^{3}}\right)}\]
  4. Final simplification0.2

    \[\leadsto \log \left(\left(2 \cdot x - \frac{0.5}{x}\right) - \frac{0.125}{{x}^{3}}\right)\]

Reproduce

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