Average Error: 0.0 → 0.0
Time: 13.1s
Precision: 64
Internal Precision: 128
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{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.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. Final simplification0.0

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

Reproduce

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

Details

Time bar (total: 3.9s)Debug log

start189.0ms

Algorithm
intervals

setup61.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize18.0ms

Local error

Found 3 expressions with local error:

0.0b
(sqrt (- 1 (* x x)))
0.0b
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
0.0b
(/ (sqrt (- 1 (* x x))) x)

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
3 → 59
Calls

3 calls. Slowest were:

6.0ms
(/ (sqrt (- 1 (* x x))) x)
5.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
1.0ms
(sqrt (- 1 (* x x)))

series137.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

58.0ms
(/ (sqrt (- 1 (* x x))) x)
40.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
39.0ms
(sqrt (- 1 (* x x)))

simplify2.8s

Counts
34 → 68
Calls

34 calls. Slowest were:

510.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
315.0ms
(- (* 2 (/ 1 x)) (+ (* 1/2 x) (* 1/8 (pow x 3))))
304.0ms
(- (* 1/8 (/ 1 (* (pow x 4) (pow (sqrt -1) 3)))) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))

prune731.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b