Average Error: 29.7 → 15.6
Time: 16.3s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le 4072.6667673670877:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{\sqrt[3]{x}} \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;(\left(\sqrt[3]{\frac{1}{{x}^{5}}}\right) \cdot \frac{-1}{9} + \left((\frac{1}{3} \cdot \left(\sqrt[3]{\frac{1}{x \cdot x}}\right) + \left(\frac{5}{81} \cdot \sqrt[3]{\frac{1}{{x}^{8}}}\right))_*\right))_*\\ \end{array}\]

Error

Bits error versus x

Derivation

  1. Split input into 2 regimes
  2. if x < 4072.6667673670877

    1. Initial program 0.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-cube-cbrt0.2

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{\left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right) \cdot \sqrt[3]{\sqrt[3]{x}}}\]

    if 4072.6667673670877 < x

    1. Initial program 60.2

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Taylor expanded around inf 33.6

      \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot {\left(\frac{1}{{x}^{2}}\right)}^{\frac{1}{3}} + \frac{5}{81} \cdot {\left(\frac{1}{{x}^{8}}\right)}^{\frac{1}{3}}\right) - \frac{1}{9} \cdot {\left(\frac{1}{{x}^{5}}\right)}^{\frac{1}{3}}}\]
    3. Simplified31.5

      \[\leadsto \color{blue}{(\left(\sqrt[3]{\frac{1}{{x}^{5}}}\right) \cdot \frac{-1}{9} + \left((\frac{1}{3} \cdot \left(\sqrt[3]{\frac{1}{x \cdot x}}\right) + \left(\sqrt[3]{\frac{1}{{x}^{8}}} \cdot \frac{5}{81}\right))_*\right))_*}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification15.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 4072.6667673670877:\\ \;\;\;\;\sqrt[3]{1 + x} - \sqrt[3]{\sqrt[3]{x}} \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\\ \mathbf{else}:\\ \;\;\;\;(\left(\sqrt[3]{\frac{1}{{x}^{5}}}\right) \cdot \frac{-1}{9} + \left((\frac{1}{3} \cdot \left(\sqrt[3]{\frac{1}{x \cdot x}}\right) + \left(\frac{5}{81} \cdot \sqrt[3]{\frac{1}{{x}^{8}}}\right))_*\right))_*\\ \end{array}\]

Reproduce

herbie shell --seed 2019008 +o rules:numerics
(FPCore (x)
  :name "2cbrt (problem 3.3.4)"
  (- (cbrt (+ x 1)) (cbrt x)))

Details

Time bar (total: 14.7s)Debug log

sample70.0ms

Algorithm
intervals

simplify21.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

21.0ms
(- (cbrt (+ x 1)) (cbrt x))

prune4.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 27.7b

localize11.0ms

Local error

Found 3 expressions with local error:

2.1b
(- (cbrt (+ x 1)) (cbrt x))
0.6b
(cbrt x)
0.3b
(cbrt (+ x 1))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
3 → 66
Calls

3 calls. Slowest were:

7.0ms
(- (cbrt (+ x 1)) (cbrt x))
1.0ms
(cbrt (+ x 1))
0.0ms
(cbrt x)

series418.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

263.0ms
(cbrt x)
102.0ms
(- (cbrt (+ x 1)) (cbrt x))
52.0ms
(cbrt (+ x 1))

simplify1.9s

Counts
61 → 75
Calls

61 calls. Slowest were:

349.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
340.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (+ (* (pow (* x -1) 1/3) (cbrt -1)) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2)))))
212.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune665.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 13.8b

localize11.0ms

Local error

Found 4 expressions with local error:

15.7b
(- (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))) (cbrt x))
0.6b
(cbrt x)
0.3b
(cbrt (sqrt (+ x 1)))
0.3b
(cbrt (sqrt (+ x 1)))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
4 → 65
Calls

4 calls. Slowest were:

10.0ms
(- (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))) (cbrt x))
1.0ms
(cbrt (sqrt (+ x 1)))
1.0ms
(cbrt (sqrt (+ x 1)))

series405.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

246.0ms
(cbrt x)
82.0ms
(- (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))) (cbrt x))
46.0ms
(cbrt (sqrt (+ x 1)))
31.0ms
(cbrt (sqrt (+ x 1)))

simplify1.9s

Counts
38 → 77
Calls

38 calls. Slowest were:

357.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (+ (* (pow (* x -1) 1/3) (cbrt -1)) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2)))))
339.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
258.0ms
(- (+ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) (* 1/6 (/ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) x))) (* 5/72 (/ (exp (* 1/6 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune774.0ms

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 13.8b

localize24.0ms

Local error

Found 4 expressions with local error:

27.9b
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (cbrt x)))
0.6b
(cbrt x)
0.3b
(cbrt (+ x 1))
0.3b
(cbrt (+ x 1))

rewrite2.0ms

Algorithm
rewrite-expression-head
Counts
4 → 50
Calls

4 calls. Slowest were:

1.0ms
(cbrt (+ x 1))
1.0ms
(cbrt (+ x 1))
0.0ms
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (cbrt x)))

series473.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

282.0ms
(cbrt x)
114.0ms
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (cbrt x)))
42.0ms
(cbrt (+ x 1))
34.0ms
(cbrt (+ x 1))

simplify1.7s

Counts
22 → 62
Calls

22 calls. Slowest were:

376.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
265.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))
260.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune628.0ms

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 13.8b

localize29.0ms

Local error

Found 4 expressions with local error:

27.3b
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (pow x 1/3)))
5.0b
(pow x 1/3)
0.3b
(cbrt (+ x 1))
0.3b
(cbrt (+ x 1))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 51
Calls

4 calls. Slowest were:

1.0ms
(cbrt (+ x 1))
1.0ms
(cbrt (+ x 1))
0.0ms
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (pow x 1/3)))

series490.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

276.0ms
(pow x 1/3)
141.0ms
(fma (cbrt (* (cbrt (+ x 1)) (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1))) (- (pow x 1/3)))
42.0ms
(cbrt (+ x 1))
30.0ms
(cbrt (+ x 1))

simplify1.6s

Counts
22 → 63
Calls

22 calls. Slowest were:

322.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
211.0ms
(- (+ (* 1/3 (pow (/ 1 (pow x 2)) 1/3)) (pow x 1/3)) (+ (pow (/ 1 x) -1/3) (* 1/9 (pow (/ 1 (pow x 5)) 1/3))))
201.0ms
(- (+ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune723.0ms

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 13.8b

regimes86.0ms

Accuracy

99.6% (0.1b remaining)

Error of 15.6b against oracle of 15.5b and baseline of 29.5b

bsearch64.0ms

end0.0ms

sample2.7s

Algorithm
intervals