Average Error: 29.7 → 15.9
Time: 24.0s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le 4129.268046035321:\\ \;\;\;\;\sqrt[3]{\left(\sqrt[3]{\sqrt[3]{\sqrt{1 + x}}} \cdot \left(\left(\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}\right) \cdot \sqrt[3]{\sqrt{1 + x}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{\sqrt{1 + x}} \cdot \sqrt[3]{\sqrt{1 + x}}}} - \sqrt[3]{x}\\ \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(\sqrt[3]{\frac{1}{{x}^{8}}} \cdot \frac{5}{81}\right))_*\right))_*\\ \end{array}\]

Error

Bits error versus x

Derivation

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

    1. Initial program 0.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied add-cbrt-cube0.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-sqr-sqrt0.1

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

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

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

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

      \[\leadsto \sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt{x + 1}}}\right) \cdot \sqrt[3]{\sqrt{x + 1}}\right)} - \color{blue}{\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}}\]
    12. Applied *-un-lft-identity0.1

      \[\leadsto \color{blue}{1 \cdot \sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt{x + 1}}}\right) \cdot \sqrt[3]{\sqrt{x + 1}}\right)}} - \sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\]
    13. Applied prod-diff0.1

      \[\leadsto \color{blue}{(1 \cdot \left(\sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}} \cdot \sqrt[3]{\sqrt[3]{\sqrt{x + 1}}}\right) \cdot \sqrt[3]{\sqrt{x + 1}}\right)}\right) + \left(-\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\right))_* + (\left(-\sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x}}\right) + \left(\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\right))_*}\]
    14. Simplified0.1

      \[\leadsto \color{blue}{\left(\sqrt[3]{\left(\sqrt[3]{\sqrt[3]{\sqrt{x + 1}}} \cdot \left(\sqrt[3]{\sqrt{x + 1}} \cdot \left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right)\right)\right) \cdot \sqrt[3]{\sqrt[3]{\sqrt{x + 1}} \cdot \sqrt[3]{\sqrt{x + 1}}}} - \sqrt[3]{x}\right)} + (\left(-\sqrt{\sqrt[3]{x}}\right) \cdot \left(\sqrt{\sqrt[3]{x}}\right) + \left(\sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\right))_*\]
    15. Simplified0.1

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

    if 4129.268046035321 < x

    1. Initial program 60.2

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

      \[\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. Taylor expanded around inf 34.2

      \[\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}}}\]
    5. Simplified32.1

      \[\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.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 4129.268046035321:\\ \;\;\;\;\sqrt[3]{\left(\sqrt[3]{\sqrt[3]{\sqrt{1 + x}}} \cdot \left(\left(\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}\right) \cdot \sqrt[3]{\sqrt{1 + x}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{\sqrt{1 + x}} \cdot \sqrt[3]{\sqrt{1 + x}}}} - \sqrt[3]{x}\\ \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(\sqrt[3]{\frac{1}{{x}^{8}}} \cdot \frac{5}{81}\right))_*\right))_*\\ \end{array}\]

Reproduce

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

Details

Time bar (total: 22.5s)Debug log

sample108.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: 33.5b

localize16.0ms

Local error

Found 3 expressions with local error:

3.3b
(- (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:

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

series402.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

250.0ms
(cbrt x)
121.0ms
(- (cbrt (+ x 1)) (cbrt x))
31.0ms
(cbrt (+ x 1))

simplify1.8s

Counts
61 → 75
Calls

61 calls. Slowest were:

321.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)))))
315.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
178.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))))

prune567.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 20.0b

localize11.0ms

Local error

Found 4 expressions with local error:

3.3b
(- (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))

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
4 → 95
Calls

4 calls. Slowest were:

16.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
9.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
1.0ms
(cbrt (+ x 1))

series479.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

282.0ms
(cbrt x)
108.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
50.0ms
(cbrt (+ x 1))
40.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))

simplify3.9s

Counts
76 → 107
Calls

76 calls. Slowest were:

466.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)))))
358.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
262.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.5s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 20.0b

localize20.0ms

Local error

Found 4 expressions with local error:

5.3b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (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)))

rewrite46.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

41.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt x))
2.0ms
(cbrt (sqrt (+ x 1)))
2.0ms
(cbrt (sqrt (+ x 1)))

series535.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

310.0ms
(cbrt x)
138.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1)))))) (cbrt x))
54.0ms
(cbrt (sqrt (+ x 1)))
33.0ms
(cbrt (sqrt (+ x 1)))

simplify2.6s

Counts
59 → 90
Calls

59 calls. Slowest were:

423.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)))))
297.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
179.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))))

prune1.3s

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 20.0b

localize46.0ms

Local error

Found 4 expressions with local error:

7.9b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1))))) (cbrt (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)))

rewrite161.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

156.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1))))) (cbrt (cbrt (sqrt (+ x 1))))) (cbrt (sqrt (+ x 1)))))) (cbrt x))
2.0ms
(cbrt (sqrt (+ x 1)))
2.0ms
(cbrt (sqrt (+ x 1)))

series496.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

273.0ms
(cbrt x)
133.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (* (cbrt (* (cbrt (sqrt (+ x 1))) (cbrt (sqrt (+ x 1))))) (cbrt (cbrt (sqrt (+ x 1))))) (cbrt (sqrt (+ x 1)))))) (cbrt x))
54.0ms
(cbrt (sqrt (+ x 1)))
35.0ms
(cbrt (sqrt (+ x 1)))

simplify4.3s

Counts
59 → 90
Calls

59 calls. Slowest were:

401.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)))))
352.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
253.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))))

prune1.3s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 19.9b

regimes93.0ms

Accuracy

99.6% (0.1b remaining)

Error of 15.9b against oracle of 15.9b and baseline of 29.7b

bsearch71.0ms

end0.0ms

sample2.7s

Algorithm
intervals