Average Error: 0.0 → 0.0
Time: 30.4s
Precision: 64
Internal Precision: 128
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\sqrt{(\left(\sqrt{\frac{1}{x}}\right) \cdot \left(\sqrt{\frac{1}{x}}\right) + \left(\frac{\sqrt{1 - x \cdot x}}{x}\right))_*}\right) + \log \left(\sqrt{\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}}\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Initial simplification0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt0.0

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

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

    \[\leadsto \log \left(\sqrt{\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}}\right) + \log \left(\sqrt{\color{blue}{\sqrt{\frac{1}{x}} \cdot \sqrt{\frac{1}{x}}} + \frac{\sqrt{1 - x \cdot x}}{x}}\right)\]
  8. Applied fma-def0.0

    \[\leadsto \log \left(\sqrt{\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}}\right) + \log \left(\sqrt{\color{blue}{(\left(\sqrt{\frac{1}{x}}\right) \cdot \left(\sqrt{\frac{1}{x}}\right) + \left(\frac{\sqrt{1 - x \cdot x}}{x}\right))_*}}\right)\]
  9. Final simplification0.0

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

Runtime

Time bar (total: 30.4s)Debug logProfile

herbie shell --seed 2018278 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))