Average Error: 31.1 → 0.1
Time: 24.0s
Precision: 64
Internal Precision: 2368
\[\log \left(x + \sqrt{x \cdot x - 1}\right)\]
\[\log \left(x + \sqrt{x + 1} \cdot \sqrt{x - 1}\right)\]

Error

Bits error versus x

Try it out

  1. Inputs

  2. Original Output:

    Herbie Output:

Derivation

  1. Initial program 31.1

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

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

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

Runtime

Time bar (total: 24.0s)Debug logProfile

herbie shell --seed '#(1072361757 3390613284 2339397988 1175251238 145061547 3101881848)' +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-cosine"
  (log (+ x (sqrt (- (* x x) 1)))))