
(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 16 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))))
(* t_0 t_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)))), (t_0 * t_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(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[(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[(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}, \frac{x + \left(1 + x\right)}{{t\_0}^{2} + \sqrt[3]{x} \cdot \left(\sqrt[3]{x} - t\_0\right)}, t\_0 \cdot t\_0\right)}
\end{array}
\end{array}
Initial program 6.6%
flip3--6.6%
div-inv6.6%
rem-cube-cbrt6.0%
rem-cube-cbrt8.7%
+-commutative8.7%
distribute-rgt-out8.6%
+-commutative8.6%
fma-define8.6%
add-exp-log8.6%
Applied egg-rr8.6%
associate-*r/8.6%
*-rgt-identity8.6%
+-commutative8.6%
associate--l+93.3%
+-inverses93.3%
metadata-eval93.3%
+-commutative93.3%
exp-prod92.4%
Simplified92.4%
add-sqr-sqrt92.4%
unpow-prod-down94.2%
Applied egg-rr94.2%
pow-sqr94.2%
Simplified94.2%
sqr-pow94.2%
pow294.2%
pow-to-exp93.3%
*-commutative93.3%
associate-/l*93.3%
metadata-eval93.3%
*-commutative93.3%
*-un-lft-identity93.3%
pow1/293.3%
log-pow93.3%
rem-log-exp93.3%
metadata-eval93.3%
log1p-undefine93.3%
log-pow93.4%
add-exp-log93.0%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
flip3-+98.5%
+-commutative98.5%
rem-cube-cbrt99.1%
rem-cube-cbrt99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
pow299.5%
+-commutative99.5%
+-commutative99.5%
distribute-rgt-out--99.5%
+-commutative99.5%
Applied egg-rr99.5%
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (sqrt (+ 1.0 x)))) (t_1 (cbrt (+ 1.0 x)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) (* t_0 t_0)) (* t_1 t_1)))))
double code(double x) {
double t_0 = cbrt(sqrt((1.0 + x)));
double t_1 = cbrt((1.0 + x));
return 1.0 / fma(cbrt(x), (cbrt(x) + (t_0 * t_0)), (t_1 * t_1));
}
function code(x) t_0 = cbrt(sqrt(Float64(1.0 + x))) t_1 = cbrt(Float64(1.0 + x)) return Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + Float64(t_0 * t_0)), Float64(t_1 * t_1))) end
code[x_] := Block[{t$95$0 = N[Power[N[Sqrt[N[(1.0 + x), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = 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] + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{\sqrt{1 + x}}\\
t_1 := \sqrt[3]{1 + x}\\
\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t\_0 \cdot t\_0, t\_1 \cdot t\_1\right)}
\end{array}
\end{array}
Initial program 6.6%
flip3--6.6%
div-inv6.6%
rem-cube-cbrt6.0%
rem-cube-cbrt8.7%
+-commutative8.7%
distribute-rgt-out8.6%
+-commutative8.6%
fma-define8.6%
add-exp-log8.6%
Applied egg-rr8.6%
associate-*r/8.6%
*-rgt-identity8.6%
+-commutative8.6%
associate--l+93.3%
+-inverses93.3%
metadata-eval93.3%
+-commutative93.3%
exp-prod92.4%
Simplified92.4%
add-sqr-sqrt92.4%
unpow-prod-down94.2%
Applied egg-rr94.2%
pow-sqr94.2%
Simplified94.2%
sqr-pow94.2%
pow294.2%
pow-to-exp93.3%
*-commutative93.3%
associate-/l*93.3%
metadata-eval93.3%
*-commutative93.3%
*-un-lft-identity93.3%
pow1/293.3%
log-pow93.3%
rem-log-exp93.3%
metadata-eval93.3%
log1p-undefine93.3%
log-pow93.4%
add-exp-log93.0%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
pow1/394.5%
add-sqr-sqrt94.5%
unpow-prod-down94.5%
Applied egg-rr94.5%
unpow1/395.9%
unpow1/398.6%
Simplified98.6%
Final simplification98.6%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= (- t_0 (cbrt x)) 5e-11)
(/ 1.0 (fma (cbrt x) (* (cbrt x) 2.0) (* t_0 t_0)))
(/
1.0
(fma (cbrt x) (+ (cbrt x) t_0) (pow (+ 1.0 x) 0.6666666666666666))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if ((t_0 - cbrt(x)) <= 5e-11) {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), (t_0 * t_0));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) + t_0), pow((1.0 + x), 0.6666666666666666));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (Float64(t_0 - cbrt(x)) <= 5e-11) tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) * 2.0), Float64(t_0 * t_0))); else tmp = Float64(1.0 / fma(cbrt(x), Float64(cbrt(x) + t_0), (Float64(1.0 + x) ^ 0.6666666666666666))); end return tmp end
code[x_] := Block[{t$95$0 = N[Power[N[(1.0 + x), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[(t$95$0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 5e-11], 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], N[(1.0 / N[(N[Power[x, 1/3], $MachinePrecision] * N[(N[Power[x, 1/3], $MachinePrecision] + t$95$0), $MachinePrecision] + N[Power[N[(1.0 + x), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt[3]{1 + x}\\
\mathbf{if}\;t\_0 - \sqrt[3]{x} \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} \cdot 2, t\_0 \cdot t\_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(\sqrt[3]{x}, \sqrt[3]{x} + t\_0, {\left(1 + x\right)}^{0.6666666666666666}\right)}\\
\end{array}
\end{array}
if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 5.00000000000000018e-11Initial program 4.3%
flip3--4.3%
div-inv4.3%
rem-cube-cbrt3.3%
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+93.1%
+-inverses93.1%
metadata-eval93.1%
+-commutative93.1%
exp-prod92.1%
Simplified92.1%
add-sqr-sqrt92.1%
unpow-prod-down94.0%
Applied egg-rr94.0%
pow-sqr94.1%
Simplified94.1%
sqr-pow94.0%
pow294.0%
pow-to-exp93.1%
*-commutative93.1%
associate-/l*93.1%
metadata-eval93.1%
*-commutative93.1%
*-un-lft-identity93.1%
pow1/293.1%
log-pow93.1%
rem-log-exp93.1%
metadata-eval93.1%
log1p-undefine93.1%
log-pow93.2%
add-exp-log92.8%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
Simplified98.5%
if 5.00000000000000018e-11 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) Initial program 59.5%
flip3--59.3%
div-inv59.4%
rem-cube-cbrt65.4%
rem-cube-cbrt98.9%
+-commutative98.9%
distribute-rgt-out98.7%
+-commutative98.7%
fma-define98.6%
add-exp-log98.1%
Applied egg-rr97.9%
associate-*r/97.9%
*-rgt-identity97.9%
+-commutative97.9%
associate--l+97.9%
+-inverses97.9%
metadata-eval97.9%
+-commutative97.9%
exp-prod98.0%
Simplified98.0%
add-sqr-sqrt98.0%
unpow-prod-down98.2%
Applied egg-rr98.2%
pow-sqr98.4%
Simplified98.4%
sqr-pow98.2%
pow298.2%
pow-to-exp97.8%
*-commutative97.8%
associate-/l*97.8%
metadata-eval97.8%
*-commutative97.8%
*-un-lft-identity97.8%
pow1/297.8%
log-pow97.8%
rem-log-exp97.8%
metadata-eval97.8%
log1p-undefine97.8%
log-pow98.1%
add-exp-log98.6%
pow1/398.6%
pow298.6%
Applied egg-rr98.6%
pow298.6%
pow1/398.6%
pow-pow98.5%
metadata-eval98.5%
Applied egg-rr98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(let* ((t_0 (cbrt (+ 1.0 x))))
(if (<= x 1e+154)
(/ 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) (* t_0 t_0))))))
double code(double x) {
double t_0 = cbrt((1.0 + x));
double tmp;
if (x <= 1e+154) {
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), (t_0 * t_0));
}
return tmp;
}
function code(x) t_0 = cbrt(Float64(1.0 + x)) tmp = 0.0 if (x <= 1e+154) 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(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+154], 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[(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^{+154}:\\
\;\;\;\;\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, t\_0 \cdot t\_0\right)}\\
\end{array}
\end{array}
if x < 1.00000000000000004e154Initial program 8.4%
flip3--8.4%
div-inv8.4%
rem-cube-cbrt8.6%
rem-cube-cbrt12.3%
+-commutative12.3%
distribute-rgt-out12.3%
+-commutative12.3%
fma-define12.3%
add-exp-log12.2%
Applied egg-rr12.2%
associate-*r/12.2%
*-rgt-identity12.2%
+-commutative12.2%
associate--l+94.7%
+-inverses94.7%
metadata-eval94.7%
+-commutative94.7%
exp-prod93.9%
Simplified93.9%
add-sqr-sqrt93.9%
unpow-prod-down95.7%
Applied egg-rr95.7%
pow-sqr95.8%
Simplified95.8%
sqr-pow95.7%
pow295.7%
pow-to-exp94.7%
*-commutative94.7%
associate-/l*94.7%
metadata-eval94.7%
*-commutative94.7%
*-un-lft-identity94.7%
pow1/294.7%
log-pow94.7%
rem-log-exp94.7%
metadata-eval94.7%
log1p-undefine94.7%
log-pow94.8%
add-exp-log94.5%
pow1/398.5%
pow298.5%
cbrt-unprod98.9%
pow298.9%
Applied egg-rr98.9%
if 1.00000000000000004e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
unpow-prod-down92.6%
Applied egg-rr92.6%
pow-sqr92.6%
Simplified92.6%
sqr-pow92.6%
pow292.6%
pow-to-exp91.8%
*-commutative91.8%
associate-/l*91.8%
metadata-eval91.8%
*-commutative91.8%
*-un-lft-identity91.8%
pow1/291.8%
log-pow91.8%
rem-log-exp91.8%
metadata-eval91.8%
log1p-undefine91.8%
log-pow92.0%
add-exp-log91.5%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.7%
(FPCore (x) :precision binary64 (let* ((t_0 (cbrt (+ 1.0 x)))) (/ 1.0 (fma (cbrt x) (+ (cbrt x) t_0) (pow 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), pow(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), (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[Power[t$95$0, 2.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}^{2}\right)}
\end{array}
\end{array}
Initial program 6.6%
flip3--6.6%
div-inv6.6%
rem-cube-cbrt6.0%
rem-cube-cbrt8.7%
+-commutative8.7%
distribute-rgt-out8.6%
+-commutative8.6%
fma-define8.6%
add-exp-log8.6%
Applied egg-rr8.6%
associate-*r/8.6%
*-rgt-identity8.6%
+-commutative8.6%
associate--l+93.3%
+-inverses93.3%
metadata-eval93.3%
+-commutative93.3%
exp-prod92.4%
Simplified92.4%
add-sqr-sqrt92.4%
unpow-prod-down94.2%
Applied egg-rr94.2%
pow-sqr94.2%
Simplified94.2%
sqr-pow94.2%
pow294.2%
pow-to-exp93.3%
*-commutative93.3%
associate-/l*93.3%
metadata-eval93.3%
*-commutative93.3%
*-un-lft-identity93.3%
pow1/293.3%
log-pow93.3%
rem-log-exp93.3%
metadata-eval93.3%
log1p-undefine93.3%
log-pow93.4%
add-exp-log93.0%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
pow298.5%
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) (* t_0 t_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), (t_0 * t_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(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, 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[(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 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, t\_0 \cdot t\_0\right)}\\
\end{array}
\end{array}
if x < 5e14Initial program 59.5%
pow1/358.4%
pow-to-exp59.3%
Applied egg-rr59.3%
exp-to-pow58.4%
pow1/359.5%
add-cube-cbrt58.3%
pow358.4%
metadata-eval58.4%
pow-pow58.8%
pow1/358.1%
flip3--58.1%
Applied egg-rr98.7%
if 5e14 < x Initial program 4.3%
flip3--4.3%
div-inv4.3%
rem-cube-cbrt3.3%
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+93.1%
+-inverses93.1%
metadata-eval93.1%
+-commutative93.1%
exp-prod92.1%
Simplified92.1%
add-sqr-sqrt92.1%
unpow-prod-down94.0%
Applied egg-rr94.0%
pow-sqr94.1%
Simplified94.1%
sqr-pow94.0%
pow294.0%
pow-to-exp93.1%
*-commutative93.1%
associate-/l*93.1%
metadata-eval93.1%
*-commutative93.1%
*-un-lft-identity93.1%
pow1/293.1%
log-pow93.1%
rem-log-exp93.1%
metadata-eval93.1%
log1p-undefine93.1%
log-pow93.2%
add-exp-log92.8%
pow1/398.5%
pow298.5%
Applied egg-rr98.5%
Taylor expanded in x around inf 98.5%
*-commutative98.5%
Simplified98.5%
Final simplification98.5%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(+
(* -0.1111111111111111 (cbrt (/ 1.0 (pow x 5.0))))
(* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))))
(/
1.0
(fma (cbrt x) (* (cbrt x) 2.0) (exp (* 0.6666666666666666 (log1p x)))))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = (-0.1111111111111111 * cbrt((1.0 / pow(x, 5.0)))) + (0.3333333333333333 * cbrt((1.0 / pow(x, 2.0))));
} else {
tmp = 1.0 / fma(cbrt(x), (cbrt(x) * 2.0), exp((0.6666666666666666 * log1p(x))));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(Float64(-0.1111111111111111 * cbrt(Float64(1.0 / (x ^ 5.0)))) + 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(0.6666666666666666 * log1p(x))))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(N[(-0.1111111111111111 * N[Power[N[(1.0 / N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $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[Exp[N[(0.6666666666666666 * N[Log[1 + x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;-0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}} + 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^{0.6666666666666666 \cdot \mathsf{log1p}\left(x\right)}\right)}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 8.4%
Taylor expanded in x around inf 48.4%
Taylor expanded in x around inf 97.4%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
unpow-prod-down92.6%
Applied egg-rr92.6%
pow-sqr92.6%
Simplified92.6%
Taylor expanded in x around inf 92.6%
*-commutative98.5%
Simplified92.6%
add-exp-log92.1%
sqrt-pow290.9%
sqrt-pow292.1%
pow-unpow90.9%
log-pow91.8%
pow291.8%
add-sqr-sqrt91.8%
rem-log-exp91.8%
Applied egg-rr91.8%
Final simplification94.7%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(+
(* -0.1111111111111111 (cbrt (/ 1.0 (pow x 5.0))))
(* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))))
(/
1.0
(+ (* 2.0 (pow (cbrt x) 2.0)) (pow (exp 0.6666666666666666) (log1p x))))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = (-0.1111111111111111 * cbrt((1.0 / pow(x, 5.0)))) + (0.3333333333333333 * cbrt((1.0 / pow(x, 2.0))));
} else {
tmp = 1.0 / ((2.0 * pow(cbrt(x), 2.0)) + pow(exp(0.6666666666666666), log1p(x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = (-0.1111111111111111 * Math.cbrt((1.0 / Math.pow(x, 5.0)))) + (0.3333333333333333 * Math.cbrt((1.0 / Math.pow(x, 2.0))));
} else {
tmp = 1.0 / ((2.0 * Math.pow(Math.cbrt(x), 2.0)) + Math.pow(Math.exp(0.6666666666666666), Math.log1p(x)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(Float64(-0.1111111111111111 * cbrt(Float64(1.0 / (x ^ 5.0)))) + Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0))))); else tmp = Float64(1.0 / Float64(Float64(2.0 * (cbrt(x) ^ 2.0)) + (exp(0.6666666666666666) ^ log1p(x)))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(N[(-0.1111111111111111 * N[Power[N[(1.0 / N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(2.0 * N[Power[N[Power[x, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[N[Exp[0.6666666666666666], $MachinePrecision], N[Log[1 + x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;-0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{2 \cdot {\left(\sqrt[3]{x}\right)}^{2} + {\left(e^{0.6666666666666666}\right)}^{\left(\mathsf{log1p}\left(x\right)\right)}}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 8.4%
Taylor expanded in x around inf 48.4%
Taylor expanded in x around inf 97.4%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
unpow-prod-down92.6%
Applied egg-rr92.6%
pow-sqr92.6%
Simplified92.6%
Taylor expanded in x around inf 92.6%
*-commutative98.5%
Simplified92.6%
fma-undefine92.6%
associate-*r*92.6%
pow292.6%
pow-unpow90.8%
pow290.8%
add-sqr-sqrt90.8%
Applied egg-rr90.8%
Final simplification94.2%
(FPCore (x) :precision binary64 (/ 1.0 (+ (* (cbrt x) (+ (cbrt x) (cbrt (+ 1.0 x)))) (exp (* 0.6666666666666666 (log1p x))))))
double code(double x) {
return 1.0 / ((cbrt(x) * (cbrt(x) + cbrt((1.0 + x)))) + exp((0.6666666666666666 * log1p(x))));
}
public static double code(double x) {
return 1.0 / ((Math.cbrt(x) * (Math.cbrt(x) + Math.cbrt((1.0 + x)))) + Math.exp((0.6666666666666666 * Math.log1p(x))));
}
function code(x) return Float64(1.0 / Float64(Float64(cbrt(x) * Float64(cbrt(x) + cbrt(Float64(1.0 + x)))) + exp(Float64(0.6666666666666666 * log1p(x))))) 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[(0.6666666666666666 * N[Log[1 + x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\sqrt[3]{x} \cdot \left(\sqrt[3]{x} + \sqrt[3]{1 + x}\right) + e^{0.6666666666666666 \cdot \mathsf{log1p}\left(x\right)}}
\end{array}
Initial program 6.6%
flip3--6.6%
div-inv6.6%
rem-cube-cbrt6.0%
rem-cube-cbrt8.7%
+-commutative8.7%
distribute-rgt-out8.6%
+-commutative8.6%
fma-define8.6%
add-exp-log8.6%
Applied egg-rr8.6%
associate-*r/8.6%
*-rgt-identity8.6%
+-commutative8.6%
associate--l+93.3%
+-inverses93.3%
metadata-eval93.3%
+-commutative93.3%
exp-prod92.4%
Simplified92.4%
fma-undefine92.4%
+-commutative92.4%
+-commutative92.4%
Applied egg-rr92.4%
add-exp-log92.5%
log-pow93.3%
rem-log-exp93.3%
Applied egg-rr93.3%
Final simplification93.3%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(+
(* -0.1111111111111111 (cbrt (/ 1.0 (pow x 5.0))))
(* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))))
(pow (* (cbrt (/ 1.0 x)) (sqrt 0.5)) 2.0)))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = (-0.1111111111111111 * cbrt((1.0 / pow(x, 5.0)))) + (0.3333333333333333 * cbrt((1.0 / pow(x, 2.0))));
} else {
tmp = pow((cbrt((1.0 / x)) * sqrt(0.5)), 2.0);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = (-0.1111111111111111 * Math.cbrt((1.0 / Math.pow(x, 5.0)))) + (0.3333333333333333 * Math.cbrt((1.0 / Math.pow(x, 2.0))));
} else {
tmp = Math.pow((Math.cbrt((1.0 / x)) * Math.sqrt(0.5)), 2.0);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(Float64(-0.1111111111111111 * cbrt(Float64(1.0 / (x ^ 5.0)))) + Float64(0.3333333333333333 * cbrt(Float64(1.0 / (x ^ 2.0))))); else tmp = Float64(cbrt(Float64(1.0 / x)) * sqrt(0.5)) ^ 2.0; end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(N[(-0.1111111111111111 * N[Power[N[(1.0 / N[Power[x, 5.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[Power[N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;-0.1111111111111111 \cdot \sqrt[3]{\frac{1}{{x}^{5}}} + 0.3333333333333333 \cdot \sqrt[3]{\frac{1}{{x}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{1}{x}} \cdot \sqrt{0.5}\right)}^{2}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 8.4%
Taylor expanded in x around inf 48.4%
Taylor expanded in x around inf 97.4%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
pow290.8%
inv-pow90.8%
sqrt-pow190.8%
+-commutative90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 20.0%
(FPCore (x)
:precision binary64
(if (<= x 1.35e+154)
(/
(+
(* (cbrt x) -0.1111111111111111)
(* 0.3333333333333333 (pow (cbrt x) 4.0)))
(pow x 2.0))
(pow (* (cbrt (/ 1.0 x)) (sqrt 0.5)) 2.0)))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = ((cbrt(x) * -0.1111111111111111) + (0.3333333333333333 * pow(cbrt(x), 4.0))) / pow(x, 2.0);
} else {
tmp = pow((cbrt((1.0 / x)) * sqrt(0.5)), 2.0);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = ((Math.cbrt(x) * -0.1111111111111111) + (0.3333333333333333 * Math.pow(Math.cbrt(x), 4.0))) / Math.pow(x, 2.0);
} else {
tmp = Math.pow((Math.cbrt((1.0 / x)) * Math.sqrt(0.5)), 2.0);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(Float64(Float64(cbrt(x) * -0.1111111111111111) + Float64(0.3333333333333333 * (cbrt(x) ^ 4.0))) / (x ^ 2.0)); else tmp = Float64(cbrt(Float64(1.0 / x)) * sqrt(0.5)) ^ 2.0; end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(N[(N[(N[Power[x, 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision] + N[(0.3333333333333333 * N[Power[N[Power[x, 1/3], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{4}}{{x}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{1}{x}} \cdot \sqrt{0.5}\right)}^{2}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 8.4%
Taylor expanded in x around inf 48.4%
pow1/345.0%
metadata-eval45.0%
pow-prod-up45.0%
unpow-prod-down89.3%
pow1/390.7%
unpow290.7%
cbrt-prod90.8%
pow290.8%
pow1/397.1%
unpow297.1%
cbrt-prod96.4%
pow296.4%
Applied egg-rr96.4%
pow-sqr96.5%
metadata-eval96.5%
Simplified96.5%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
pow290.8%
inv-pow90.8%
sqrt-pow190.8%
+-commutative90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 20.0%
Final simplification59.1%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (* 0.3333333333333333 (cbrt (/ 1.0 (pow x 2.0)))) (pow (* (cbrt (/ 1.0 x)) (sqrt 0.5)) 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 = pow((cbrt((1.0 / x)) * sqrt(0.5)), 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 = Math.pow((Math.cbrt((1.0 / x)) * Math.sqrt(0.5)), 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(cbrt(Float64(1.0 / x)) * sqrt(0.5)) ^ 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[Power[N[(N[Power[N[(1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision], 2.0], $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}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{1}{x}} \cdot \sqrt{0.5}\right)}^{2}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 8.4%
Taylor expanded in x around inf 95.5%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
add-sqr-sqrt90.8%
pow290.8%
inv-pow90.8%
sqrt-pow190.8%
+-commutative90.8%
metadata-eval90.8%
Applied egg-rr90.8%
Taylor expanded in x around inf 20.0%
(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 8.4%
Taylor expanded in x around inf 95.5%
if 1.35000000000000003e154 < x Initial program 4.8%
flip3--4.8%
div-inv4.8%
rem-cube-cbrt3.2%
rem-cube-cbrt4.8%
+-commutative4.8%
distribute-rgt-out4.8%
+-commutative4.8%
fma-define4.8%
add-exp-log4.8%
Applied egg-rr4.8%
associate-*r/4.8%
*-rgt-identity4.8%
+-commutative4.8%
associate--l+91.8%
+-inverses91.8%
metadata-eval91.8%
+-commutative91.8%
exp-prod90.8%
Simplified90.8%
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 6.6%
Taylor expanded in x around inf 51.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 6.6%
Final simplification6.6%
(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 6.6%
Taylor expanded in x around 0 1.8%
sub-neg1.8%
rem-square-sqrt0.0%
fabs-sqr0.0%
rem-square-sqrt5.3%
fabs-neg5.3%
unpow1/35.3%
metadata-eval5.3%
pow-sqr5.3%
fabs-sqr5.3%
pow-sqr5.3%
metadata-eval5.3%
unpow1/35.3%
Simplified5.3%
Taylor expanded in x around inf 5.3%
(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 2024125
(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)))