
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
public static double code(double x) {
return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt[3]{x + 1} - \sqrt[3]{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x) :precision binary64 (- (cbrt (+ x 1.0)) (cbrt x)))
double code(double x) {
return cbrt((x + 1.0)) - cbrt(x);
}
public static double code(double x) {
return Math.cbrt((x + 1.0)) - Math.cbrt(x);
}
function code(x) return Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) end
code[x_] := N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt[3]{x + 1} - \sqrt[3]{x}
\end{array}
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(/
1.0
(fma
(cbrt x)
(/ (+ x (+ 1.0 x)) (+ (pow t_0 2.0) (* (cbrt x) (- (cbrt x) t_0))))
(/ 1.0 (pow (/ 1.0 t_0) 2.0))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
return 1.0 / fma(cbrt(x), ((x + (1.0 + x)) / (pow(t_0, 2.0) + (cbrt(x) * (cbrt(x) - t_0)))), (1.0 / pow((1.0 / t_0), 2.0)));
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) return Float64(1.0 / fma(cbrt(x), Float64(Float64(x + Float64(1.0 + x)) / Float64((t_0 ^ 2.0) + Float64(cbrt(x) * Float64(cbrt(x) - t_0)))), Float64(1.0 / (Float64(1.0 / t_0) ^ 2.0)))) end
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[(x + N[(1.0 + x), $MachinePrecision]), $MachinePrecision] / N[(N[Power[t$95$0, 2.0], $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[Power[N[(1.0 / t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \frac{x + \left(1 + x\right)}{{t\_0}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} - t\_0\right)}, \frac{1}{{\left(\frac{1}{t\_0}\right)}^{2}}\right)}
\end{array}
\end{array}
Initial program 7.2%
flip3--7.2%
div-inv7.2%
rem-cube-cbrt7.0%
rem-cube-cbrt9.3%
+-commutative9.3%
distribute-rgt-out9.3%
+-commutative9.3%
fma-define9.3%
add-exp-log9.3%
Applied egg-rr9.3%
associate-*r/9.3%
*-rgt-identity9.3%
+-commutative9.3%
associate--l+93.4%
+-inverses93.4%
metadata-eval93.4%
+-commutative93.4%
exp-prod92.5%
Simplified92.5%
add-sqr-sqrt92.5%
unpow-prod-down94.1%
Applied egg-rr94.1%
pow-sqr94.1%
Simplified94.1%
Applied egg-rr98.5%
flip3-+98.5%
+-commutative98.5%
rem-cube-cbrt99.0%
rem-cube-cbrt99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
pow299.4%
+-commutative99.4%
+-commutative99.4%
distribute-rgt-out--99.4%
+-commutative99.4%
Applied egg-rr99.4%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= x 5e+135)
(/ 1.0 (fma (cbrt x) (+ (cbrt x) t_0) (cbrt (pow (+ 1.0 x) 2.0))))
(/ 1.0 (fma (cbrt x) (* (cbrt x) 2.0) (/ 1.0 (pow (/ 1.0 t_0) 2.0)))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if (x <= 5e+135) {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) + t_0), cbrt(pow((1.0 + x), 2.0)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), (1.0 / pow((1.0 / t_0), 2.0)));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 5e+135) tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + t_0), cbrt((Float64(1.0 + x) ^ 2.0)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), Float64(1.0 / (Float64(1.0 / t_0) ^ 2.0)))); end return tmp end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x, 5e+135], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision] + N[Power[N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision] + N[(1.0 / N[Power[N[(1.0 / t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;x \leq 5 \cdot 10^{+135}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t\_0, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, \frac{1}{{\left(\frac{1}{t\_0}\right)}^{2}}\right)}\\
\end{array}
\end{array}
if x < 5.00000000000000029e135Initial program 9.8%
flip3--9.8%
div-inv9.8%
rem-cube-cbrt11.0%
rem-cube-cbrt14.0%
+-commutative14.0%
distribute-rgt-out14.0%
+-commutative14.0%
fma-define14.1%
add-exp-log14.0%
Applied egg-rr14.0%
associate-*r/14.0%
*-rgt-identity14.0%
+-commutative14.0%
associate--l+94.6%
+-inverses94.6%
metadata-eval94.6%
+-commutative94.6%
exp-prod94.2%
Simplified94.2%
add-sqr-sqrt94.2%
unpow-prod-down95.4%
Applied egg-rr95.4%
pow-sqr95.4%
Simplified95.4%
Applied egg-rr99.1%
if 5.00000000000000029e135 < x Initial program 4.6%
flip3--4.6%
div-inv4.6%
rem-cube-cbrt3.1%
rem-cube-cbrt4.6%
+-commutative4.6%
distribute-rgt-out4.6%
+-commutative4.6%
fma-define4.6%
add-exp-log4.6%
Applied egg-rr4.6%
associate-*r/4.6%
*-rgt-identity4.6%
+-commutative4.6%
associate--l+92.3%
+-inverses92.3%
metadata-eval92.3%
+-commutative92.3%
exp-prod90.9%
Simplified90.9%
add-sqr-sqrt90.9%
unpow-prod-down92.9%
Applied egg-rr92.9%
pow-sqr92.9%
Simplified92.9%
Applied egg-rr98.4%
Taylor expanded in x around inf 98.4%
*-commutative98.4%
Simplified98.4%
Final simplification98.7%
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (+ 1.0 x)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) t_0) (/ 1.0 (pow (/ 1.0 t_0) 2.0))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
return 1.0 / fma(cbrt(x), (cbrt(x) + t_0), (1.0 / pow((1.0 / t_0), 2.0)));
}
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 / (Float64(1.0 / t_0) ^ 2.0)))) end
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[N[(1.0 / t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t\_0, \frac{1}{{\left(\frac{1}{t\_0}\right)}^{2}}\right)}
\end{array}
\end{array}
Initial program 7.2%
flip3--7.2%
div-inv7.2%
rem-cube-cbrt7.0%
rem-cube-cbrt9.3%
+-commutative9.3%
distribute-rgt-out9.3%
+-commutative9.3%
fma-define9.3%
add-exp-log9.3%
Applied egg-rr9.3%
associate-*r/9.3%
*-rgt-identity9.3%
+-commutative9.3%
associate--l+93.4%
+-inverses93.4%
metadata-eval93.4%
+-commutative93.4%
exp-prod92.5%
Simplified92.5%
add-sqr-sqrt92.5%
unpow-prod-down94.1%
Applied egg-rr94.1%
pow-sqr94.1%
Simplified94.1%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (+ 1.0 x)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) t_0) (* t_0 t_0)))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
return 1.0 / fma(cbrt(x), (cbrt(x) + t_0), (t_0 * t_0));
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) return Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + t_0), Float64(t_0 * t_0))) end
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[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t\_0, t\_0 \cdot t\_0\right)}
\end{array}
\end{array}
Initial program 7.2%
flip3--7.2%
div-inv7.2%
rem-cube-cbrt7.0%
rem-cube-cbrt9.3%
+-commutative9.3%
distribute-rgt-out9.3%
+-commutative9.3%
fma-define9.3%
add-exp-log9.3%
Applied egg-rr9.3%
associate-*r/9.3%
*-rgt-identity9.3%
+-commutative9.3%
associate--l+93.4%
+-inverses93.4%
metadata-eval93.4%
+-commutative93.4%
exp-prod92.5%
Simplified92.5%
add-sqr-sqrt92.5%
unpow-prod-down94.1%
Applied egg-rr94.1%
pow-sqr94.1%
Simplified94.1%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= x 5e+14)
(/ (- (+ 1.0 x) x) (+ (pow t_0 2.0) (* (cbrt x) (+ (cbrt x) t_0))))
(/ 1.0 (fma (cbrt x) (* (cbrt x) 2.0) (/ 1.0 (pow (/ 1.0 t_0) 2.0)))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if (x <= 5e+14) {
tmp = ((1.0 + x) - x) / (pow(t_0, 2.0) + (cbrt(x) * (cbrt(x) + t_0)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), (1.0 / pow((1.0 / t_0), 2.0)));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 5e+14) tmp = Float64(Float64(Float64(1.0 + x) - x) / Float64((t_0 ^ 2.0) + Float64(cbrt(x) * Float64(cbrt(x) + t_0)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), Float64(1.0 / (Float64(1.0 / t_0) ^ 2.0)))); end return tmp end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x, 5e+14], N[(N[(N[(1.0 + x), $MachinePrecision] - x), $MachinePrecision] / N[(N[Power[t$95$0, 2.0], $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision] + N[(1.0 / N[Power[N[(1.0 / t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;x \leq 5 \cdot 10^{+14}:\\
\;\;\;\;\frac{\left(1 + x\right) - x}{{t\_0}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t\_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, \frac{1}{{\left(\frac{1}{t\_0}\right)}^{2}}\right)}\\
\end{array}
\end{array}
if x < 5e14Initial program 64.5%
pow1/362.7%
pow-to-exp63.8%
Applied egg-rr63.8%
exp-to-pow62.7%
pow1/364.5%
add-cube-cbrt64.0%
pow364.8%
metadata-eval64.8%
pow-pow62.3%
pow1/363.5%
flip3--63.5%
Applied egg-rr98.7%
if 5e14 < x Initial program 4.1%
flip3--4.1%
div-inv4.1%
rem-cube-cbrt3.4%
rem-cube-cbrt4.5%
+-commutative4.5%
distribute-rgt-out4.5%
+-commutative4.5%
fma-define4.5%
add-exp-log4.5%
Applied egg-rr4.5%
associate-*r/4.5%
*-rgt-identity4.5%
+-commutative4.5%
associate--l+93.2%
+-inverses93.2%
metadata-eval93.2%
+-commutative93.2%
exp-prod92.3%
Simplified92.3%
add-sqr-sqrt92.3%
unpow-prod-down93.9%
Applied egg-rr93.9%
pow-sqr93.9%
Simplified93.9%
Applied egg-rr98.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= x 1e+19)
(/
1.0
(+ (* (cbrt x) (+ (cbrt x) t_0)) (exp (* (log1p x) 0.6666666666666666))))
(/ 1.0 (fma (cbrt x) (* (cbrt x) 2.0) (/ 1.0 (pow (/ 1.0 t_0) 2.0)))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if (x <= 1e+19) {
tmp = 1.0 / ((cbrt(x) * (cbrt(x) + t_0)) + exp((log1p(x) * 0.6666666666666666)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), (1.0 / pow((1.0 / t_0), 2.0)));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 1e+19) tmp = Float64(1.0 / Float64(Float64(cbrt(x) * Float64(cbrt(x) + t_0)) + exp(Float64(log1p(x) * 0.6666666666666666)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), Float64(1.0 / (Float64(1.0 / t_0) ^ 2.0)))); end return tmp end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x, 1e+19], N[(1.0 / N[(N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[Exp[N[(N[Log[1 + x], $MachinePrecision] * 0.6666666666666666), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision] + N[(1.0 / N[Power[N[(1.0 / t$95$0), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;x \leq 10^{+19}:\\
\;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t\_0\right) + e^{\mathsf{log1p}\left(x\right) \cdot 0.6666666666666666}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, \frac{1}{{\left(\frac{1}{t\_0}\right)}^{2}}\right)}\\
\end{array}
\end{array}
if x < 1e19Initial program 53.0%
flip3--52.8%
div-inv52.8%
rem-cube-cbrt61.6%
rem-cube-cbrt86.6%
+-commutative86.6%
distribute-rgt-out86.7%
+-commutative86.7%
fma-define86.9%
add-exp-log86.2%
Applied egg-rr86.2%
associate-*r/86.2%
*-rgt-identity86.2%
+-commutative86.2%
associate--l+98.0%
+-inverses98.0%
metadata-eval98.0%
+-commutative98.0%
exp-prod98.0%
Simplified98.0%
fma-undefine97.9%
+-commutative97.9%
+-commutative97.9%
Applied egg-rr97.9%
add-exp-log98.2%
log-pow98.2%
rem-log-exp98.2%
Applied egg-rr98.2%
if 1e19 < x Initial program 4.1%
flip3--4.1%
div-inv4.1%
rem-cube-cbrt3.4%
rem-cube-cbrt4.1%
+-commutative4.1%
distribute-rgt-out4.1%
+-commutative4.1%
fma-define4.1%
add-exp-log4.1%
Applied egg-rr4.1%
associate-*r/4.1%
*-rgt-identity4.1%
+-commutative4.1%
associate--l+93.1%
+-inverses93.1%
metadata-eval93.1%
+-commutative93.1%
exp-prod92.2%
Simplified92.2%
add-sqr-sqrt92.2%
unpow-prod-down93.9%
Applied egg-rr93.9%
pow-sqr93.9%
Simplified93.9%
Applied egg-rr98.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= x 1e+19)
(/
1.0
(+ (* (cbrt x) (+ (cbrt x) t_0)) (exp (* (log1p x) 0.6666666666666666))))
(/ 1.0 (fma (cbrt x) (* (cbrt x) 2.0) (* t_0 t_0))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if (x <= 1e+19) {
tmp = 1.0 / ((cbrt(x) * (cbrt(x) + t_0)) + exp((log1p(x) * 0.6666666666666666)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), (t_0 * t_0));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 1e+19) tmp = Float64(1.0 / Float64(Float64(cbrt(x) * Float64(cbrt(x) + t_0)) + exp(Float64(log1p(x) * 0.6666666666666666)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), Float64(t_0 * t_0))); end return tmp end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x, 1e+19], N[(1.0 / N[(N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision] + N[Exp[N[(N[Log[1 + x], $MachinePrecision] * 0.6666666666666666), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision] + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;x \leq 10^{+19}:\\
\;\;\;\;\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x} + t\_0\right) + e^{\mathsf{log1p}\left(x\right) \cdot 0.6666666666666666}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, t\_0 \cdot t\_0\right)}\\
\end{array}
\end{array}
if x < 1e19Initial program 53.0%
flip3--52.8%
div-inv52.8%
rem-cube-cbrt61.6%
rem-cube-cbrt86.6%
+-commutative86.6%
distribute-rgt-out86.7%
+-commutative86.7%
fma-define86.9%
add-exp-log86.2%
Applied egg-rr86.2%
associate-*r/86.2%
*-rgt-identity86.2%
+-commutative86.2%
associate--l+98.0%
+-inverses98.0%
metadata-eval98.0%
+-commutative98.0%
exp-prod98.0%
Simplified98.0%
fma-undefine97.9%
+-commutative97.9%
+-commutative97.9%
Applied egg-rr97.9%
add-exp-log98.2%
log-pow98.2%
rem-log-exp98.2%
Applied egg-rr98.2%
if 1e19 < x Initial program 4.1%
flip3--4.1%
div-inv4.1%
rem-cube-cbrt3.4%
rem-cube-cbrt4.1%
+-commutative4.1%
distribute-rgt-out4.1%
+-commutative4.1%
fma-define4.1%
add-exp-log4.1%
Applied egg-rr4.1%
associate-*r/4.1%
*-rgt-identity4.1%
+-commutative4.1%
associate--l+93.1%
+-inverses93.1%
metadata-eval93.1%
+-commutative93.1%
exp-prod92.2%
Simplified92.2%
add-sqr-sqrt92.2%
unpow-prod-down93.9%
Applied egg-rr93.9%
pow-sqr93.9%
Simplified93.9%
Taylor expanded in x around inf 93.9%
*-commutative98.5%
Simplified93.9%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(let* ((t_0 (* (cbrt x) 2.0)))
(if (<= x 1.35e+154)
(/ 1.0 (fma (cbrt x) t_0 (cbrt (pow (+ 1.0 x) 2.0))))
(/ 1.0 (fma (cbrt x) t_0 (exp (* (log1p x) 0.6666666666666666)))))))
double code(double x) {
double t_0 = cbrt(x) * 2.0;
double tmp;
if (x <= 1.35e+154) {
tmp = 1.0 / fma(cbrt(x), t_0, cbrt(pow((1.0 + x), 2.0)));
} else {
tmp = 1.0 / fma(cbrt(x), t_0, exp((log1p(x) * 0.6666666666666666)));
}
return tmp;
}
function code(x) t_0 = Float64(cbrt(x) * 2.0) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(1.0 / fma(cbrt(x), t_0, cbrt((Float64(1.0 + x) ^ 2.0)))); else tmp = Float64(1.0 / fma(cbrt(x), t_0, exp(Float64(log1p(x) * 0.6666666666666666)))); end return tmp end
code[x_] := Block[{t$95$0 = N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[x, 1.35e+154], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0 + N[Power[N[Power[N[(1.0 + x), $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0 + N[Exp[N[(N[Log[1 + x], $MachinePrecision] * 0.6666666666666666), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{x} \cdot 2\\
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t\_0, \sqrt[3]{{\left(1 + x\right)}^{2}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, t\_0, e^{\mathsf{log1p}\left(x\right) \cdot 0.6666666666666666}\right)}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.2%
flip3--9.2%
div-inv9.2%
rem-cube-cbrt10.3%
rem-cube-cbrt13.0%
+-commutative13.0%
distribute-rgt-out13.0%
+-commutative13.0%
fma-define13.1%
add-exp-log13.0%
Applied egg-rr13.0%
associate-*r/13.0%
*-rgt-identity13.0%
+-commutative13.0%
associate--l+94.4%
+-inverses94.4%
metadata-eval94.4%
+-commutative94.4%
exp-prod93.9%
Simplified93.9%
add-sqr-sqrt93.9%
unpow-prod-down95.2%
Applied egg-rr95.2%
pow-sqr95.2%
Simplified95.2%
Taylor expanded in x around inf 91.4%
*-commutative94.8%
Simplified91.4%
Applied egg-rr95.1%
if 1.35000000000000003e154 < x Initial program 4.7%
flip3--4.7%
div-inv4.7%
rem-cube-cbrt3.1%
rem-cube-cbrt4.7%
+-commutative4.7%
distribute-rgt-out4.7%
+-commutative4.7%
fma-define4.7%
add-exp-log4.7%
Applied egg-rr4.7%
associate-*r/4.7%
*-rgt-identity4.7%
+-commutative4.7%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
+-commutative92.2%
exp-prod90.9%
Simplified90.9%
add-sqr-sqrt90.9%
unpow-prod-down92.9%
Applied egg-rr92.9%
pow-sqr92.9%
Simplified92.9%
Taylor expanded in x around inf 92.9%
*-commutative98.4%
Simplified92.9%
add-exp-log92.3%
pow-unpow91.0%
log-pow92.2%
pow292.2%
add-sqr-sqrt92.2%
rem-log-exp92.2%
Applied egg-rr92.2%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0))))
(/
1.0
(fma (cbrt x) (* (cbrt x) 2.0) (exp (* (log1p x) 0.6666666666666666))))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * cbrt((1.0 / pow(x, 2.0)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), exp((log1p(x) * 0.6666666666666666)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), exp(Float64(log1p(x) * 0.6666666666666666)))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] * 2.0), $MachinePrecision] + N[Exp[N[(N[Log[1 + x], $MachinePrecision] * 0.6666666666666666), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, e^{\mathsf{log1p}\left(x\right) \cdot 0.6666666666666666}\right)}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.2%
Taylor expanded in x around inf 94.6%
if 1.35000000000000003e154 < x Initial program 4.7%
flip3--4.7%
div-inv4.7%
rem-cube-cbrt3.1%
rem-cube-cbrt4.7%
+-commutative4.7%
distribute-rgt-out4.7%
+-commutative4.7%
fma-define4.7%
add-exp-log4.7%
Applied egg-rr4.7%
associate-*r/4.7%
*-rgt-identity4.7%
+-commutative4.7%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
+-commutative92.2%
exp-prod90.9%
Simplified90.9%
add-sqr-sqrt90.9%
unpow-prod-down92.9%
Applied egg-rr92.9%
pow-sqr92.9%
Simplified92.9%
Taylor expanded in x around inf 92.9%
*-commutative98.4%
Simplified92.9%
add-exp-log92.3%
pow-unpow91.0%
log-pow92.2%
pow292.2%
add-sqr-sqrt92.2%
rem-log-exp92.2%
Applied egg-rr92.2%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0))))
(/
1.0
(+ (pow (exp 0.6666666666666666) (log1p x)) (* 2.0 (pow (cbrt x) 2.0))))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * cbrt((1.0 / pow(x, 2.0)));
} else {
tmp = 1.0 / (pow(exp(0.6666666666666666), log1p(x)) + (2.0 * pow(cbrt(x), 2.0)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * Math.cbrt((1.0 / Math.pow(x, 2.0)));
} else {
tmp = 1.0 / (Math.pow(Math.exp(0.6666666666666666), Math.log1p(x)) + (2.0 * Math.pow(Math.cbrt(x), 2.0)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0)))); else tmp = Float64(1.0 / Float64((exp(0.6666666666666666) ^ log1p(x)) + Float64(2.0 * (cbrt(x) ^ 2.0)))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[N[Exp[0.6666666666666666], $MachinePrecision], N[Log[1 + x], $MachinePrecision]], $MachinePrecision] + N[(2.0 * N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{{\left(e^{0.6666666666666666}\right)}^{\left(\mathsf{log1p}\left(x\right)\right)} + 2 \cdot {\left(\sqrt[3]{x}\right)}^{2}}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.2%
Taylor expanded in x around inf 94.6%
if 1.35000000000000003e154 < x Initial program 4.7%
flip3--4.7%
div-inv4.7%
rem-cube-cbrt3.1%
rem-cube-cbrt4.7%
+-commutative4.7%
distribute-rgt-out4.7%
+-commutative4.7%
fma-define4.7%
add-exp-log4.7%
Applied egg-rr4.7%
associate-*r/4.7%
*-rgt-identity4.7%
+-commutative4.7%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
+-commutative92.2%
exp-prod90.9%
Simplified90.9%
add-sqr-sqrt90.9%
unpow-prod-down92.9%
Applied egg-rr92.9%
pow-sqr92.9%
Simplified92.9%
Taylor expanded in x around inf 92.9%
*-commutative98.4%
Simplified92.9%
fma-undefine92.9%
+-commutative92.9%
pow-unpow90.8%
pow290.8%
add-sqr-sqrt90.8%
associate-*r*90.8%
pow290.8%
Applied egg-rr90.8%
Final simplification92.9%
(FPCore (x) :precision binary64 (/ 1.0 (+ (* (cbrt x) (+ (cbrt x) (cbrt (+ 1.0 x)))) (exp (* (log1p x) 0.6666666666666666)))))
double code(double x) {
return 1.0 / ((cbrt(x) * (cbrt(x) + cbrt((1.0 + x)))) + exp((log1p(x) * 0.6666666666666666)));
}
public static double code(double x) {
return 1.0 / ((Math.cbrt(x) * (Math.cbrt(x) + Math.cbrt((1.0 + x)))) + Math.exp((Math.log1p(x) * 0.6666666666666666)));
}
function code(x) return Float64(1.0 / Float64(Float64(cbrt(x) * Float64(cbrt(x) + cbrt(Float64(1.0 + x)))) + exp(Float64(log1p(x) * 0.6666666666666666)))) end
code[x_] := N[(1.0 / N[(N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Exp[N[(N[Log[1 + x], $MachinePrecision] * 0.6666666666666666), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right) + e^{\mathsf{log1p}\left(x\right) \cdot 0.6666666666666666}}
\end{array}
Initial program 7.2%
flip3--7.2%
div-inv7.2%
rem-cube-cbrt7.0%
rem-cube-cbrt9.3%
+-commutative9.3%
distribute-rgt-out9.3%
+-commutative9.3%
fma-define9.3%
add-exp-log9.3%
Applied egg-rr9.3%
associate-*r/9.3%
*-rgt-identity9.3%
+-commutative9.3%
associate--l+93.4%
+-inverses93.4%
metadata-eval93.4%
+-commutative93.4%
exp-prod92.5%
Simplified92.5%
fma-undefine92.5%
+-commutative92.5%
+-commutative92.5%
Applied egg-rr92.5%
add-exp-log92.5%
log-pow93.5%
rem-log-exp93.5%
Applied egg-rr93.5%
Final simplification93.5%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) (cbrt (+ 1.0 x))) 1.0))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * cbrt((1.0 / pow(x, 2.0)));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) + cbrt((1.0 + x))), 1.0);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0)))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + cbrt(Float64(1.0 + x))), 1.0)); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + \sqrt[3]{1 + x}, 1\right)}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.2%
Taylor expanded in x around inf 94.6%
if 1.35000000000000003e154 < x Initial program 4.7%
flip3--4.7%
div-inv4.7%
rem-cube-cbrt3.1%
rem-cube-cbrt4.7%
+-commutative4.7%
distribute-rgt-out4.7%
+-commutative4.7%
fma-define4.7%
add-exp-log4.7%
Applied egg-rr4.7%
associate-*r/4.7%
*-rgt-identity4.7%
+-commutative4.7%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
+-commutative92.2%
exp-prod90.9%
Simplified90.9%
add-sqr-sqrt90.9%
unpow-prod-down92.9%
Applied egg-rr92.9%
pow-sqr92.9%
Simplified92.9%
Applied egg-rr98.4%
Taylor expanded in x around 0 20.0%
Final simplification61.1%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))) (/ 1.0 (+ 1.0 (* (cbrt x) (+ 1.0 (cbrt x)))))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * cbrt((1.0 / pow(x, 2.0)));
} else {
tmp = 1.0 / (1.0 + (cbrt(x) * (1.0 + cbrt(x))));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * Math.cbrt((1.0 / Math.pow(x, 2.0)));
} else {
tmp = 1.0 / (1.0 + (Math.cbrt(x) * (1.0 + Math.cbrt(x))));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0)))); else tmp = Float64(1.0 / Float64(1.0 + Float64(cbrt(x) * Float64(1.0 + cbrt(x))))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 + N[(N[Power[x, 1/3], $MachinePrecision] * N[(1.0 + N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{1 + \sqrt[3]{x} \cdot \left(1 + \sqrt[3]{x}\right)}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.2%
Taylor expanded in x around inf 94.6%
if 1.35000000000000003e154 < x Initial program 4.7%
flip3--4.7%
div-inv4.7%
rem-cube-cbrt3.1%
rem-cube-cbrt4.7%
+-commutative4.7%
distribute-rgt-out4.7%
+-commutative4.7%
fma-define4.7%
add-exp-log4.7%
Applied egg-rr4.7%
associate-*r/4.7%
*-rgt-identity4.7%
+-commutative4.7%
associate--l+92.2%
+-inverses92.2%
metadata-eval92.2%
+-commutative92.2%
exp-prod90.9%
Simplified90.9%
Taylor expanded in x around 0 17.7%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))))
double code(double x) {
return 0.3333333333333333 * cbrt((1.0 / pow(x, 2.0)));
}
public static double code(double x) {
return 0.3333333333333333 * Math.cbrt((1.0 / Math.pow(x, 2.0)));
}
function code(x) return Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0)))) end
code[x_] := N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}
\end{array}
Initial program 7.2%
Taylor expanded in x around inf 54.2%
(FPCore (x) :precision binary64 (- (cbrt (+ 1.0 x)) (cbrt x)))
double code(double x) {
return cbrt((1.0 + x)) - cbrt(x);
}
public static double code(double x) {
return Math.cbrt((1.0 + x)) - Math.cbrt(x);
}
function code(x) return Float64(cbrt(Float64(1.0 + x)) - cbrt(x)) end
code[x_] := N[(N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt[3]{1 + x} - \sqrt[3]{x}
\end{array}
Initial program 7.2%
Final simplification7.2%
(FPCore (x) :precision binary64 (cbrt x))
double code(double x) {
return cbrt(x);
}
public static double code(double x) {
return Math.cbrt(x);
}
function code(x) return cbrt(x) end
code[x_] := N[Power[x, 1/3], $MachinePrecision]
\begin{array}{l}
\\
\sqrt[3]{x}
\end{array}
Initial program 7.2%
Taylor expanded in x around 0 1.8%
sub-neg1.8%
rem-square-sqrt0.0%
fabs-sqr0.0%
rem-square-sqrt5.5%
fabs-neg5.5%
unpow1/35.5%
metadata-eval5.5%
pow-sqr5.5%
fabs-sqr5.5%
pow-sqr5.5%
metadata-eval5.5%
unpow1/35.5%
Simplified5.5%
Taylor expanded in x around inf 5.5%
(FPCore (x) :precision binary64 (* x 0.0))
double code(double x) {
return x * 0.0;
}
real(8) function code(x)
real(8), intent (in) :: x
code = x * 0.0d0
end function
public static double code(double x) {
return x * 0.0;
}
def code(x): return x * 0.0
function code(x) return Float64(x * 0.0) end
function tmp = code(x) tmp = x * 0.0; end
code[x_] := N[(x * 0.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 0
\end{array}
Initial program 7.2%
sub-neg7.2%
+-commutative7.2%
add-sqr-sqrt7.1%
distribute-rgt-neg-in7.1%
fma-define7.0%
pow1/38.7%
sqrt-pow18.7%
metadata-eval8.7%
pow1/38.5%
sqrt-pow18.5%
metadata-eval8.5%
Applied egg-rr8.5%
Taylor expanded in x around inf 4.1%
distribute-rgt1-in4.1%
metadata-eval4.1%
mul0-lft4.1%
Simplified4.1%
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (+ x 1.0)))) (/ 1.0 (+ (+ (* t_0 t_0) (* (cbrt x) t_0)) (* (cbrt x) (cbrt x))))))
double code(double x) {
double t_0 = cbrt((x + 1.0));
return 1.0 / (((t_0 * t_0) + (cbrt(x) * t_0)) + (cbrt(x) * cbrt(x)));
}
public static double code(double x) {
double t_0 = Math.cbrt((x + 1.0));
return 1.0 / (((t_0 * t_0) + (Math.cbrt(x) * t_0)) + (Math.cbrt(x) * Math.cbrt(x)));
}
function code(x) t_0 = cbrt(Float64(x + 1.0)) return Float64(1.0 / Float64(Float64(Float64(t_0 * t_0) + Float64(cbrt(x) * t_0)) + Float64(cbrt(x) * cbrt(x)))) end
code[x_] := Block[{t$95$0 = N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision]}, N[(1.0 / N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{x + 1}\\
\frac{1}{\left(t\_0 \cdot t\_0 + \sqrt[3]{x} \cdot t\_0\right) + \sqrt[3]{x} \cdot \sqrt[3]{x}}
\end{array}
\end{array}
herbie shell --seed 2024146
(FPCore (x)
:name "2cbrt (problem 3.3.4)"
:precision binary64
:pre (and (> x 1.0) (< x 1e+308))
:alt
(! :herbie-platform default (/ 1 (+ (* (cbrt (+ x 1)) (cbrt (+ x 1))) (* (cbrt x) (cbrt (+ x 1))) (* (cbrt x) (cbrt x)))))
(- (cbrt (+ x 1.0)) (cbrt x)))