Average Error: 0.0 → 0.0
Time: 9.6s
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. Final simplification0.0

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

Reproduce

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

Details

Time bar (total: 9.3s)Debug log

sample171.0ms

Algorithm
intervals

simplify16.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
15.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize20.0ms

Local error

Found 3 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)))

rewrite33.0ms

Algorithm
rewrite-expression-head
Rules
11×*-un-lft-identity
add-sqr-sqrt
div-inv
add-cube-cbrt
associate-/l*
sqrt-prod
add-log-exp
sqrt-div
fma-def
log1p-expm1-u
add-exp-log
add-cbrt-cube
pow1
expm1-log1p-u
associate-/l/
distribute-lft-out
flip--
flip3--
distribute-rgt-out
flip-+
distribute-rgt1-in
frac-add
pow1/2
flip3-+
frac-2neg
sum-log
clear-num
rem-sqrt-square
+-commutative
Counts
3 → 59
Calls
3 calls:
Slowest
22.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
8.0ms
(/ (sqrt (- 1 (* x x))) x)
2.0ms
(sqrt (- 1 (* x x)))

series141.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
74.0ms
(/ (sqrt (- 1 (* x x))) x)
38.0ms
(sqrt (- 1 (* x x)))
28.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))

simplify2.9s

Counts
34 → 68
Calls
34 calls:
Slowest
836.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
312.0ms
(- (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))) (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
309.0ms
(- (/ 1 x) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))
229.0ms
(- (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)) (* 1/8 (/ 1 (* (pow x 4) (pow (sqrt -1) 3)))))
226.0ms
(- (/ 1 x) (+ (* 1/2 x) (* 1/8 (pow x 3))))

prune675.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample5.4s

Algorithm
intervals