| Alternative 1 | |
|---|---|
| Error | 99.2% |
| Cost | 39168.00 |
\[\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, {t_0}^{2}\right)}
\end{array}
\]
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (+ 1.0 x)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) t_0) (/ 1.0 (pow t_0 -2.0))))))
double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
double code(double x) {
double t_0 = cbrt((1.0 + x));
return 1.0 / fma(cbrt(x), (cbrt(x) + t_0), (1.0 / pow(t_0, -2.0)));
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
function code(x) t_0 = cbrt(Float64(1.0 + x)) return Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + t_0), Float64(1.0 / (t_0 ^ -2.0)))) end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision] + N[(1.0 / N[Power[t$95$0, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\sqrt[3]{x + 1} - \sqrt[3]{x}
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t_0, \frac{1}{{t_0}^{-2}}\right)}
\end{array}
Initial program 53.7
Applied egg-rr54.5
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-rr76.6
Applied egg-rr99.2
Applied egg-rr99.2
Final simplification99.2
| Alternative 1 | |
|---|---|
| Error | 99.2% |
| Cost | 39168.00 |
| Alternative 2 | |
|---|---|
| Error | 89.1% |
| Cost | 33224.00 |
| Alternative 3 | |
|---|---|
| Error | 88.3% |
| Cost | 33032.00 |
| Alternative 4 | |
|---|---|
| Error | 80.3% |
| Cost | 26704.00 |
| Alternative 5 | |
|---|---|
| Error | 76.8% |
| Cost | 26441.00 |
| Alternative 6 | |
|---|---|
| Error | 76.8% |
| Cost | 13769.00 |
| Alternative 7 | |
|---|---|
| Error | 76.8% |
| Cost | 13385.00 |
| Alternative 8 | |
|---|---|
| Error | 74.8% |
| Cost | 7113.00 |
| Alternative 9 | |
|---|---|
| Error | 75.4% |
| Cost | 7113.00 |
| Alternative 10 | |
|---|---|
| Error | 75.9% |
| Cost | 7113.00 |
| Alternative 11 | |
|---|---|
| Error | 51.2% |
| Cost | 6592.00 |
| Alternative 12 | |
|---|---|
| Error | 3.6% |
| Cost | 64.00 |
| Alternative 13 | |
|---|---|
| Error | 50.4% |
| Cost | 64.00 |
herbie shell --seed 2023098
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
(- (cbrt (+ x 1.0)) (cbrt x)))