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

Details

Time bar (total: 22.5s)Debug log

start287.0ms

Algorithm
intervals

setup19.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize23.0ms

Local error

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

rewrite37.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

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

series282.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

130.0ms
(log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
68.0ms
(/ (sqrt (- 1 (* x x))) x)
48.0ms
(+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))
37.0ms
(sqrt (- 1 (* x x)))

simplify4.7s

Counts
49 → 93
Calls

49 calls. Slowest were:

485.0ms
(- (* 1/8 (/ 1 (* (pow x 3) (pow (sqrt -1) 3)))) (+ (* x (sqrt -1)) (* 1/2 (/ 1 (* x (sqrt -1))))))
465.0ms
(- (log 2) (+ (* 1/4 (pow x 2)) (+ (* 3/32 (pow x 4)) (log x))))
434.0ms
(log (- (* (/ 1 x) (/ 1 x)) (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x))))

prune919.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize14.0ms

Local error

Found 4 expressions with local error:

0.6b
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
0.6b
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
0.6b
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
0.5b
(* (cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))) (cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))

rewrite25.0ms

Algorithm
rewrite-expression-head
Counts
4 → 118
Calls

4 calls. Slowest were:

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

series520.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

165.0ms
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
137.0ms
(* (cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))) (cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))
116.0ms
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))
102.0ms
(cbrt (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))

simplify13.8s

Counts
99 → 130
Calls

99 calls. Slowest were:

818.0ms
(+ (* 1/3 (* (/ 1 x) (pow (/ 1 (pow (sqrt -1) 2)) 1/3))) (+ (* 1/18 (* (/ 1 (pow x 2)) (pow (/ 1 (pow (sqrt -1) 5)) 1/3))) (pow (sqrt -1) 1/3)))
515.0ms
(cbrt (+ (* (/ 1 x) (/ 1 x)) (- (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x)) (* (/ 1 x) (/ (sqrt (- 1 (* x x))) x)))))
498.0ms
(* (cbrt (+ (* (/ 1 x) (/ 1 x)) (- (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x)) (* (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))) (cbrt (+ (* (/ 1 x) (/ 1 x)) (- (* (/ (sqrt (- 1 (* x x))) x) (/ (sqrt (- 1 (* x x))) x)) (* (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))))

prune1.7s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes78.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms