
(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 18 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
(+
(pow x 0.6666666666666666)
(pow (* x (+ x 1.0)) 0.3333333333333333))))
(if (<= (- (cbrt (+ x 1.0)) (cbrt x)) 5e-11)
(* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))
(*
(/ (- (+ x 1.0) x) (+ (* (+ x 1.0) (+ x 1.0)) (pow t_0 3.0)))
(+
(pow (+ x 1.0) 1.3333333333333333)
(* t_0 (- t_0 (pow (+ x 1.0) 0.6666666666666666))))))))
double code(double x) {
double t_0 = pow(x, 0.6666666666666666) + pow((x * (x + 1.0)), 0.3333333333333333);
double tmp;
if ((cbrt((x + 1.0)) - cbrt(x)) <= 5e-11) {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
} else {
tmp = (((x + 1.0) - x) / (((x + 1.0) * (x + 1.0)) + pow(t_0, 3.0))) * (pow((x + 1.0), 1.3333333333333333) + (t_0 * (t_0 - pow((x + 1.0), 0.6666666666666666))));
}
return tmp;
}
public static double code(double x) {
double t_0 = Math.pow(x, 0.6666666666666666) + Math.pow((x * (x + 1.0)), 0.3333333333333333);
double tmp;
if ((Math.cbrt((x + 1.0)) - Math.cbrt(x)) <= 5e-11) {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
} else {
tmp = (((x + 1.0) - x) / (((x + 1.0) * (x + 1.0)) + Math.pow(t_0, 3.0))) * (Math.pow((x + 1.0), 1.3333333333333333) + (t_0 * (t_0 - Math.pow((x + 1.0), 0.6666666666666666))));
}
return tmp;
}
function code(x) t_0 = Float64((x ^ 0.6666666666666666) + (Float64(x * Float64(x + 1.0)) ^ 0.3333333333333333)) tmp = 0.0 if (Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) <= 5e-11) tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); else tmp = Float64(Float64(Float64(Float64(x + 1.0) - x) / Float64(Float64(Float64(x + 1.0) * Float64(x + 1.0)) + (t_0 ^ 3.0))) * Float64((Float64(x + 1.0) ^ 1.3333333333333333) + Float64(t_0 * Float64(t_0 - (Float64(x + 1.0) ^ 0.6666666666666666))))); end return tmp end
code[x_] := Block[{t$95$0 = N[(N[Power[x, 0.6666666666666666], $MachinePrecision] + N[Power[N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 5e-11], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x + 1.0), $MachinePrecision] - x), $MachinePrecision] / N[(N[(N[(x + 1.0), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision] + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(x + 1.0), $MachinePrecision], 1.3333333333333333], $MachinePrecision] + N[(t$95$0 * N[(t$95$0 - N[Power[N[(x + 1.0), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{0.6666666666666666} + {\left(x \cdot \left(x + 1\right)\right)}^{0.3333333333333333}\\
\mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \leq 5 \cdot 10^{-11}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 1\right) - x}{\left(x + 1\right) \cdot \left(x + 1\right) + {t\_0}^{3}} \cdot \left({\left(x + 1\right)}^{1.3333333333333333} + t\_0 \cdot \left(t\_0 - {\left(x + 1\right)}^{0.6666666666666666}\right)\right)\\
\end{array}
\end{array}
if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 5.00000000000000018e-11Initial program 4.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6452.8%
Simplified52.8%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6498.5%
Applied egg-rr98.5%
if 5.00000000000000018e-11 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) Initial program 62.9%
pow1/3N/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6460.8%
Applied egg-rr60.8%
Applied egg-rr97.6%
Final simplification98.4%
(FPCore (x)
:precision binary64
(if (<= (- (cbrt (+ x 1.0)) (cbrt x)) 5e-11)
(* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))
(/
(- (+ x 1.0) x)
(+
(+ (pow x 0.6666666666666666) (pow (* x (+ x 1.0)) 0.3333333333333333))
(pow (+ x 1.0) 0.6666666666666666)))))
double code(double x) {
double tmp;
if ((cbrt((x + 1.0)) - cbrt(x)) <= 5e-11) {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
} else {
tmp = ((x + 1.0) - x) / ((pow(x, 0.6666666666666666) + pow((x * (x + 1.0)), 0.3333333333333333)) + pow((x + 1.0), 0.6666666666666666));
}
return tmp;
}
public static double code(double x) {
double tmp;
if ((Math.cbrt((x + 1.0)) - Math.cbrt(x)) <= 5e-11) {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
} else {
tmp = ((x + 1.0) - x) / ((Math.pow(x, 0.6666666666666666) + Math.pow((x * (x + 1.0)), 0.3333333333333333)) + Math.pow((x + 1.0), 0.6666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) <= 5e-11) tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); else tmp = Float64(Float64(Float64(x + 1.0) - x) / Float64(Float64((x ^ 0.6666666666666666) + (Float64(x * Float64(x + 1.0)) ^ 0.3333333333333333)) + (Float64(x + 1.0) ^ 0.6666666666666666))); end return tmp end
code[x_] := If[LessEqual[N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 5e-11], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + 1.0), $MachinePrecision] - x), $MachinePrecision] / N[(N[(N[Power[x, 0.6666666666666666], $MachinePrecision] + N[Power[N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 0.3333333333333333], $MachinePrecision]), $MachinePrecision] + N[Power[N[(x + 1.0), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \leq 5 \cdot 10^{-11}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + 1\right) - x}{\left({x}^{0.6666666666666666} + {\left(x \cdot \left(x + 1\right)\right)}^{0.3333333333333333}\right) + {\left(x + 1\right)}^{0.6666666666666666}}\\
\end{array}
\end{array}
if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 5.00000000000000018e-11Initial program 4.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6452.8%
Simplified52.8%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6498.5%
Applied egg-rr98.5%
if 5.00000000000000018e-11 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) Initial program 62.9%
pow1/3N/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6460.8%
Applied egg-rr60.8%
*-commutativeN/A
pow-to-expN/A
pow1/3N/A
flip3--N/A
/-lowering-/.f64N/A
rem-cube-cbrtN/A
rem-cube-cbrtN/A
--lowering--.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
Applied egg-rr97.0%
Final simplification98.4%
(FPCore (x)
:precision binary64
(let* ((t_0 (* x (* x x))))
(if (<= x 2.7e+75)
(/
(+
(* (* x 0.3333333333333333) (cbrt (* x t_0)))
(* (cbrt x) (+ 0.06172839506172839 (* x -0.1111111111111111))))
t_0)
(* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x)))))))
double code(double x) {
double t_0 = x * (x * x);
double tmp;
if (x <= 2.7e+75) {
tmp = (((x * 0.3333333333333333) * cbrt((x * t_0))) + (cbrt(x) * (0.06172839506172839 + (x * -0.1111111111111111)))) / t_0;
} else {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
}
return tmp;
}
public static double code(double x) {
double t_0 = x * (x * x);
double tmp;
if (x <= 2.7e+75) {
tmp = (((x * 0.3333333333333333) * Math.cbrt((x * t_0))) + (Math.cbrt(x) * (0.06172839506172839 + (x * -0.1111111111111111)))) / t_0;
} else {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
}
return tmp;
}
function code(x) t_0 = Float64(x * Float64(x * x)) tmp = 0.0 if (x <= 2.7e+75) tmp = Float64(Float64(Float64(Float64(x * 0.3333333333333333) * cbrt(Float64(x * t_0))) + Float64(cbrt(x) * Float64(0.06172839506172839 + Float64(x * -0.1111111111111111)))) / t_0); else tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); end return tmp end
code[x_] := Block[{t$95$0 = N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.7e+75], N[(N[(N[(N[(x * 0.3333333333333333), $MachinePrecision] * N[Power[N[(x * t$95$0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(N[Power[x, 1/3], $MachinePrecision] * N[(0.06172839506172839 + N[(x * -0.1111111111111111), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot x\right)\\
\mathbf{if}\;x \leq 2.7 \cdot 10^{+75}:\\
\;\;\;\;\frac{\left(x \cdot 0.3333333333333333\right) \cdot \sqrt[3]{x \cdot t\_0} + \sqrt[3]{x} \cdot \left(0.06172839506172839 + x \cdot -0.1111111111111111\right)}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 2.69999999999999998e75Initial program 22.9%
rem-cbrt-cubeN/A
unpow3N/A
pow1/3N/A
sqr-powN/A
associate-*r*N/A
Applied egg-rr26.1%
cbrt-unprodN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
flip3-+N/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6424.4%
Applied egg-rr24.4%
Taylor expanded in x around inf
/-lowering-/.f64N/A
Simplified94.2%
Taylor expanded in x around 0
/-lowering-/.f64N/A
Simplified94.0%
if 2.69999999999999998e75 < x Initial program 4.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6441.6%
Simplified41.6%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6498.5%
Applied egg-rr98.5%
Final simplification97.3%
(FPCore (x)
:precision binary64
(if (<= x 3e+75)
(/
(+
(* (cbrt x) -0.1111111111111111)
(* 0.3333333333333333 (cbrt (* (* x x) (* x x)))))
(* x x))
(* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))))
double code(double x) {
double tmp;
if (x <= 3e+75) {
tmp = ((cbrt(x) * -0.1111111111111111) + (0.3333333333333333 * cbrt(((x * x) * (x * x))))) / (x * x);
} else {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 3e+75) {
tmp = ((Math.cbrt(x) * -0.1111111111111111) + (0.3333333333333333 * Math.cbrt(((x * x) * (x * x))))) / (x * x);
} else {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 3e+75) tmp = Float64(Float64(Float64(cbrt(x) * -0.1111111111111111) + Float64(0.3333333333333333 * cbrt(Float64(Float64(x * x) * Float64(x * x))))) / Float64(x * x)); else tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); end return tmp end
code[x_] := If[LessEqual[x, 3e+75], N[(N[(N[(N[Power[x, 1/3], $MachinePrecision] * -0.1111111111111111), $MachinePrecision] + N[(0.3333333333333333 * N[Power[N[(N[(x * x), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3 \cdot 10^{+75}:\\
\;\;\;\;\frac{\sqrt[3]{x} \cdot -0.1111111111111111 + 0.3333333333333333 \cdot \sqrt[3]{\left(x \cdot x\right) \cdot \left(x \cdot x\right)}}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 3e75Initial program 22.9%
Taylor expanded in x around inf
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
pow-sqrN/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6492.6%
Simplified92.6%
if 3e75 < x Initial program 4.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6441.6%
Simplified41.6%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6498.5%
Applied egg-rr98.5%
Final simplification97.0%
(FPCore (x) :precision binary64 (if (<= x 46000000.0) (+ (/ 1.0 (cbrt (/ 1.0 (+ x 1.0)))) (/ -1.0 (cbrt (/ x (* x x))))) (* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))))
double code(double x) {
double tmp;
if (x <= 46000000.0) {
tmp = (1.0 / cbrt((1.0 / (x + 1.0)))) + (-1.0 / cbrt((x / (x * x))));
} else {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 46000000.0) {
tmp = (1.0 / Math.cbrt((1.0 / (x + 1.0)))) + (-1.0 / Math.cbrt((x / (x * x))));
} else {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 46000000.0) tmp = Float64(Float64(1.0 / cbrt(Float64(1.0 / Float64(x + 1.0)))) + Float64(-1.0 / cbrt(Float64(x / Float64(x * x))))); else tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); end return tmp end
code[x_] := If[LessEqual[x, 46000000.0], N[(N[(1.0 / N[Power[N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] + N[(-1.0 / N[Power[N[(x / N[(x * x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 46000000:\\
\;\;\;\;\frac{1}{\sqrt[3]{\frac{1}{x + 1}}} + \frac{-1}{\sqrt[3]{\frac{x}{x \cdot x}}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 4.6e7Initial program 78.9%
rem-cbrt-cubeN/A
unpow3N/A
pow1/3N/A
sqr-powN/A
associate-*r*N/A
Applied egg-rr78.4%
cbrt-unprodN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
flip3-+N/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6479.2%
Applied egg-rr79.2%
rem-cube-cbrtN/A
sqr-powN/A
pow-prod-downN/A
sqr-negN/A
sub0-negN/A
sub0-negN/A
pow-prod-downN/A
sqr-powN/A
sub0-negN/A
cube-negN/A
rem-cube-cbrtN/A
sub0-negN/A
flip--N/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
+-lft-identityN/A
metadata-evalN/A
sub0-negN/A
Applied egg-rr79.3%
if 4.6e7 < x Initial program 5.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval97.7%
Applied egg-rr97.7%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6497.7%
Applied egg-rr97.7%
Final simplification96.8%
(FPCore (x) :precision binary64 (if (<= x 35000000.0) (- (/ 1.0 (cbrt (/ 1.0 (+ x 1.0)))) (cbrt x)) (* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))))
double code(double x) {
double tmp;
if (x <= 35000000.0) {
tmp = (1.0 / cbrt((1.0 / (x + 1.0)))) - cbrt(x);
} else {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 35000000.0) {
tmp = (1.0 / Math.cbrt((1.0 / (x + 1.0)))) - Math.cbrt(x);
} else {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 35000000.0) tmp = Float64(Float64(1.0 / cbrt(Float64(1.0 / Float64(x + 1.0)))) - cbrt(x)); else tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); end return tmp end
code[x_] := If[LessEqual[x, 35000000.0], N[(N[(1.0 / N[Power[N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 35000000:\\
\;\;\;\;\frac{1}{\sqrt[3]{\frac{1}{x + 1}}} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 3.5e7Initial program 78.9%
rem-cbrt-cubeN/A
unpow3N/A
pow1/3N/A
sqr-powN/A
associate-*r*N/A
Applied egg-rr78.4%
cbrt-unprodN/A
pow-prod-upN/A
metadata-evalN/A
unpow1N/A
flip3-+N/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
clear-numN/A
flip3-+N/A
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f6479.2%
Applied egg-rr79.2%
if 3.5e7 < x Initial program 5.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval97.7%
Applied egg-rr97.7%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6497.7%
Applied egg-rr97.7%
Final simplification96.8%
(FPCore (x) :precision binary64 (if (<= x 17000000.0) (- (pow (+ x 1.0) 0.3333333333333333) (cbrt x)) (* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (- 0.0 (cbrt x))))))
double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
} else {
tmp = 0.3333333333333333 * (cbrt((-1.0 / x)) / (0.0 - cbrt(x)));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = Math.pow((x + 1.0), 0.3333333333333333) - Math.cbrt(x);
} else {
tmp = 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / (0.0 - Math.cbrt(x)));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 17000000.0) tmp = Float64((Float64(x + 1.0) ^ 0.3333333333333333) - cbrt(x)); else tmp = Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / Float64(0.0 - cbrt(x)))); end return tmp end
code[x_] := If[LessEqual[x, 17000000.0], N[(N[Power[N[(x + 1.0), $MachinePrecision], 0.3333333333333333], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[(0.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 17000000:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{0 - \sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 1.7e7Initial program 82.9%
--lowering--.f64N/A
pow1/3N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
cbrt-lowering-cbrt.f6483.1%
Applied egg-rr83.1%
if 1.7e7 < x Initial program 6.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.7%
Simplified53.7%
associate-/r*N/A
frac-2negN/A
cbrt-divN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
neg-sub0N/A
metadata-evalN/A
--lowering--.f64N/A
metadata-eval97.4%
Applied egg-rr97.4%
sub0-negN/A
rem-cube-cbrtN/A
cube-negN/A
sub0-negN/A
rem-cbrt-cubeN/A
sub0-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f6497.4%
Applied egg-rr97.4%
Final simplification96.8%
(FPCore (x) :precision binary64 (if (<= x 17000000.0) (- (pow (+ x 1.0) 0.3333333333333333) (cbrt x)) (/ (* 0.3333333333333333 (cbrt (/ 1.0 x))) (cbrt x))))
double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
} else {
tmp = (0.3333333333333333 * cbrt((1.0 / x))) / cbrt(x);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = Math.pow((x + 1.0), 0.3333333333333333) - Math.cbrt(x);
} else {
tmp = (0.3333333333333333 * Math.cbrt((1.0 / x))) / Math.cbrt(x);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 17000000.0) tmp = Float64((Float64(x + 1.0) ^ 0.3333333333333333) - cbrt(x)); else tmp = Float64(Float64(0.3333333333333333 * cbrt(Float64(1.0 / x))) / cbrt(x)); end return tmp end
code[x_] := If[LessEqual[x, 17000000.0], N[(N[Power[N[(x + 1.0), $MachinePrecision], 0.3333333333333333], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[Power[N[(1.0 / x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 17000000:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x}}}{\sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 1.7e7Initial program 82.9%
--lowering--.f64N/A
pow1/3N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
cbrt-lowering-cbrt.f6483.1%
Applied egg-rr83.1%
if 1.7e7 < x Initial program 6.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.7%
Simplified53.7%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
cbrt-lowering-cbrt.f6497.3%
Applied egg-rr97.3%
Taylor expanded in x around 0
*-commutativeN/A
*-lowering-*.f64N/A
cbrt-lowering-cbrt.f64N/A
/-lowering-/.f6497.4%
Simplified97.4%
Final simplification96.8%
(FPCore (x) :precision binary64 (if (<= x 17000000.0) (- (pow (+ x 1.0) 0.3333333333333333) (cbrt x)) (* 0.3333333333333333 (/ (/ 1.0 (cbrt x)) (cbrt x)))))
double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
} else {
tmp = 0.3333333333333333 * ((1.0 / cbrt(x)) / cbrt(x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = Math.pow((x + 1.0), 0.3333333333333333) - Math.cbrt(x);
} else {
tmp = 0.3333333333333333 * ((1.0 / Math.cbrt(x)) / Math.cbrt(x));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 17000000.0) tmp = Float64((Float64(x + 1.0) ^ 0.3333333333333333) - cbrt(x)); else tmp = Float64(0.3333333333333333 * Float64(Float64(1.0 / cbrt(x)) / cbrt(x))); end return tmp end
code[x_] := If[LessEqual[x, 17000000.0], N[(N[Power[N[(x + 1.0), $MachinePrecision], 0.3333333333333333], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(1.0 / N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 17000000:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{1}{\sqrt[3]{x}}}{\sqrt[3]{x}}\\
\end{array}
\end{array}
if x < 1.7e7Initial program 82.9%
--lowering--.f64N/A
pow1/3N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
cbrt-lowering-cbrt.f6483.1%
Applied egg-rr83.1%
if 1.7e7 < x Initial program 6.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.7%
Simplified53.7%
associate-/r*N/A
cbrt-divN/A
pow1/3N/A
/-lowering-/.f64N/A
pow1/3N/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
cbrt-lowering-cbrt.f64N/A
cbrt-lowering-cbrt.f6497.3%
Applied egg-rr97.3%
(FPCore (x) :precision binary64 (if (<= x 17000000.0) (- (pow (+ x 1.0) 0.3333333333333333) (cbrt x)) (* 0.3333333333333333 (pow (cbrt x) -2.0))))
double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = pow((x + 1.0), 0.3333333333333333) - cbrt(x);
} else {
tmp = 0.3333333333333333 * pow(cbrt(x), -2.0);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 17000000.0) {
tmp = Math.pow((x + 1.0), 0.3333333333333333) - Math.cbrt(x);
} else {
tmp = 0.3333333333333333 * Math.pow(Math.cbrt(x), -2.0);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 17000000.0) tmp = Float64((Float64(x + 1.0) ^ 0.3333333333333333) - cbrt(x)); else tmp = Float64(0.3333333333333333 * (cbrt(x) ^ -2.0)); end return tmp end
code[x_] := If[LessEqual[x, 17000000.0], N[(N[Power[N[(x + 1.0), $MachinePrecision], 0.3333333333333333], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[Power[N[Power[x, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 17000000:\\
\;\;\;\;{\left(x + 1\right)}^{0.3333333333333333} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}\\
\end{array}
\end{array}
if x < 1.7e7Initial program 82.9%
--lowering--.f64N/A
pow1/3N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
cbrt-lowering-cbrt.f6483.1%
Applied egg-rr83.1%
if 1.7e7 < x Initial program 6.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.7%
Simplified53.7%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
inv-powN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
cbrt-lowering-cbrt.f64N/A
metadata-eval97.3%
Applied egg-rr97.3%
(FPCore (x) :precision binary64 (if (<= x 49000000.0) (- (cbrt (+ x 1.0)) (cbrt x)) (* 0.3333333333333333 (pow (cbrt x) -2.0))))
double code(double x) {
double tmp;
if (x <= 49000000.0) {
tmp = cbrt((x + 1.0)) - cbrt(x);
} else {
tmp = 0.3333333333333333 * pow(cbrt(x), -2.0);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 49000000.0) {
tmp = Math.cbrt((x + 1.0)) - Math.cbrt(x);
} else {
tmp = 0.3333333333333333 * Math.pow(Math.cbrt(x), -2.0);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 49000000.0) tmp = Float64(cbrt(Float64(x + 1.0)) - cbrt(x)); else tmp = Float64(0.3333333333333333 * (cbrt(x) ^ -2.0)); end return tmp end
code[x_] := If[LessEqual[x, 49000000.0], N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[Power[N[Power[x, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 49000000:\\
\;\;\;\;\sqrt[3]{x + 1} - \sqrt[3]{x}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}\\
\end{array}
\end{array}
if x < 4.9e7Initial program 78.9%
if 4.9e7 < x Initial program 5.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.6%
Simplified53.6%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
inv-powN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
cbrt-lowering-cbrt.f64N/A
metadata-eval97.7%
Applied egg-rr97.7%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (pow (cbrt x) -2.0)))
double code(double x) {
return 0.3333333333333333 * pow(cbrt(x), -2.0);
}
public static double code(double x) {
return 0.3333333333333333 * Math.pow(Math.cbrt(x), -2.0);
}
function code(x) return Float64(0.3333333333333333 * (cbrt(x) ^ -2.0)) end
code[x_] := N[(0.3333333333333333 * N[Power[N[Power[x, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot {\left(\sqrt[3]{x}\right)}^{-2}
\end{array}
Initial program 9.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.0%
Simplified53.0%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
inv-powN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
cbrt-lowering-cbrt.f64N/A
metadata-eval95.0%
Applied egg-rr95.0%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (/ 1.0 (* 3.0 (cbrt (* x x)))) (/ 0.3333333333333333 (/ 1.0 (pow x -0.6666666666666666)))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 1.0 / (3.0 * cbrt((x * x)));
} else {
tmp = 0.3333333333333333 / (1.0 / pow(x, -0.6666666666666666));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 1.0 / (3.0 * Math.cbrt((x * x)));
} else {
tmp = 0.3333333333333333 / (1.0 / Math.pow(x, -0.6666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(1.0 / Float64(3.0 * cbrt(Float64(x * x)))); else tmp = Float64(0.3333333333333333 / Float64(1.0 / (x ^ -0.6666666666666666))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(1.0 / N[(3.0 * N[Power[N[(x * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(1.0 / N[Power[x, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{3 \cdot \sqrt[3]{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{1}{{x}^{-0.6666666666666666}}}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 12.8%
pow1/3N/A
pow-to-expN/A
exp-lowering-exp.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6414.4%
Applied egg-rr14.4%
pow1/3N/A
*-commutativeN/A
pow-to-expN/A
pow1/3N/A
remove-double-divN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
pow1/3N/A
--lowering--.f64N/A
cbrt-lowering-cbrt.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
cbrt-lowering-cbrt.f6412.8%
Applied egg-rr12.8%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f64N/A
cbrt-lowering-cbrt.f64N/A
unpow2N/A
*-lowering-*.f6492.5%
Simplified92.5%
if 1.35000000000000003e154 < x Initial program 4.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f644.8%
Simplified4.8%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-prod-upN/A
pow-lowering-pow.f64N/A
metadata-eval89.1%
Applied egg-rr89.1%
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow1/3N/A
/-rgt-identityN/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
pow1/3N/A
inv-powN/A
pow2N/A
pow-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-eval89.1%
Applied egg-rr89.1%
Final simplification91.0%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (/ 0.3333333333333333 (cbrt (* x x))) (/ 0.3333333333333333 (/ 1.0 (pow x -0.6666666666666666)))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 / cbrt((x * x));
} else {
tmp = 0.3333333333333333 / (1.0 / pow(x, -0.6666666666666666));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 / Math.cbrt((x * x));
} else {
tmp = 0.3333333333333333 / (1.0 / Math.pow(x, -0.6666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 / cbrt(Float64(x * x))); else tmp = Float64(0.3333333333333333 / Float64(1.0 / (x ^ -0.6666666666666666))); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 / N[Power[N[(x * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(1.0 / N[Power[x, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{0.3333333333333333}{\sqrt[3]{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{1}{{x}^{-0.6666666666666666}}}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 12.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6492.4%
Simplified92.4%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-prod-upN/A
pow-lowering-pow.f64N/A
metadata-eval86.3%
Applied egg-rr86.3%
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow1/3N/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f6492.5%
Applied egg-rr92.5%
if 1.35000000000000003e154 < x Initial program 4.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f644.8%
Simplified4.8%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-prod-upN/A
pow-lowering-pow.f64N/A
metadata-eval89.1%
Applied egg-rr89.1%
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow1/3N/A
/-rgt-identityN/A
clear-numN/A
cbrt-divN/A
metadata-evalN/A
/-lowering-/.f64N/A
pow1/3N/A
inv-powN/A
pow2N/A
pow-powN/A
pow-powN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
pow-lowering-pow.f64N/A
metadata-eval89.1%
Applied egg-rr89.1%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (/ 0.3333333333333333 (cbrt (* x x))) (* 0.3333333333333333 (pow x -0.6666666666666666))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 / cbrt((x * x));
} else {
tmp = 0.3333333333333333 * pow(x, -0.6666666666666666);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 / Math.cbrt((x * x));
} else {
tmp = 0.3333333333333333 * Math.pow(x, -0.6666666666666666);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 / cbrt(Float64(x * x))); else tmp = Float64(0.3333333333333333 * (x ^ -0.6666666666666666)); end return tmp end
code[x_] := If[LessEqual[x, 1.35e+154], N[(0.3333333333333333 / N[Power[N[(x * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[Power[x, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{0.3333333333333333}{\sqrt[3]{x \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot {x}^{-0.6666666666666666}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 12.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6492.4%
Simplified92.4%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-prod-upN/A
pow-lowering-pow.f64N/A
metadata-eval86.3%
Applied egg-rr86.3%
metadata-evalN/A
pow-prod-upN/A
pow-prod-downN/A
pow1/3N/A
cbrt-lowering-cbrt.f64N/A
*-lowering-*.f6492.5%
Applied egg-rr92.5%
if 1.35000000000000003e154 < x Initial program 4.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f644.8%
Simplified4.8%
*-commutativeN/A
*-lowering-*.f64N/A
pow1/3N/A
inv-powN/A
pow-powN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-eval89.1%
Applied egg-rr89.1%
Final simplification91.0%
(FPCore (x) :precision binary64 (/ 0.3333333333333333 (pow x 0.6666666666666666)))
double code(double x) {
return 0.3333333333333333 / pow(x, 0.6666666666666666);
}
real(8) function code(x)
real(8), intent (in) :: x
code = 0.3333333333333333d0 / (x ** 0.6666666666666666d0)
end function
public static double code(double x) {
return 0.3333333333333333 / Math.pow(x, 0.6666666666666666);
}
def code(x): return 0.3333333333333333 / math.pow(x, 0.6666666666666666)
function code(x) return Float64(0.3333333333333333 / (x ^ 0.6666666666666666)) end
function tmp = code(x) tmp = 0.3333333333333333 / (x ^ 0.6666666666666666); end
code[x_] := N[(0.3333333333333333 / N[Power[x, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.3333333333333333}{{x}^{0.6666666666666666}}
\end{array}
Initial program 9.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.0%
Simplified53.0%
associate-/r*N/A
cbrt-divN/A
cbrt-divN/A
metadata-evalN/A
associate-/r*N/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-prod-upN/A
pow-lowering-pow.f64N/A
metadata-eval87.5%
Applied egg-rr87.5%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (pow x -0.6666666666666666)))
double code(double x) {
return 0.3333333333333333 * pow(x, -0.6666666666666666);
}
real(8) function code(x)
real(8), intent (in) :: x
code = 0.3333333333333333d0 * (x ** (-0.6666666666666666d0))
end function
public static double code(double x) {
return 0.3333333333333333 * Math.pow(x, -0.6666666666666666);
}
def code(x): return 0.3333333333333333 * math.pow(x, -0.6666666666666666)
function code(x) return Float64(0.3333333333333333 * (x ^ -0.6666666666666666)) end
function tmp = code(x) tmp = 0.3333333333333333 * (x ^ -0.6666666666666666); end
code[x_] := N[(0.3333333333333333 * N[Power[x, -0.6666666666666666], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot {x}^{-0.6666666666666666}
\end{array}
Initial program 9.2%
Taylor expanded in x around inf
*-lowering-*.f64N/A
metadata-evalN/A
associate-*r/N/A
cbrt-lowering-cbrt.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
unpow2N/A
*-lowering-*.f6453.0%
Simplified53.0%
*-commutativeN/A
*-lowering-*.f64N/A
pow1/3N/A
inv-powN/A
pow-powN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
metadata-evalN/A
metadata-eval87.5%
Applied egg-rr87.5%
Final simplification87.5%
(FPCore (x) :precision binary64 (- 1.0 (cbrt x)))
double code(double x) {
return 1.0 - cbrt(x);
}
public static double code(double x) {
return 1.0 - Math.cbrt(x);
}
function code(x) return Float64(1.0 - cbrt(x)) end
code[x_] := N[(1.0 - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \sqrt[3]{x}
\end{array}
Initial program 9.2%
Taylor expanded in x around 0
--lowering--.f64N/A
cbrt-lowering-cbrt.f641.8%
Simplified1.8%
(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 2024129
(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)))