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

Details

Time bar (total: 3.9s)Debug log

start341.0ms

Algorithm
intervals

setup15.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

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

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
3 → 49
Calls

3 calls. Slowest were:

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

series145.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

54.0ms
(/ (sqrt (- 1 (* x x))) x)
52.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
39.0ms
(sqrt (- 1 (* x x)))

simplify2.8s

Counts
32 → 58
Calls

32 calls. Slowest were:

617.0ms
(- (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)) (* 1/8 (/ 1 (* (pow x 4) (pow (sqrt -1) 3)))))
600.0ms
(- (* 1/8 (/ 1 (* (pow x 4) (pow (sqrt -1) 3)))) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))
264.0ms
(- (/ 1 x) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))

prune570.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b