
(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) (cbrt (fma x x x)))))
(if (<= (- (cbrt (+ x 1.0)) (cbrt x)) 0.0)
(*
0.3333333333333333
(/ (* (/ 1.0 (sqrt x)) (cbrt -1.0)) (cbrt (- (sqrt x)))))
(*
(/ (+ x (- 1.0 x)) (fma (+ x 1.0) (+ x 1.0) (pow t_0 3.0)))
(fma
t_0
(- t_0 (pow (+ x 1.0) 0.6666666666666666))
(pow (+ x 1.0) 1.3333333333333333))))))
double code(double x) {
double t_0 = pow(x, 0.6666666666666666) + cbrt(fma(x, x, x));
double tmp;
if ((cbrt((x + 1.0)) - cbrt(x)) <= 0.0) {
tmp = 0.3333333333333333 * (((1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(-sqrt(x)));
} else {
tmp = ((x + (1.0 - x)) / fma((x + 1.0), (x + 1.0), pow(t_0, 3.0))) * fma(t_0, (t_0 - pow((x + 1.0), 0.6666666666666666)), pow((x + 1.0), 1.3333333333333333));
}
return tmp;
}
function code(x) t_0 = Float64((x ^ 0.6666666666666666) + cbrt(fma(x, x, x))) tmp = 0.0 if (Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) <= 0.0) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(Float64(-sqrt(x))))); else tmp = Float64(Float64(Float64(x + Float64(1.0 - x)) / fma(Float64(x + 1.0), Float64(x + 1.0), (t_0 ^ 3.0))) * fma(t_0, Float64(t_0 - (Float64(x + 1.0) ^ 0.6666666666666666)), (Float64(x + 1.0) ^ 1.3333333333333333))); end return tmp end
code[x_] := Block[{t$95$0 = N[(N[Power[x, 0.6666666666666666], $MachinePrecision] + N[Power[N[(x * x + x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[N[(x + 1.0), $MachinePrecision], 1/3], $MachinePrecision] - N[Power[x, 1/3], $MachinePrecision]), $MachinePrecision], 0.0], N[(0.3333333333333333 * N[(N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Power[-1.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[(-N[Sqrt[x], $MachinePrecision]), 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(N[(x + 1.0), $MachinePrecision] * N[(x + 1.0), $MachinePrecision] + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(t$95$0 - N[Power[N[(x + 1.0), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision] + N[Power[N[(x + 1.0), $MachinePrecision], 1.3333333333333333], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {x}^{0.6666666666666666} + \sqrt[3]{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{if}\;\sqrt[3]{x + 1} - \sqrt[3]{x} \leq 0:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{1}{\sqrt{x}} \cdot \sqrt[3]{-1}}{\sqrt[3]{-\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \left(1 - x\right)}{\mathsf{fma}\left(x + 1, x + 1, {t\_0}^{3}\right)} \cdot \mathsf{fma}\left(t\_0, t\_0 - {\left(x + 1\right)}^{0.6666666666666666}, {\left(x + 1\right)}^{1.3333333333333333}\right)\\
\end{array}
\end{array}
if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 0.0Initial program 4.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-*.f6448.0
Simplified48.0%
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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.6%
Applied egg-rr98.9%
if 0.0 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) Initial program 63.1%
pow1/3N/A
pow-lowering-pow.f6460.2
Applied egg-rr60.2%
Applied egg-rr98.4%
(FPCore (x)
:precision binary64
(if (<= (- (cbrt (+ x 1.0)) (cbrt x)) 0.0)
(*
0.3333333333333333
(/ (* (/ 1.0 (sqrt x)) (cbrt -1.0)) (cbrt (- (sqrt x)))))
(/
(+ x (- 1.0 x))
(+
(+ (pow x 0.6666666666666666) (cbrt (fma x x x)))
(pow (+ x 1.0) 0.6666666666666666)))))
double code(double x) {
double tmp;
if ((cbrt((x + 1.0)) - cbrt(x)) <= 0.0) {
tmp = 0.3333333333333333 * (((1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(-sqrt(x)));
} else {
tmp = (x + (1.0 - x)) / ((pow(x, 0.6666666666666666) + cbrt(fma(x, x, x))) + pow((x + 1.0), 0.6666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (Float64(cbrt(Float64(x + 1.0)) - cbrt(x)) <= 0.0) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(Float64(-sqrt(x))))); else tmp = Float64(Float64(x + Float64(1.0 - x)) / Float64(Float64((x ^ 0.6666666666666666) + cbrt(fma(x, x, x))) + (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], 0.0], N[(0.3333333333333333 * N[(N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Power[-1.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[(-N[Sqrt[x], $MachinePrecision]), 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(1.0 - x), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[x, 0.6666666666666666], $MachinePrecision] + N[Power[N[(x * x + x), $MachinePrecision], 1/3], $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 0:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{1}{\sqrt{x}} \cdot \sqrt[3]{-1}}{\sqrt[3]{-\sqrt{x}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \left(1 - x\right)}{\left({x}^{0.6666666666666666} + \sqrt[3]{\mathsf{fma}\left(x, x, x\right)}\right) + {\left(x + 1\right)}^{0.6666666666666666}}\\
\end{array}
\end{array}
if (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) < 0.0Initial program 4.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-*.f6448.0
Simplified48.0%
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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.6%
Applied egg-rr98.9%
if 0.0 < (-.f64 (cbrt.f64 (+.f64 x #s(literal 1 binary64))) (cbrt.f64 x)) Initial program 63.1%
pow1/3N/A
pow-lowering-pow.f6460.2
Applied egg-rr60.2%
flip3--N/A
/-lowering-/.f64N/A
rem-cube-cbrtN/A
unpow1/3N/A
rem-cube-cbrtN/A
associate--l+N/A
metadata-evalN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
metadata-evalN/A
*-rgt-identityN/A
--lowering--.f64N/A
+-lowering-+.f64N/A
Applied egg-rr97.8%
Final simplification98.8%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (/ (* (/ 1.0 (sqrt x)) (cbrt -1.0)) (cbrt (- (sqrt x))))))
double code(double x) {
return 0.3333333333333333 * (((1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(-sqrt(x)));
}
public static double code(double x) {
return 0.3333333333333333 * (((1.0 / Math.sqrt(x)) * Math.cbrt(-1.0)) / Math.cbrt(-Math.sqrt(x)));
}
function code(x) return Float64(0.3333333333333333 * Float64(Float64(Float64(1.0 / sqrt(x)) * cbrt(-1.0)) / cbrt(Float64(-sqrt(x))))) end
code[x_] := N[(0.3333333333333333 * N[(N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Power[-1.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[(-N[Sqrt[x], $MachinePrecision]), 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot \frac{\frac{1}{\sqrt{x}} \cdot \sqrt[3]{-1}}{\sqrt[3]{-\sqrt{x}}}
\end{array}
Initial program 7.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-*.f6448.5
Simplified48.5%
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-lowering-neg.f6496.4
Applied egg-rr96.4%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr96.4%
Applied egg-rr96.7%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (/ (cbrt (/ -1.0 x)) (cbrt (- x)))))
double code(double x) {
return 0.3333333333333333 * (cbrt((-1.0 / x)) / cbrt(-x));
}
public static double code(double x) {
return 0.3333333333333333 * (Math.cbrt((-1.0 / x)) / Math.cbrt(-x));
}
function code(x) return Float64(0.3333333333333333 * Float64(cbrt(Float64(-1.0 / x)) / cbrt(Float64(-x)))) end
code[x_] := N[(0.3333333333333333 * N[(N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[(-x), 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.3333333333333333 \cdot \frac{\sqrt[3]{\frac{-1}{x}}}{\sqrt[3]{-x}}
\end{array}
Initial program 7.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-*.f6448.5
Simplified48.5%
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-lowering-neg.f6496.4
Applied egg-rr96.4%
(FPCore (x) :precision binary64 (* 0.3333333333333333 (/ (/ 1.0 (cbrt x)) (cbrt x))))
double code(double x) {
return 0.3333333333333333 * ((1.0 / cbrt(x)) / cbrt(x));
}
public static double code(double x) {
return 0.3333333333333333 * ((1.0 / Math.cbrt(x)) / Math.cbrt(x));
}
function code(x) return Float64(0.3333333333333333 * Float64(Float64(1.0 / cbrt(x)) / cbrt(x))) end
code[x_] := 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}
\\
0.3333333333333333 \cdot \frac{\frac{1}{\sqrt[3]{x}}}{\sqrt[3]{x}}
\end{array}
Initial program 7.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-*.f6448.5
Simplified48.5%
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.f6496.3
Applied egg-rr96.3%
(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 7.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-*.f6448.5
Simplified48.5%
cbrt-divN/A
metadata-evalN/A
inv-powN/A
cbrt-prodN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
cbrt-lowering-cbrt.f64N/A
metadata-eval96.3
Applied egg-rr96.3%
(FPCore (x)
:precision binary64
(let* ((t_0 (/ 1.0 (sqrt (sqrt x)))))
(if (<= x 1.65e+248)
(* 0.3333333333333333 (* t_0 (cbrt (* t_0 (/ 1.0 x)))))
(*
(/ 1.0 (sqrt x))
(* 0.3333333333333333 (pow x -0.16666666666666666))))))
double code(double x) {
double t_0 = 1.0 / sqrt(sqrt(x));
double tmp;
if (x <= 1.65e+248) {
tmp = 0.3333333333333333 * (t_0 * cbrt((t_0 * (1.0 / x))));
} else {
tmp = (1.0 / sqrt(x)) * (0.3333333333333333 * pow(x, -0.16666666666666666));
}
return tmp;
}
public static double code(double x) {
double t_0 = 1.0 / Math.sqrt(Math.sqrt(x));
double tmp;
if (x <= 1.65e+248) {
tmp = 0.3333333333333333 * (t_0 * Math.cbrt((t_0 * (1.0 / x))));
} else {
tmp = (1.0 / Math.sqrt(x)) * (0.3333333333333333 * Math.pow(x, -0.16666666666666666));
}
return tmp;
}
function code(x) t_0 = Float64(1.0 / sqrt(sqrt(x))) tmp = 0.0 if (x <= 1.65e+248) tmp = Float64(0.3333333333333333 * Float64(t_0 * cbrt(Float64(t_0 * Float64(1.0 / x))))); else tmp = Float64(Float64(1.0 / sqrt(x)) * Float64(0.3333333333333333 * (x ^ -0.16666666666666666))); end return tmp end
code[x_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[N[Sqrt[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.65e+248], N[(0.3333333333333333 * N[(t$95$0 * N[Power[N[(t$95$0 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 * N[Power[x, -0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\sqrt{\sqrt{x}}}\\
\mathbf{if}\;x \leq 1.65 \cdot 10^{+248}:\\
\;\;\;\;0.3333333333333333 \cdot \left(t\_0 \cdot \sqrt[3]{t\_0 \cdot \frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{x}} \cdot \left(0.3333333333333333 \cdot {x}^{-0.16666666666666666}\right)\\
\end{array}
\end{array}
if x < 1.6500000000000001e248Initial program 7.6%
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-*.f6458.4
Simplified58.4%
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-lowering-neg.f6495.9
Applied egg-rr95.9%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr96.0%
Applied egg-rr96.1%
if 1.6500000000000001e248 < x Initial program 5.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-*.f645.2
Simplified5.2%
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-lowering-neg.f6498.3
Applied egg-rr98.3%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.2%
Applied egg-rr91.9%
Final simplification95.3%
(FPCore (x) :precision binary64 (if (<= x 4e+154) (* 0.3333333333333333 (cbrt (* (/ 1.0 x) (/ 1.0 x)))) (* 0.3333333333333333 (/ (/ 1.0 (sqrt x)) (pow x 0.16666666666666666)))))
double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = 0.3333333333333333 * ((1.0 / sqrt(x)) / pow(x, 0.16666666666666666));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * Math.cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = 0.3333333333333333 * ((1.0 / Math.sqrt(x)) / Math.pow(x, 0.16666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 4e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(Float64(1.0 / x) * Float64(1.0 / x)))); else tmp = Float64(0.3333333333333333 * Float64(Float64(1.0 / sqrt(x)) / (x ^ 0.16666666666666666))); end return tmp end
code[x_] := If[LessEqual[x, 4e+154], N[(0.3333333333333333 * N[Power[N[(N[(1.0 / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / N[Power[x, 0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x} \cdot \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{1}{\sqrt{x}}}{{x}^{0.16666666666666666}}\\
\end{array}
\end{array}
if x < 4.00000000000000015e154Initial program 9.7%
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-*.f6493.6
Simplified93.6%
associate-/r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.5
Applied egg-rr94.5%
if 4.00000000000000015e154 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.5%
cbrt-undivN/A
pow1/3N/A
div-invN/A
neg-mul-1N/A
times-fracN/A
unpow-prod-downN/A
associate-/l/N/A
associate-/r*N/A
metadata-evalN/A
inv-powN/A
rem-square-sqrtN/A
pow2N/A
pow-divN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
sqrt-pow2N/A
pow-powN/A
inv-powN/A
Applied egg-rr92.4%
(FPCore (x) :precision binary64 (if (<= x 4e+154) (* 0.3333333333333333 (cbrt (* (/ 1.0 x) (/ 1.0 x)))) (* (/ 1.0 (sqrt x)) (* 0.3333333333333333 (pow x -0.16666666666666666)))))
double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = (1.0 / sqrt(x)) * (0.3333333333333333 * pow(x, -0.16666666666666666));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * Math.cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = (1.0 / Math.sqrt(x)) * (0.3333333333333333 * Math.pow(x, -0.16666666666666666));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 4e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(Float64(1.0 / x) * Float64(1.0 / x)))); else tmp = Float64(Float64(1.0 / sqrt(x)) * Float64(0.3333333333333333 * (x ^ -0.16666666666666666))); end return tmp end
code[x_] := If[LessEqual[x, 4e+154], N[(0.3333333333333333 * N[Power[N[(N[(1.0 / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 * N[Power[x, -0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x} \cdot \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt{x}} \cdot \left(0.3333333333333333 \cdot {x}^{-0.16666666666666666}\right)\\
\end{array}
\end{array}
if x < 4.00000000000000015e154Initial program 9.7%
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-*.f6493.6
Simplified93.6%
associate-/r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.5
Applied egg-rr94.5%
if 4.00000000000000015e154 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.5%
Applied egg-rr92.4%
(FPCore (x) :precision binary64 (if (<= x 4e+154) (* 0.3333333333333333 (cbrt (* (/ 1.0 x) (/ 1.0 x)))) (* 0.3333333333333333 (/ (pow x -0.16666666666666666) (sqrt x)))))
double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = 0.3333333333333333 * (pow(x, -0.16666666666666666) / sqrt(x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * Math.cbrt(((1.0 / x) * (1.0 / x)));
} else {
tmp = 0.3333333333333333 * (Math.pow(x, -0.16666666666666666) / Math.sqrt(x));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 4e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(Float64(1.0 / x) * Float64(1.0 / x)))); else tmp = Float64(0.3333333333333333 * Float64((x ^ -0.16666666666666666) / sqrt(x))); end return tmp end
code[x_] := If[LessEqual[x, 4e+154], N[(0.3333333333333333 * N[Power[N[(N[(1.0 / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[x, -0.16666666666666666], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{1}{x} \cdot \frac{1}{x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{{x}^{-0.16666666666666666}}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 4.00000000000000015e154Initial program 9.7%
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-*.f6493.6
Simplified93.6%
associate-/r*N/A
div-invN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.5
Applied egg-rr94.5%
if 4.00000000000000015e154 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
Applied egg-rr92.4%
(FPCore (x) :precision binary64 (if (<= x 4e+154) (* 0.3333333333333333 (cbrt (/ (/ 1.0 x) x))) (* 0.3333333333333333 (/ (pow x -0.16666666666666666) (sqrt x)))))
double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * cbrt(((1.0 / x) / x));
} else {
tmp = 0.3333333333333333 * (pow(x, -0.16666666666666666) / sqrt(x));
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 4e+154) {
tmp = 0.3333333333333333 * Math.cbrt(((1.0 / x) / x));
} else {
tmp = 0.3333333333333333 * (Math.pow(x, -0.16666666666666666) / Math.sqrt(x));
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 4e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(Float64(1.0 / x) / x))); else tmp = Float64(0.3333333333333333 * Float64((x ^ -0.16666666666666666) / sqrt(x))); end return tmp end
code[x_] := If[LessEqual[x, 4e+154], N[(0.3333333333333333 * N[Power[N[(N[(1.0 / x), $MachinePrecision] / x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[Power[x, -0.16666666666666666], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{{x}^{-0.16666666666666666}}{\sqrt{x}}\\
\end{array}
\end{array}
if x < 4.00000000000000015e154Initial program 9.7%
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-*.f6493.6
Simplified93.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.5
Applied egg-rr94.5%
if 4.00000000000000015e154 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
Applied egg-rr92.4%
(FPCore (x) :precision binary64 (if (<= x 1.4e+155) (* 0.3333333333333333 (cbrt (/ (/ 1.0 x) x))) (* 0.3333333333333333 (pow (/ 1.0 x) 0.6666666666666666))))
double code(double x) {
double tmp;
if (x <= 1.4e+155) {
tmp = 0.3333333333333333 * cbrt(((1.0 / x) / x));
} else {
tmp = 0.3333333333333333 * pow((1.0 / x), 0.6666666666666666);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.4e+155) {
tmp = 0.3333333333333333 * Math.cbrt(((1.0 / x) / x));
} else {
tmp = 0.3333333333333333 * Math.pow((1.0 / x), 0.6666666666666666);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.4e+155) tmp = Float64(0.3333333333333333 * cbrt(Float64(Float64(1.0 / x) / x))); else tmp = Float64(0.3333333333333333 * (Float64(1.0 / x) ^ 0.6666666666666666)); end return tmp end
code[x_] := If[LessEqual[x, 1.4e+155], N[(0.3333333333333333 * N[Power[N[(N[(1.0 / x), $MachinePrecision] / x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[Power[N[(1.0 / x), $MachinePrecision], 0.6666666666666666], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.4 \cdot 10^{+155}:\\
\;\;\;\;0.3333333333333333 \cdot \sqrt[3]{\frac{\frac{1}{x}}{x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot {\left(\frac{1}{x}\right)}^{0.6666666666666666}\\
\end{array}
\end{array}
if x < 1.40000000000000008e155Initial program 9.7%
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-*.f6493.6
Simplified93.6%
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.5
Applied egg-rr94.5%
if 1.40000000000000008e155 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.5%
cbrt-undivN/A
pow1/3N/A
associate-/l/N/A
rem-square-sqrtN/A
div-invN/A
associate-*l/N/A
metadata-evalN/A
frac-2negN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-eval89.3
Applied egg-rr89.3%
(FPCore (x) :precision binary64 (if (<= x 1.35e+154) (* 0.3333333333333333 (cbrt (/ 1.0 (* x x)))) (* 0.3333333333333333 (pow (/ 1.0 x) 0.6666666666666666))))
double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * cbrt((1.0 / (x * x)));
} else {
tmp = 0.3333333333333333 * pow((1.0 / x), 0.6666666666666666);
}
return tmp;
}
public static double code(double x) {
double tmp;
if (x <= 1.35e+154) {
tmp = 0.3333333333333333 * Math.cbrt((1.0 / (x * x)));
} else {
tmp = 0.3333333333333333 * Math.pow((1.0 / x), 0.6666666666666666);
}
return tmp;
}
function code(x) tmp = 0.0 if (x <= 1.35e+154) tmp = Float64(0.3333333333333333 * cbrt(Float64(1.0 / 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[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[Power[N[(1.0 / x), $MachinePrecision], 0.6666666666666666], $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 \cdot x}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot {\left(\frac{1}{x}\right)}^{0.6666666666666666}\\
\end{array}
\end{array}
if x < 1.35000000000000003e154Initial program 9.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-*.f6494.3
Simplified94.3%
if 1.35000000000000003e154 < x Initial program 4.7%
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.7
Simplified4.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-lowering-neg.f6498.5
Applied egg-rr98.5%
rem-square-sqrtN/A
associate-/r*N/A
frac-2negN/A
metadata-evalN/A
inv-powN/A
metadata-evalN/A
metadata-evalN/A
pow-powN/A
pow2N/A
sqr-negN/A
rem-square-sqrtN/A
pow-powN/A
pow1/2N/A
inv-powN/A
/-lowering-/.f64N/A
Applied egg-rr98.6%
cbrt-undivN/A
pow1/3N/A
associate-/l/N/A
rem-square-sqrtN/A
div-invN/A
associate-*l/N/A
metadata-evalN/A
frac-2negN/A
pow2N/A
pow-powN/A
pow-lowering-pow.f64N/A
/-lowering-/.f64N/A
metadata-eval89.3
Applied egg-rr89.3%
(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 7.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-*.f6448.5
Simplified48.5%
cbrt-divN/A
metadata-evalN/A
cbrt-prodN/A
un-div-invN/A
/-lowering-/.f64N/A
pow1/3N/A
pow1/3N/A
pow-sqrN/A
pow-lowering-pow.f64N/A
metadata-eval88.6
Applied egg-rr88.6%
(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 7.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-*.f6448.5
Simplified48.5%
*-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-eval88.6
Applied egg-rr88.6%
Final simplification88.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 Float64(-cbrt(Float64(-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
--lowering--.f64N/A
cbrt-lowering-cbrt.f641.8
Simplified1.8%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.f64N/A
cbrt-lowering-cbrt.f641.8
Simplified1.8%
pow1/3N/A
pow-lowering-pow.f641.8
Applied egg-rr1.8%
sqr-powN/A
pow-prod-downN/A
sqr-negN/A
pow-prod-downN/A
sqr-powN/A
pow1/3N/A
cbrt-lowering-cbrt.f64N/A
neg-lowering-neg.f645.3
Applied egg-rr5.3%
(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 7.2%
Taylor expanded in x around 0
--lowering--.f64N/A
cbrt-lowering-cbrt.f641.8
Simplified1.8%
(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 Float64(-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
--lowering--.f64N/A
cbrt-lowering-cbrt.f641.8
Simplified1.8%
Taylor expanded in x around inf
mul-1-negN/A
neg-lowering-neg.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 2024199
(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)))