Average Error: 30.0 → 0.4
Time: 13.1s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le 5125.6460996421965:\\ \;\;\;\;\frac{{\left(\sqrt[3]{1 + x}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}}{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x} \cdot \sqrt[3]{1 + x}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{1}{3} + \frac{\frac{-1}{9}}{x}\right) + \frac{\frac{\frac{5}{81}}{x}}{x}\right) \cdot \frac{\sqrt[3]{x}}{x}\\ \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 < 5125.6460996421965

    1. Initial program 0.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied flip3--0.2

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

    if 5125.6460996421965 < x

    1. Initial program 60.1

      \[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
    2. Using strategy rm
    3. Applied pow1/359.5

      \[\leadsto \sqrt[3]{x + 1} - \color{blue}{{x}^{\frac{1}{3}}}\]
    4. Taylor expanded around -inf 62.4

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

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

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

Reproduce

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

Details

Time bar (total: 11.9s)Debug log

sample110.0ms

Algorithm
intervals

simplify4.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 30.3b

localize16.0ms

Local error

Found 3 expressions with local error:

2.8b
(- (cbrt (+ x 1)) (cbrt x))
0.6b
(cbrt x)
0.2b
(cbrt (+ x 1))

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 36
Calls

3 calls. Slowest were:

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

series485.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

352.0ms
(cbrt x)
101.0ms
(- (cbrt (+ x 1)) (cbrt x))
31.0ms
(cbrt (+ x 1))

simplify1.0s

Counts
20 → 45
Calls

20 calls. Slowest were:

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

prune495.0ms

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 15.5b

localize22.0ms

Local error

Found 3 expressions with local error:

30.7b
(- (cbrt (+ x 1)) (pow x 1/3))
4.9b
(pow x 1/3)
0.2b
(cbrt (+ x 1))

rewrite13.0ms

Algorithm
rewrite-expression-head
Counts
3 → 37
Calls

3 calls. Slowest were:

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

series440.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

274.0ms
(pow x 1/3)
127.0ms
(- (cbrt (+ x 1)) (pow x 1/3))
39.0ms
(cbrt (+ x 1))

simplify1.1s

Counts
20 → 46
Calls

20 calls. Slowest were:

352.0ms
(- (+ (* 5/81 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 3))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) x))) (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (pow x 2))))
234.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
213.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))))

prune436.0ms

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.3b

localize29.0ms

Local error

Found 4 expressions with local error:

30.7b
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
4.9b
(pow x 1/3)
4.9b
(pow x 1/3)
4.9b
(pow x 1/3)

rewrite24.0ms

Algorithm
rewrite-expression-head
Counts
4 → 40
Calls

4 calls. Slowest were:

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

series977.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

288.0ms
(pow x 1/3)
268.0ms
(pow x 1/3)
264.0ms
(pow x 1/3)
156.0ms
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))

simplify725.0ms

Counts
15 → 52
Calls

15 calls. Slowest were:

212.0ms
(- (+ (* 2/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 2/3)))
126.0ms
(exp (* 1/3 (- (log -1) (log (/ -1 x)))))
111.0ms
(exp (* 1/3 (- (log -1) (log (/ -1 x)))))

prune542.0ms

Pruning

8 alts after pruning (7 fresh and 1 done)

Merged error: 0.3b

localize22.0ms

Local error

Found 4 expressions with local error:

30.7b
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
30.7b
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
4.9b
(pow x 1/3)
4.9b
(pow x 1/3)

rewrite27.0ms

Algorithm
rewrite-expression-head
Counts
4 → 44
Calls

4 calls. Slowest were:

14.0ms
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
12.0ms
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
0.0ms
(pow x 1/3)

series794.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

322.0ms
(pow x 1/3)
240.0ms
(pow x 1/3)
126.0ms
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))
106.0ms
(- (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (pow x 1/3) (pow x 1/3)))

simplify1.1s

Counts
18 → 56
Calls

18 calls. Slowest were:

242.0ms
(- (+ (* 2/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 2/3)))
175.0ms
(- (+ (* 2/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 2/3)))
136.0ms
(exp (* 1/3 (- (log -1) (log (/ -1 x)))))

prune752.0ms

Pruning

8 alts after pruning (6 fresh and 2 done)

Merged error: 0.3b

regimes65.0ms

Accuracy

99.7% (0.1b remaining)

Error of 0.4b against oracle of 0.3b and baseline of 29.7b

bsearch64.0ms

end0.0ms

sample2.6s

Algorithm
intervals