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

Details

Time bar (total: 16.5s)Debug log

sample218.0ms

Algorithm
intervals

simplify18.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

18.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

localize46.0ms

Local error

Found 4 expressions with local error:

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

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

4.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)

series220.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

95.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
71.0ms
(/ (sqrt (- 1 (* x x))) x)
31.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
22.0ms
(sqrt (- 1 (* x x)))

simplify4.1s

Counts
49 → 93
Calls

49 calls. Slowest were:

424.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
389.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
328.0ms
(log (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))

prune834.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize20.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
(sqrt (- 1 (* x x)))
0.0b
(sqrt (- 1 (* x x)))

rewrite31.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

15.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)))

series139.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

48.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
47.0ms
(sqrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
22.0ms
(sqrt (- 1 (* x x)))
22.0ms
(sqrt (- 1 (* x x)))

simplify4.6s

Counts
50 → 90
Calls

50 calls. Slowest were:

710.0ms
(- (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))) (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
431.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
398.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))

prune976.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes103.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch2.0ms

end0.0ms

sample5.2s

Algorithm
intervals