Average Error: 30.0 → 3.2
Time: 29.0s
Precision: 64
Internal Precision: 128
\[\sqrt[3]{x + 1} - \sqrt[3]{x}\]
\[\begin{array}{l} \mathbf{if}\;x \le 3603.6679047512384:\\ \;\;\;\;e^{\log \left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \left(\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}\right)} - \sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;e^{\left(\left(\log \frac{1}{3} - \log x\right) + \frac{\frac{7}{54}}{x \cdot x}\right) + \left(\log x \cdot \frac{1}{3} - \frac{\frac{1}{3}}{x}\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 < 3603.6679047512384

    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-exp-log0.1

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

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

    if 3603.6679047512384 < x

    1. Initial program 60.3

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

      \[\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-exp-log60.3

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

      \[\leadsto e^{\log \color{blue}{\left(\sqrt{\sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}} - \sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{\left(\sqrt[3]{x + 1} \cdot \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{x + 1}} - \sqrt[3]{x}}\right)}}\]
    8. Taylor expanded around inf 6.1

      \[\leadsto e^{\color{blue}{\left(\log \left(\frac{1}{3} \cdot {x}^{\frac{1}{3}}\right) + \left(\log \left(\frac{1}{x}\right) + \frac{7}{54} \cdot \frac{1}{{x}^{2}}\right)\right) - \frac{1}{3} \cdot \frac{1}{x}}}\]
    9. Simplified6.4

      \[\leadsto e^{\color{blue}{\left(\log x \cdot \frac{1}{3} - \frac{\frac{1}{3}}{x}\right) + \left(\left(\log \frac{1}{3} - \log x\right) + \frac{\frac{7}{54}}{x \cdot x}\right)}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification3.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le 3603.6679047512384:\\ \;\;\;\;e^{\log \left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \left(\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}\right)} - \sqrt{\sqrt[3]{x}} \cdot \sqrt{\sqrt[3]{x}}\right)}\\ \mathbf{else}:\\ \;\;\;\;e^{\left(\left(\log \frac{1}{3} - \log x\right) + \frac{\frac{7}{54}}{x \cdot x}\right) + \left(\log x \cdot \frac{1}{3} - \frac{\frac{1}{3}}{x}\right)}\\ \end{array}\]

Reproduce

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

Details

Time bar (total: 26.5s)Debug log

sample154.0ms

Algorithm
intervals
Results
43.0ms277×body80nan
35.0ms58×body1280valid
20.0ms42×body640valid
15.0ms127×body80valid
9.0ms24×body320valid
1.0msbody160valid

simplify9.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
9.0ms
(- (cbrt (+ x 1)) (cbrt x))

prune11.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 31.0b

localize30.0ms

Local error

Found 3 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Rules
add-sqr-sqrt
*-un-lft-identity
add-log-exp
add-cube-cbrt
cbrt-prod
add-exp-log
add-cbrt-cube
pow1
difference-of-squares
pow1/3
cbrt-div
distribute-lft-out--
flip--
flip-+
diff-log
flip3--
flip3-+
sub-neg
Counts
3 → 36
Calls
3 calls:
Slowest
13.0ms
(- (cbrt (+ x 1)) (cbrt x))
1.0ms
(cbrt (+ x 1))
0.0ms
(cbrt x)

series672.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
442.0ms
(cbrt x)
166.0ms
(- (cbrt (+ x 1)) (cbrt x))
64.0ms
(cbrt (+ x 1))

simplify1.4s

Counts
20 → 45
Calls
20 calls:
Slowest
367.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)))))
331.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
270.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))))
92.0ms
(- (+ (* 1/3 (pow (/ 1 (pow x 2)) 1/3)) (* 5/81 (pow (/ 1 (pow x 8)) 1/3))) (* 1/9 (pow (/ 1 (pow x 5)) 1/3)))
92.0ms
(- (+ (* 1/3 x) 1) (* 1/9 (pow x 2)))

prune695.0ms

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 16.7b

localize30.0ms

Local error

Found 4 expressions with local error:

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

rewrite72.0ms

Algorithm
rewrite-expression-head
Rules
92×cbrt-div
33×flip-+
33×flip3-+
32×frac-times
16×associate-*l/
10×associate-*r/
10×*-un-lft-identity
10×add-sqr-sqrt
pow1
add-cube-cbrt
cbrt-prod
add-log-exp
add-exp-log
associate-*l*
associate-*r*
pow1/3
add-cbrt-cube
pow-prod-up
pow-prod-down
difference-of-squares
distribute-lft-out--
flip--
cbrt-unprod
rem-cbrt-cube
*-commutative
prod-exp
pow3
diff-log
flip3--
pow-plus
sub-neg
pow2
Counts
4 → 94
Calls
4 calls:
Slowest
33.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
22.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
12.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))
0.0ms
(cbrt x)

series744.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
445.0ms
(cbrt x)
165.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
68.0ms
(cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))
66.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))

simplify4.5s

Counts
76 → 106
Calls
76 calls:
Slowest
461.0ms
(cbrt (* (* (cbrt (- (* x x) (* 1 1))) (cbrt (- (* x x) (* 1 1)))) (cbrt (- (* x x) (* 1 1)))))
362.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)))))
332.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
266.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))))
120.0ms
(cbrt (* (* (cbrt (- (* x x) (* 1 1))) (cbrt (- (* x x) (* 1 1)))) (cbrt (+ (pow x 3) (pow 1 3)))))

prune2.0s

Pruning

11 alts after pruning (10 fresh and 1 done)

Merged error: 16.7b

localize18.0ms

Local error

Found 4 expressions with local error:

9.4b
(log (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))
2.7b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
0.6b
(cbrt x)
0.3b
(* (cbrt (+ x 1)) (cbrt (+ x 1)))

rewrite109.0ms

Algorithm
rewrite-expression-head
Rules
13×*-un-lft-identity
13×add-sqr-sqrt
12×cbrt-div
10×pow1
add-cube-cbrt
add-exp-log
add-log-exp
flip-+
associate-*l*
associate-*r*
flip3-+
cbrt-prod
pow1/3
log-prod
add-cbrt-cube
frac-times
difference-of-squares
distribute-lft-out--
flip--
pow-prod-up
associate-*r/
associate-*l/
pow-prod-down
flip3--
log-div
cbrt-unprod
*-commutative
log-pow
prod-exp
rem-log-exp
diff-log
pow-plus
sub-neg
pow2
Counts
4 → 74
Calls
4 calls:
Slowest
63.0ms
(log (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))
32.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
12.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))
0.0ms
(cbrt x)

series860.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
441.0ms
(cbrt x)
193.0ms
(log (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))
160.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
65.0ms
(* (cbrt (+ x 1)) (cbrt (+ x 1)))

simplify2.9s

Counts
56 → 86
Calls
56 calls:
Slowest
369.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)))))
334.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
233.0ms
(- (+ (log (* 1/3 (pow x 1/3))) (+ (log (/ 1 x)) (* 7/54 (/ 1 (pow x 2))))) (* 1/3 (/ 1 x)))
221.0ms
(- (+ (* 1/3 (/ x (- 1 (pow x 1/3)))) (log (- 1 (pow x 1/3)))) (+ (* 1/9 (/ (pow x 2) (- 1 (pow x 1/3)))) (* 1/18 (/ (pow x 2) (pow (- 1 (pow x 1/3)) 2)))))
186.0ms
(- (+ (log (- (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* (pow (* x -1) 1/3) (cbrt -1)))) (* 1/3 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* x (- (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* (pow (* x -1) 1/3) (cbrt -1))))))) (+ (* 1/9 (/ (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* (pow x 2) (- (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* (pow (* x -1) 1/3) (cbrt -1)))))) (* 1/18 (/ (pow (exp (* 1/3 (- (log -1) (log (/ -1 x))))) 2) (* (pow x 2) (pow (- (exp (* 1/3 (- (log -1) (log (/ -1 x))))) (* (pow (* x -1) 1/3) (cbrt -1))) 2))))))

prune1.8s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 2.3b

localize37.0ms

Local error

Found 4 expressions with local error:

9.4b
(log (* (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))) (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))))
2.7b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
2.7b
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
0.6b
(cbrt x)

rewrite331.0ms

Algorithm
rewrite-expression-head
Rules
12×sqrt-div
10×pow1
add-log-exp
flip--
flip3--
*-un-lft-identity
log-div
add-sqr-sqrt
log-pow
add-exp-log
add-cube-cbrt
pow1/2
add-cbrt-cube
frac-times
difference-of-squares
distribute-lft-out--
pow-prod-up
associate-*r/
associate-*l/
pow-prod-down
rem-log-exp
diff-log
sub-neg
prod-exp
pow1/3
pow-plus
log-prod
pow2
Counts
4 → 61
Calls
4 calls:
Slowest
265.0ms
(log (* (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))) (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))))
32.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
32.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
0.0ms
(cbrt x)

series954.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
439.0ms
(cbrt x)
197.0ms
(log (* (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))) (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))))
159.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))
158.0ms
(- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x))

simplify3.7s

Counts
34 → 73
Calls
34 calls:
Slowest
373.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)))))
366.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)))))
341.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
331.0ms
(- (+ (* 1/3 x) 1) (+ (* 1/9 (pow x 2)) (pow x 1/3)))
248.0ms
(log (* (sqrt (- (* (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1))))) (* (cbrt x) (cbrt x)))) (sqrt (- (cbrt (* (* (cbrt (+ x 1)) (cbrt (+ x 1))) (cbrt (+ x 1)))) (cbrt x)))))

prune1.7s

Pruning

9 alts after pruning (9 fresh and 0 done)

Merged error: 2.3b

regimes132.0ms

Accuracy

96.4% (1.0b remaining)

Error of 3.2b against oracle of 2.2b and baseline of 30.1b

bsearch112.0ms

end0.0ms

sample3.6s

Algorithm
intervals
Results
1.1s1776×body1280valid
943.0ms8083×body80nan
587.0ms1277×body640valid
495.0ms4068×body80valid
222.0ms590×body320valid
61.0ms289×body160valid