Average Error: 0.0 → 0.0
Time: 17.0s
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 2019002 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))

Details

Time bar (total: 16.7s)Debug log

sample190.0ms

Algorithm
intervals

simplify9.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize20.0ms

Local error

Found 4 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)
0.0b
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

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

series207.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

97.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
54.0ms
(/ (sqrt (- 1 (* x x))) x)
29.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
28.0ms
(sqrt (- 1 (* x x)))

simplify4.1s

Counts
49 → 93
Calls

49 calls. Slowest were:

451.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
381.0ms
(log (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))
363.0ms
(- (+ (log (sqrt -1)) (/ 1 (* x (sqrt -1)))) (* 1/6 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))

prune1.3s

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize18.0ms

Local error

Found 4 expressions with local error:

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

rewrite29.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

12.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
12.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
2.0ms
(sqrt (- 1 (* x x)))

series195.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

69.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
66.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
38.0ms
(sqrt (- 1 (* x x)))
22.0ms
(sqrt (- 1 (* x x)))

simplify4.6s

Counts
50 → 90
Calls

50 calls. Slowest were:

458.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
456.0ms
(+ (* 1/8 (* (/ 1 (pow x 2)) (sqrt (/ 1 (pow (sqrt -1) 3))))) (+ (sqrt (sqrt -1)) (* 1/2 (* (/ 1 x) (sqrt (/ 1 (sqrt -1)))))))
395.0ms
(sqrt (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))

prune1.1s

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample5.0s

Algorithm
intervals