Average Error: 0.0 → 0.0
Time: 16.6s
Precision: 64
Internal Precision: 128
\[\log \left(\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) + \log \left(\sqrt{\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. Using strategy rm
  3. 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)}\]
  4. 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)}\]
  5. Final simplification0.0

    \[\leadsto \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)\]

Reproduce

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

Details

Time bar (total: 16.2s)Debug log

sample205.0ms

Algorithm
intervals

simplify41.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

41.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize38.0ms

Local error

Found 4 expressions with local error:

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

rewrite16.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

8.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
3.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
3.0ms
(/ (sqrt (- 1 (* x x))) x)

series222.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

94.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
59.0ms
(/ (sqrt (- 1 (* x x))) x)
37.0ms
(sqrt (- 1 (* x x)))
32.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))

simplify3.9s

Counts
49 → 93
Calls

49 calls. Slowest were:

395.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
383.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
361.0ms
(log (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))

prune864.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize11.0ms

Local error

Found 4 expressions with local error:

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

rewrite30.0ms

Algorithm
rewrite-expression-head
Counts
4 → 92
Calls

4 calls. Slowest were:

9.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
9.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
6.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

series181.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

59.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
55.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
37.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
31.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))

simplify4.4s

Counts
62 → 104
Calls

62 calls. Slowest were:

659.0ms
(sqrt (+ (pow (/ 1 x) 3) (pow (/ (sqrt (- 1 (* x x))) x) 3)))
393.0ms
(sqrt (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))
355.0ms
(+ (* 1/8 (* (/ 1 (pow x 2)) (sqrt (/ 1 (pow (sqrt -1) 3))))) (+ (sqrt (sqrt -1)) (* 1/2 (* (/ 1 x) (sqrt (/ 1 (sqrt -1)))))))

prune1.1s

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample5.2s

Algorithm
intervals