Average Error: 31.7 → 0.1
Time: 56.8s
Precision: binary64
Cost: 1984
\[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
\[\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)\]
\log \left(x + \sqrt{x \cdot x - 1}\right)
\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)
(FPCore (x) :precision binary64 (log (+ x (sqrt (- (* x x) 1.0)))))
(FPCore (x)
 :precision binary64
 (log
  (+
   x
   (*
    (sqrt (sqrt (+ x 1.0)))
    (*
     (sqrt (* (cbrt (- x 1.0)) (cbrt (- x 1.0))))
     (* (sqrt (sqrt (+ x 1.0))) (sqrt (cbrt (- x 1.0)))))))))
double code(double x) {
	return log(x + sqrt((x * x) - 1.0));
}
double code(double x) {
	return log(x + (sqrt(sqrt(x + 1.0)) * (sqrt(cbrt(x - 1.0) * cbrt(x - 1.0)) * (sqrt(sqrt(x + 1.0)) * sqrt(cbrt(x - 1.0))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs
Alternative 1
Accuracy0.1
Cost2048
\[\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt{\sqrt{x + 1}} \cdot \sqrt{x - 1}} \cdot \sqrt{\sqrt{\sqrt{x + 1}} \cdot \sqrt{x - 1}}\right)\right)\]
Alternative 2
Accuracy21.3
Cost1152
\[\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt{x + 1} \cdot \left(x - 1\right)}\right)\]
Alternative 3
Accuracy42.9
Cost2688
\[\log \left(x + \sqrt{\sqrt{x + 1}} \cdot \frac{\sqrt{{x}^{3} - 1} \cdot \sqrt{\sqrt{1 + {x}^{3}}}}{\sqrt{\left(x + 1\right) + x \cdot x} \cdot \sqrt{\sqrt{x \cdot x + \left(1 - x\right)}}}\right)\]

Derivation

  1. Initial program 31.7

    \[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
  2. Using strategy rm
  3. Applied difference-of-sqr-1_binary64_73031.7

    \[\leadsto \log \left(x + \sqrt{\color{blue}{\left(x + 1\right) \cdot \left(x - 1\right)}}\right)\]
  4. Applied sqrt-prod_binary64_7760.1

    \[\leadsto \log \left(x + \color{blue}{\sqrt{x + 1} \cdot \sqrt{x - 1}}\right)\]
  5. Using strategy rm
  6. Applied add-sqr-sqrt_binary64_7820.1

    \[\leadsto \log \left(x + \color{blue}{\left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt{x + 1}}\right)} \cdot \sqrt{x - 1}\right)\]
  7. Applied associate-*l*_binary64_7010.1

    \[\leadsto \log \left(x + \color{blue}{\sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{x - 1}\right)}\right)\]
  8. Simplified0.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \color{blue}{\left(\sqrt{x - 1} \cdot \sqrt{\sqrt{x + 1}}\right)}\right)\]
  9. Using strategy rm
  10. Applied add-cube-cbrt_binary64_7950.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\color{blue}{\left(\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}\right) \cdot \sqrt[3]{x - 1}}} \cdot \sqrt{\sqrt{x + 1}}\right)\right)\]
  11. Applied sqrt-prod_binary64_7760.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\color{blue}{\left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)} \cdot \sqrt{\sqrt{x + 1}}\right)\right)\]
  12. Applied associate-*l*_binary64_7010.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \color{blue}{\left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1}} \cdot \sqrt{\sqrt{x + 1}}\right)\right)}\right)\]
  13. Simplified0.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \color{blue}{\left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)}\right)\right)\]
  14. Using strategy rm
  15. Applied add-sqr-sqrt_binary64_7820.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\color{blue}{\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}}}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)\]
  16. Simplified0.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\color{blue}{\left|\sqrt[3]{x - 1}\right|} \cdot \sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)\]
  17. Simplified0.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\left|\sqrt[3]{x - 1}\right| \cdot \color{blue}{\left|\sqrt[3]{x - 1}\right|}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)\]
  18. Final simplification0.1

    \[\leadsto \log \left(x + \sqrt{\sqrt{x + 1}} \cdot \left(\sqrt{\sqrt[3]{x - 1} \cdot \sqrt[3]{x - 1}} \cdot \left(\sqrt{\sqrt{x + 1}} \cdot \sqrt{\sqrt[3]{x - 1}}\right)\right)\right)\]

Reproduce

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