Average Error: 32.3 → 0.6
Time: 2.5s
Precision: binary64
\[\log \left(x + \sqrt{x \cdot x - 1}\right) \]
\[\log \left(x + x\right) \]
\log \left(x + \sqrt{x \cdot x - 1}\right)
\log \left(x + x\right)
(FPCore (x) :precision binary64 (log (+ x (sqrt (- (* x x) 1.0)))))
(FPCore (x) :precision binary64 (log (+ x x)))
double code(double x) {
	return log((x + sqrt(((x * x) - 1.0))));
}
double code(double x) {
	return log((x + x));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 32.3

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

    \[\leadsto \log \left(x + \color{blue}{x}\right) \]
  3. Final simplification0.6

    \[\leadsto \log \left(x + x\right) \]

Reproduce

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