Average Error: 30.1 → 15.8
Time: 24.1s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le 3090.3660099001336:\\ \;\;\;\;(\left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{\left(\left(\sqrt[3]{1 + x} \cdot \left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right) \cdot \sqrt[3]{1 + x}}}\right) + \left(\left(-\sqrt[3]{\sqrt[3]{x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{x}} \cdot \sqrt[3]{\sqrt[3]{x}}\right)\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(\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 < 3090.3660099001336

    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-cube-cbrt0.1

      \[\leadsto \sqrt[3]{\left(\sqrt[3]{x + 1} \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)}\right) \cdot \sqrt[3]{x + 1}} - \sqrt[3]{x}\]
    6. Applied associate-*r*0.1

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

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

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

      \[\leadsto (\color{blue}{\left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)} \cdot \left(\sqrt[3]{\sqrt[3]{\left(\left(\sqrt[3]{x + 1} \cdot \left(\sqrt[3]{\sqrt[3]{x + 1}} \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{x + 1}}\right) \cdot \sqrt[3]{x + 1}}}\right) + \left(-\sqrt[3]{x}\right))_*\]
    11. Using strategy rm
    12. Applied add-cube-cbrt0.2

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

    if 3090.3660099001336 < 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. 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}}}\]
    5. 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.8

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

Reproduce

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

Details

Time bar (total: 22.2s)Debug log

sample103.0ms

Algorithm
intervals

simplify8.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 32.3b

localize22.0ms

Local error

Found 3 expressions with local error:

3.3b
(- (cbrt (+ x 1)) (cbrt x))
0.5b
(cbrt x)
0.3b
(cbrt (+ x 1))

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
3 → 66
Calls

3 calls. Slowest were:

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

series481.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

295.0ms
(cbrt x)
134.0ms
(- (cbrt (+ x 1)) (cbrt x))
52.0ms
(cbrt (+ x 1))

simplify2.1s

Counts
61 → 75
Calls

61 calls. Slowest were:

352.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)))))
338.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
295.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))))

prune633.0ms

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 16.4b

localize25.0ms

Local error

Found 4 expressions with local error:

3.3b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
0.5b
(cbrt x)
0.3b
(* (cbrt (+ x 1)) (cbrt (+ x 1)))
0.3b
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))

rewrite62.0ms

Algorithm
rewrite-expression-head
Counts
4 → 118
Calls

4 calls. Slowest were:

30.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
20.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
10.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))

series488.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

304.0ms
(cbrt x)
87.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
51.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
45.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))

simplify4.5s

Counts
103 → 130
Calls

103 calls. Slowest were:

324.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
323.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)))))
277.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

8 alts after pruning (8 fresh and 0 done)

Merged error: 16.4b

localize38.0ms

Local error

Found 4 expressions with local error:

9.4b
(- (cbrt (* (* (* (cbrt (+ x 1)) (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1))))) (cbrt (cbrt (+ x 1)))) (cbrt (+ x 1)))) (cbrt x))
0.5b
(cbrt x)
0.3b
(cbrt (cbrt (+ x 1)))
0.3b
(cbrt (cbrt (+ x 1)))

rewrite132.0ms

Algorithm
rewrite-expression-head
Counts
4 → 78
Calls

4 calls. Slowest were:

127.0ms
(- (cbrt (* (* (* (cbrt (+ x 1)) (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1))))) (cbrt (cbrt (+ x 1)))) (cbrt (+ x 1)))) (cbrt x))
2.0ms
(cbrt (cbrt (+ x 1)))
2.0ms
(cbrt (cbrt (+ x 1)))

series501.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

268.0ms
(cbrt x)
136.0ms
(- (cbrt (* (* (* (cbrt (+ x 1)) (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1))))) (cbrt (cbrt (+ x 1)))) (cbrt (+ x 1)))) (cbrt x))
53.0ms
(cbrt (cbrt (+ x 1)))
44.0ms
(cbrt (cbrt (+ x 1)))

simplify4.0s

Counts
59 → 90
Calls

59 calls. Slowest were:

461.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)))))
407.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
222.0ms
(- (+ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) (* 1/9 (/ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) x))) (* 4/81 (/ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune1.2s

Pruning

8 alts after pruning (8 fresh and 0 done)

Merged error: 16.4b

localize22.0ms

Local error

Found 4 expressions with local error:

32.2b
(fma (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (* (* (* (cbrt (+ x 1)) (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1))))) (cbrt (cbrt (+ x 1)))) (cbrt (+ x 1))))) (- (cbrt x)))
0.5b
(cbrt x)
0.3b
(cbrt (cbrt (+ x 1)))
0.3b
(cbrt (cbrt (+ x 1)))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
4 → 56
Calls

4 calls. Slowest were:

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

series403.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

234.0ms
(cbrt x)
104.0ms
(fma (* (cbrt (cbrt (+ 1 x))) (cbrt (cbrt (+ 1 x)))) (cbrt (cbrt (* (* (* (cbrt (+ x 1)) (* (cbrt (cbrt (+ x 1))) (cbrt (cbrt (+ x 1))))) (cbrt (cbrt (+ x 1)))) (cbrt (+ x 1))))) (- (cbrt x)))
33.0ms
(cbrt (cbrt (+ x 1)))
31.0ms
(cbrt (cbrt (+ x 1)))

simplify1.8s

Counts
28 → 68
Calls

28 calls. Slowest were:

416.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
257.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))))
223.0ms
(- (+ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) (* 1/9 (/ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) x))) (* 4/81 (/ (exp (* 1/9 (- (log -1) (log (/ -1 x))))) (pow x 2))))

prune1.2s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 16.4b

regimes127.0ms

Accuracy

99.5% (0.1b remaining)

Error of 15.8b against oracle of 15.7b and baseline of 30.2b

bsearch116.0ms

end0.0ms

sample2.7s

Algorithm
intervals