Average Error: 0.0 → 0.0
Time: 14.5s
Precision: 64
Internal Precision: 128
\[-\log \left(\frac{1}{x} - 1\right)\]
\[-\left(\log \left(\sqrt{\frac{1}{x} - 1}\right) + \log \left(\frac{1}{x} - 1\right) \cdot \frac{1}{2}\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} - 1\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

    \[\leadsto -\log \color{blue}{\left(\sqrt{\frac{1}{x} - 1} \cdot \sqrt{\frac{1}{x} - 1}\right)}\]
  4. Applied log-prod0.0

    \[\leadsto -\color{blue}{\left(\log \left(\sqrt{\frac{1}{x} - 1}\right) + \log \left(\sqrt{\frac{1}{x} - 1}\right)\right)}\]
  5. Using strategy rm
  6. Applied pow1/20.0

    \[\leadsto -\left(\log \color{blue}{\left({\left(\frac{1}{x} - 1\right)}^{\frac{1}{2}}\right)} + \log \left(\sqrt{\frac{1}{x} - 1}\right)\right)\]
  7. Applied log-pow0.0

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

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

Reproduce

herbie shell --seed 2019004 
(FPCore (x)
  :name "neg log"
  (- (log (- (/ 1 x) 1))))

Details

Time bar (total: 14.1s)Debug log

sample259.0ms

Algorithm
intervals

simplify18.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

17.0ms
(- (log (- (/ 1 x) 1)))

prune29.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize14.0ms

Local error

Found 2 expressions with local error:

0.0b
(log (- (/ 1 x) 1))
0.0b
(- (/ 1 x) 1)

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
2 → 27
Calls

2 calls. Slowest were:

4.0ms
(log (- (/ 1 x) 1))
3.0ms
(- (/ 1 x) 1)

series35.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

26.0ms
(log (- (/ 1 x) 1))
9.0ms
(- (/ 1 x) 1)

simplify424.0ms

Counts
14 → 33
Calls

14 calls. Slowest were:

107.0ms
(- (log -1) (+ (/ 1 x) (* 1/2 (/ 1 (pow x 2)))))
105.0ms
(- (+ x (+ (* 1/2 (pow x 2)) (log x))))
100.0ms
(- (log -1) (+ (/ 1 x) (* 1/2 (/ 1 (pow x 2)))))

prune235.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize23.0ms

Local error

Found 4 expressions with local error:

0.2b
(sqrt (- (/ 1 x) 1))
0.2b
(sqrt (- (/ 1 x) 1))
0.0b
(log (sqrt (- (/ 1 x) 1)))
0.0b
(log (sqrt (- (/ 1 x) 1)))

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 68
Calls

4 calls. Slowest were:

6.0ms
(sqrt (- (/ 1 x) 1))
5.0ms
(sqrt (- (/ 1 x) 1))
5.0ms
(log (sqrt (- (/ 1 x) 1)))

series141.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

50.0ms
(log (sqrt (- (/ 1 x) 1)))
43.0ms
(log (sqrt (- (/ 1 x) 1)))
27.0ms
(sqrt (- (/ 1 x) 1))
21.0ms
(sqrt (- (/ 1 x) 1))

simplify2.3s

Counts
46 → 80
Calls

46 calls. Slowest were:

247.0ms
(- (+ (log (sqrt -1)) (* 1/2 (/ 1 (* x (pow (sqrt -1) 2))))) (* 1/4 (/ 1 (* (pow x 2) (pow (sqrt -1) 4)))))
245.0ms
(- (+ (log (sqrt -1)) (* 1/2 (/ 1 (* x (pow (sqrt -1) 2))))) (* 1/4 (/ 1 (* (pow x 2) (pow (sqrt -1) 4)))))
236.0ms
(- (+ (log (sqrt -1)) (* 1/2 (/ 1 (* x (pow (sqrt -1) 2))))) (* 1/4 (/ 1 (* (pow x 2) (pow (sqrt -1) 4)))))

prune854.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize17.0ms

Local error

Found 4 expressions with local error:

0.2b
(sqrt (- (/ 1 x) 1))
0.0b
(log (sqrt (- (/ 1 x) 1)))
0.0b
(log (- (/ 1 x) 1))
0.0b
(- (/ 1 x) 1)

rewrite17.0ms

Algorithm
rewrite-expression-head
Counts
4 → 61
Calls

4 calls. Slowest were:

5.0ms
(sqrt (- (/ 1 x) 1))
4.0ms
(log (sqrt (- (/ 1 x) 1)))
4.0ms
(log (- (/ 1 x) 1))

series98.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

47.0ms
(log (sqrt (- (/ 1 x) 1)))
28.0ms
(log (- (/ 1 x) 1))
15.0ms
(sqrt (- (/ 1 x) 1))
8.0ms
(- (/ 1 x) 1)

simplify1.5s

Counts
37 → 73
Calls

37 calls. Slowest were:

254.0ms
(- (+ (log (sqrt -1)) (* 1/2 (/ 1 (* x (pow (sqrt -1) 2))))) (* 1/4 (/ 1 (* (pow x 2) (pow (sqrt -1) 4)))))
252.0ms
(- (+ (* 1/2 (/ 1 (* x (sqrt -1)))) (sqrt -1)) (* 1/8 (/ 1 (* (pow x 2) (pow (sqrt -1) 3)))))
200.0ms
(- (+ (log (sqrt -1)) (* 1/2 (/ 1 (* x (pow (sqrt -1) 2))))) (* 1/4 (/ 1 (* (pow x 2) (pow (sqrt -1) 4)))))

prune744.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize14.0ms

Local error

Found 4 expressions with local error:

0.5b
(cbrt (- (/ 1 x) 1))
0.5b
(cbrt (- (/ 1 x) 1))
0.5b
(cbrt (- (/ 1 x) 1))
0.5b
(* (cbrt (- (/ 1 x) 1)) (cbrt (- (/ 1 x) 1)))

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 80
Calls

4 calls. Slowest were:

17.0ms
(* (cbrt (- (/ 1 x) 1)) (cbrt (- (/ 1 x) 1)))
2.0ms
(cbrt (- (/ 1 x) 1))
2.0ms
(cbrt (- (/ 1 x) 1))

series215.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

68.0ms
(cbrt (- (/ 1 x) 1))
50.0ms
(* (cbrt (- (/ 1 x) 1)) (cbrt (- (/ 1 x) 1)))
49.0ms
(cbrt (- (/ 1 x) 1))
47.0ms
(cbrt (- (/ 1 x) 1))

simplify2.7s

Counts
64 → 92
Calls

64 calls. Slowest were:

214.0ms
(- (pow -1 1/3) (+ (* 1/3 (* (/ 1 x) (pow -1 1/3))) (* 1/9 (* (/ 1 (pow x 2)) (pow -1 1/3)))))
206.0ms
(- (pow -1 1/3) (+ (* 1/3 (* (/ 1 x) (pow -1 1/3))) (* 1/9 (* (/ 1 (pow x 2)) (pow -1 1/3)))))
204.0ms
(- (pow -1 1/3) (+ (* 1/3 (* (/ 1 x) (pow -1 1/3))) (* 1/9 (* (/ 1 (pow x 2)) (pow -1 1/3)))))

prune908.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes181.0ms

Accuracy

0% (0.0b remaining)

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

bsearch3.0ms

end0.0ms

sample3.2s

Algorithm
intervals