Average Error: 0.1 → 0.1
Time: 10.9s
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.1

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Final simplification0.1

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

Reproduce

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

Details

Time bar (total: 10.5s)Debug log

sample104.0ms

Algorithm
intervals
Results
68.0ms805×body80nan
21.0ms256×body80valid

simplify6.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
6.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

localize35.0ms

Local error

Found 2 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Rules
11×*-un-lft-identity
10×div-inv
log-prod
add-log-exp
distribute-lft-out
distribute-rgt-out
add-cube-cbrt
add-exp-log
log-div
pow1
add-sqr-sqrt
flip-+
distribute-rgt1-in
frac-add
add-cbrt-cube
flip3-+
log-pow
rem-log-exp
sum-log
+-commutative
Counts
2 → 37
Calls
2 calls:
Slowest
7.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
3.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

series149.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
102.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
47.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))

simplify1.9s

Counts
28 → 43
Calls
28 calls:
Slowest
318.0ms
(- (+ (log (sqrt -1)) (/ 1 (* x (sqrt -1)))) (* 1/6 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
300.0ms
(log (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))
267.0ms
(- (/ 1 x) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))
248.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
211.0ms
(log (+ (pow (/ 1 x) 3) (pow (/ (sqrt (- 1 (* x x))) x) 3)))

prune324.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize22.0ms

Local error

Found 2 expressions with local error:

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

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
times-frac
log-prod
add-exp-log
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-/l*
add-cbrt-cube
distribute-rgt1-in
pow1
associate-/l/
add-log-exp
div-inv
rem-log-exp
div-exp
flip-+
log-pow
flip3-+
frac-2neg
associate-/r*
clear-num
log-div
cbrt-undiv
Counts
2 → 42
Calls
2 calls:
Slowest
13.0ms
(/ (+ x (* (sqrt (- 1 (* x x))) x)) (* x x))
2.0ms
(log (/ (+ x (* (sqrt (- 1 (* x x))) x)) (* x x)))

series137.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
97.0ms
(log (/ (+ x (* (sqrt (- 1 (* x x))) x)) (* x x)))
39.0ms
(/ (+ x (* (sqrt (- 1 (* x x))) x)) (* x x))

simplify2.6s

Counts
32 → 48
Calls
32 calls:
Slowest
290.0ms
(- (log (+ x (* (sqrt (- 1 (* x x))) x))) (log (* x x)))
272.0ms
(- (+ (log (sqrt -1)) (/ 1 (* x (sqrt -1)))) (* 1/6 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))))
254.0ms
(- (/ 1 x) (+ (* 1/2 (/ 1 (* (pow x 2) (sqrt -1)))) (sqrt -1)))
235.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
209.0ms
(+ (pow x 3) (pow (* (sqrt (- 1 (* x x))) x) 3))

prune356.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes110.0ms

Accuracy

0% (0.0b remaining)

Error of 0.1b against oracle of 0.1b and baseline of 0.1b

bsearch2.0ms

end0.0ms

sample4.8s

Algorithm
intervals
Results
3.3s24239×body80nan
1.0s8000×body80valid