Average Error: 0.0 → 0.2
Time: 27.2s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{\sqrt{x}} + \frac{\sqrt{1 - x \cdot x}}{\sqrt{x}}\right) + \log \left(\frac{1}{\sqrt{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. Using strategy rm
  3. Applied add-sqr-sqrt0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}\right)\]
  4. Applied *-un-lft-identity0.0

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

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

    \[\leadsto \log \left(\frac{1}{\color{blue}{\sqrt{x} \cdot \sqrt{x}}} + \frac{1}{\sqrt{x}} \cdot \frac{\sqrt{1 - x \cdot x}}{\sqrt{x}}\right)\]
  7. Applied *-un-lft-identity0.0

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

    \[\leadsto \log \left(\color{blue}{\frac{1}{\sqrt{x}} \cdot \frac{1}{\sqrt{x}}} + \frac{1}{\sqrt{x}} \cdot \frac{\sqrt{1 - x \cdot x}}{\sqrt{x}}\right)\]
  9. Applied distribute-lft-out0.0

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

    \[\leadsto \color{blue}{\log \left(\frac{1}{\sqrt{x}}\right) + \log \left(\frac{1}{\sqrt{x}} + \frac{\sqrt{1 - x \cdot x}}{\sqrt{x}}\right)}\]
  11. Final simplification0.2

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

Reproduce

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