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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

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

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

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

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

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

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

Runtime

Time bar (total: 20.9s)Debug logProfile

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