Average Error: 29.7 → 15.6
Time: 2.5m
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}:\\ \;\;\;\;\frac{5}{81} \cdot \sqrt[3]{\frac{1}{{x}^{8}}} + \left(\sqrt[3]{\frac{1}{x \cdot x}} \cdot \frac{1}{3} - \frac{1}{9} \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\\ \end{array}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Using strategy rm
    3. Applied add-cbrt-cube60.1

      \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}}} - \sqrt[3]{x}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt60.1

      \[\leadsto \sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{x + 1}} \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right) \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right)}} - \sqrt[3]{x}\]
    6. Using strategy rm
    7. Applied add-sqr-sqrt60.1

      \[\leadsto \sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{x + 1}} \cdot \sqrt[3]{\sqrt[3]{\color{blue}{\sqrt{x + 1} \cdot \sqrt{x + 1}}}}\right) \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right)} - \sqrt[3]{x}\]
    8. Applied cbrt-prod60.1

      \[\leadsto \sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{x + 1}} \cdot \sqrt[3]{\color{blue}{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}}}\right) \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right)} - \sqrt[3]{x}\]
    9. 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}}}\]
    10. Simplified31.5

      \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot \sqrt[3]{\frac{1}{x \cdot x}} - \frac{1}{9} \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right) + \sqrt[3]{\frac{1}{{x}^{8}}} \cdot \frac{5}{81}}\]
  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}:\\ \;\;\;\;\frac{5}{81} \cdot \sqrt[3]{\frac{1}{{x}^{8}}} + \left(\sqrt[3]{\frac{1}{x \cdot x}} \cdot \frac{1}{3} - \frac{1}{9} \cdot \sqrt[3]{\frac{1}{{x}^{5}}}\right)\\ \end{array}\]

Reproduce

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

Details

Time bar (total: 2.5m)Debug log

sample84.0ms

Algorithm
intervals

simplify8.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 27.7b

localize23.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))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
3 → 36
Calls

3 calls. Slowest were:

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

series496.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

307.0ms
(cbrt x)
137.0ms
(- (cbrt (+ x 1)) (cbrt x))
52.0ms
(cbrt (+ x 1))

simplify1.0s

Counts
20 → 45
Calls

20 calls. Slowest were:

288.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)))))
255.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
144.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))))

prune455.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 13.8b

localize12.0ms

Local error

Found 4 expressions with local error:

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

rewrite36.0ms

Algorithm
rewrite-expression-head
Counts
4 → 71
Calls

4 calls. Slowest were:

22.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
12.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
1.0ms
(cbrt (+ x 1))

series531.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

324.0ms
(cbrt x)
113.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
52.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
41.0ms
(cbrt (+ x 1))

simplify2.5s

Counts
49 → 83
Calls

49 calls. Slowest were:

278.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)))))
259.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
221.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))))

prune1.0s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 13.8b

localize23.0ms

Local error

Found 4 expressions with local error:

6.0b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1)))))) (cbrt x))
0.6b
(cbrt x)
0.3b
(cbrt (+ x 1))
0.3b
(cbrt (+ x 1))

rewrite93.0ms

Algorithm
rewrite-expression-head
Counts
4 → 48
Calls

4 calls. Slowest were:

90.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1)))))) (cbrt x))
1.0ms
(cbrt (+ x 1))
1.0ms
(cbrt (+ x 1))

series530.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

314.0ms
(cbrt x)
135.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1)))) (cbrt (cbrt (+ x 1)))))) (cbrt x))
41.0ms
(cbrt (+ x 1))
40.0ms
(cbrt (+ x 1))

simplify1.4s

Counts
26 → 60
Calls

26 calls. Slowest were:

229.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)))))
201.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
186.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))))

prune621.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 13.8b

localize57.0ms

Local error

Found 4 expressions with local error:

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

rewrite426.0ms

Algorithm
rewrite-expression-head
Counts
4 → 772
Calls

4 calls. Slowest were:

176.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt (cbrt (+ x 1)))))) (cbrt x))
149.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt (cbrt (+ x 1))))))
1.0ms
(cbrt (+ x 1))

series481.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

296.0ms
(cbrt x)
121.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt (cbrt (+ x 1)))))) (cbrt x))
33.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt (cbrt (+ x 1))))))
32.0ms
(cbrt (+ x 1))

simplify2.1m

Counts
750 → 784
Calls

750 calls. Slowest were:

674.0ms
(cbrt (* (* (cbrt (+ (pow x 3) (pow 1 3))) (cbrt (- (* x x) (* 1 1)))) (* (* (cbrt (cbrt (+ (pow x 3) (pow 1 3)))) (cbrt (* (cbrt (sqrt (+ (pow x 3) (pow 1 3)))) (cbrt (sqrt (+ (pow x 3) (pow 1 3))))))) (cbrt (cbrt (- (* x x) (* 1 1)))))))
555.0ms
(cbrt (* (* (cbrt (- (* x x) (* 1 1))) (cbrt (- (* x x) (* 1 1)))) (* (* (cbrt (cbrt (+ x 1))) (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt (cbrt (- (* x x) (* 1 1)))))))
426.0ms
(cbrt (* (* (cbrt (+ (pow x 3) (pow 1 3))) (cbrt (+ x 1))) (* (* (cbrt (cbrt (- (* x x) (* 1 1)))) (cbrt (* (cbrt (sqrt (- (* x x) (* 1 1)))) (cbrt (sqrt (+ (pow x 3) (pow 1 3))))))) (cbrt (cbrt (+ (pow x 3) (pow 1 3)))))))

prune11.8s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 13.8b

regimes71.0ms

Accuracy

99.6% (0.1b remaining)

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

bsearch49.0ms

end0.0ms

sample1.8s

Algorithm
intervals