| Alternative 1 | |
|---|---|
| Accuracy | 61.0% |
| Cost | 39108 |
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x) :precision binary64 (/ 1.0 (+ (pow (cbrt x) 2.0) (pow (/ (cbrt (/ 1.0 (+ 1.0 x))) (+ (cbrt x) (cbrt (+ 1.0 x)))) -1.0))))
double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
return 1.0 / (pow(cbrt(x), 2.0) + pow((cbrt((1.0 / (1.0 + x))) / (cbrt(x) + cbrt((1.0 + x)))), -1.0));
}
public static double code(double x) {
return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
public static double code(double x) {
return 1.0 / (Math.pow(Math.cbrt(x), 2.0) + Math.pow((Math.cbrt((1.0 / (1.0 + x))) / (Math.cbrt(x) + Math.cbrt((1.0 + x)))), -1.0));
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
function code(x) return Float64(1.0 / Float64((cbrt(x) ^ 2.0) + (Float64(cbrt(Float64(1.0 / Float64(1.0 + x))) / Float64(cbrt(x) + cbrt(Float64(1.0 + x)))) ^ -1.0))) end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
code[x_] := N[(1.0 / N[(N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[Power[N[(1.0 / N[(1.0 + x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[x, 1/3], $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + {\left(\frac{\sqrt[3]{\frac{1}{1 + x}}}{\sqrt[3]{x} + \sqrt[3]{1 + x}}\right)}^{-1}}
Results
Initial program 53.6%
Applied egg-rr54.5%
[Start]53.6 | \[ \sqrt[3]{x + 1} - \sqrt[3]{x}
\] |
|---|---|
flip3-- [=>]53.7 | \[ \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)}}
\] |
div-inv [=>]53.7 | \[ \color{blue}{\left({\left(\sqrt[3]{x + 1}\right)}^{3} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\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)}}
\] |
rem-cube-cbrt [=>]53.5 | \[ \left(\color{blue}{\left(x + 1\right)} - {\left(\sqrt[3]{x}\right)}^{3}\right) \cdot \frac{1}{\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)}
\] |
rem-cube-cbrt [=>]54.5 | \[ \left(\left(x + 1\right) - \color{blue}{x}\right) \cdot \frac{1}{\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)}
\] |
pow2 [=>]54.5 | \[ \left(\left(x + 1\right) - x\right) \cdot \frac{1}{\color{blue}{{\left(\sqrt[3]{x + 1}\right)}^{2}} + \left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{x + 1} \cdot \sqrt[3]{x}\right)}
\] |
distribute-rgt-out [=>]54.5 | \[ \left(\left(x + 1\right) - x\right) \cdot \frac{1}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \color{blue}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right)}}
\] |
+-commutative [<=]54.5 | \[ \left(\left(x + 1\right) - x\right) \cdot \frac{1}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \color{blue}{\left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}}
\] |
Simplified99.2%
[Start]54.5 | \[ \left(\left(x + 1\right) - x\right) \cdot \frac{1}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
|---|---|
associate-*r/ [=>]54.5 | \[ \color{blue}{\frac{\left(\left(x + 1\right) - x\right) \cdot 1}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}}
\] |
*-rgt-identity [=>]54.5 | \[ \frac{\color{blue}{\left(x + 1\right) - x}}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
+-commutative [=>]54.5 | \[ \frac{\color{blue}{\left(1 + x\right)} - x}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
associate--l+ [=>]99.2 | \[ \frac{\color{blue}{1 + \left(x - x\right)}}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
+-inverses [=>]99.2 | \[ \frac{1 + \color{blue}{0}}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
metadata-eval [=>]99.2 | \[ \frac{\color{blue}{1}}{{\left(\sqrt[3]{x + 1}\right)}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right)}
\] |
+-commutative [=>]99.2 | \[ \frac{1}{\color{blue}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x + 1} + \sqrt[3]{x}\right) + {\left(\sqrt[3]{x + 1}\right)}^{2}}}
\] |
fma-def [=>]99.2 | \[ \frac{1}{\color{blue}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x + 1} + \sqrt[3]{x}, {\left(\sqrt[3]{x + 1}\right)}^{2}\right)}}
\] |
+-commutative [=>]99.2 | \[ \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{\color{blue}{1 + x}} + \sqrt[3]{x}, {\left(\sqrt[3]{x + 1}\right)}^{2}\right)}
\] |
+-commutative [=>]99.2 | \[ \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(\sqrt[3]{\color{blue}{1 + x}}\right)}^{2}\right)}
\] |
Applied egg-rr99.2%
[Start]99.2 | \[ \frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{1 + x} + \sqrt[3]{x}, {\left(\sqrt[3]{1 + x}\right)}^{2}\right)}
\] |
|---|---|
fma-udef [=>]99.2 | \[ \frac{1}{\color{blue}{\sqrt[3]{x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) + {\left(\sqrt[3]{1 + x}\right)}^{2}}}
\] |
distribute-rgt-in [=>]99.2 | \[ \frac{1}{\color{blue}{\left(\sqrt[3]{1 + x} \cdot \sqrt[3]{x} + \sqrt[3]{x} \cdot \sqrt[3]{x}\right)} + {\left(\sqrt[3]{1 + x}\right)}^{2}}
\] |
+-commutative [<=]99.2 | \[ \frac{1}{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{1 + x} \cdot \sqrt[3]{x}\right)} + {\left(\sqrt[3]{1 + x}\right)}^{2}}
\] |
associate-+l+ [=>]99.2 | \[ \frac{1}{\color{blue}{\sqrt[3]{x} \cdot \sqrt[3]{x} + \left(\sqrt[3]{1 + x} \cdot \sqrt[3]{x} + {\left(\sqrt[3]{1 + x}\right)}^{2}\right)}}
\] |
unpow2 [=>]99.2 | \[ \frac{1}{\sqrt[3]{x} \cdot \sqrt[3]{x} + \left(\sqrt[3]{1 + x} \cdot \sqrt[3]{x} + \color{blue}{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}}\right)}
\] |
distribute-lft-in [<=]99.2 | \[ \frac{1}{\sqrt[3]{x} \cdot \sqrt[3]{x} + \color{blue}{\sqrt[3]{1 + x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)}}
\] |
+-commutative [<=]99.2 | \[ \frac{1}{\sqrt[3]{x} \cdot \sqrt[3]{x} + \sqrt[3]{1 + x} \cdot \color{blue}{\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right)}}
\] |
pow2 [=>]99.2 | \[ \frac{1}{\color{blue}{{\left(\sqrt[3]{x}\right)}^{2}} + \sqrt[3]{1 + x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right)}
\] |
Applied egg-rr76.0%
[Start]99.2 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \sqrt[3]{1 + x} \cdot \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right)}
\] |
|---|---|
*-commutative [=>]99.2 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \color{blue}{\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) \cdot \sqrt[3]{1 + x}}}
\] |
flip-+ [=>]75.8 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) \cdot \sqrt[3]{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 - x}}}}
\] |
cbrt-div [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) \cdot \color{blue}{\frac{\sqrt[3]{1 \cdot 1 - x \cdot x}}{\sqrt[3]{1 - x}}}}
\] |
associate-*r/ [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \color{blue}{\frac{\left(\sqrt[3]{1 + x} + \sqrt[3]{x}\right) \cdot \sqrt[3]{1 \cdot 1 - x \cdot x}}{\sqrt[3]{1 - x}}}}
\] |
+-commutative [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \frac{\color{blue}{\left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right)} \cdot \sqrt[3]{1 \cdot 1 - x \cdot x}}{\sqrt[3]{1 - x}}}
\] |
+-commutative [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \frac{\left(\sqrt[3]{x} + \sqrt[3]{\color{blue}{x + 1}}\right) \cdot \sqrt[3]{1 \cdot 1 - x \cdot x}}{\sqrt[3]{1 - x}}}
\] |
metadata-eval [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \frac{\left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{\color{blue}{1} - x \cdot x}}{\sqrt[3]{1 - x}}}
\] |
Applied egg-rr99.3%
[Start]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \frac{\left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{1 - x \cdot x}}{\sqrt[3]{1 - x}}}
\] |
|---|---|
clear-num [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \color{blue}{\frac{1}{\frac{\sqrt[3]{1 - x}}{\left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{1 - x \cdot x}}}}}
\] |
inv-pow [=>]76.0 | \[ \frac{1}{{\left(\sqrt[3]{x}\right)}^{2} + \color{blue}{{\left(\frac{\sqrt[3]{1 - x}}{\left(\sqrt[3]{x} + \sqrt[3]{x + 1}\right) \cdot \sqrt[3]{1 - x \cdot x}}\right)}^{-1}}}
\] |
Final simplification99.3%
| Alternative 1 | |
|---|---|
| Accuracy | 61.0% |
| Cost | 39108 |
| Alternative 2 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 33096 |
| Alternative 3 | |
|---|---|
| Accuracy | 61.1% |
| Cost | 33092 |
| Alternative 4 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 33032 |
| Alternative 5 | |
|---|---|
| Accuracy | 99.2% |
| Cost | 33024 |
| Alternative 6 | |
|---|---|
| Accuracy | 99.3% |
| Cost | 33024 |
| Alternative 7 | |
|---|---|
| Accuracy | 99.2% |
| Cost | 32896 |
| Alternative 8 | |
|---|---|
| Accuracy | 79.2% |
| Cost | 26960 |
| Alternative 9 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 26952 |
| Alternative 10 | |
|---|---|
| Accuracy | 88.5% |
| Cost | 26824 |
| Alternative 11 | |
|---|---|
| Accuracy | 87.4% |
| Cost | 26760 |
| Alternative 12 | |
|---|---|
| Accuracy | 56.8% |
| Cost | 26308 |
| Alternative 13 | |
|---|---|
| Accuracy | 60.0% |
| Cost | 13512 |
| Alternative 14 | |
|---|---|
| Accuracy | 60.0% |
| Cost | 13449 |
| Alternative 15 | |
|---|---|
| Accuracy | 52.4% |
| Cost | 6848 |
| Alternative 16 | |
|---|---|
| Accuracy | 3.6% |
| Cost | 64 |
| Alternative 17 | |
|---|---|
| Accuracy | 49.9% |
| Cost | 64 |
herbie shell --seed 2023131
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))