
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 0.0235) (/ 2.0 (pow (/ (* (cbrt k) (cbrt (* k 2.0))) (/ (pow (cbrt l) 2.0) t)) 3.0)) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 0.0235) {
tmp = 2.0 / pow(((cbrt(k) * cbrt((k * 2.0))) / (pow(cbrt(l), 2.0) / t)), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.0235) {
tmp = 2.0 / Math.pow(((Math.cbrt(k) * Math.cbrt((k * 2.0))) / (Math.pow(Math.cbrt(l), 2.0) / t)), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 0.0235) tmp = Float64(2.0 / (Float64(Float64(cbrt(k) * cbrt(Float64(k * 2.0))) / Float64((cbrt(l) ^ 2.0) / t)) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 0.0235], N[(2.0 / N[Power[N[(N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[N[(k * 2.0), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.0235:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt[3]{k} \cdot \sqrt[3]{k \cdot 2}}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 0.0235Initial program 51.0%
associate-*l*51.0%
+-commutative51.0%
Simplified51.0%
Taylor expanded in k around 0 51.4%
Taylor expanded in k around 0 53.8%
associate-/l*52.4%
unpow252.4%
associate-*r/59.7%
Simplified59.7%
add-cube-cbrt59.6%
pow359.6%
associate-*l/54.5%
cbrt-div54.5%
*-commutative54.5%
associate-*r/47.7%
cbrt-div48.7%
cbrt-unprod56.0%
pow256.0%
rem-cbrt-cube65.8%
Applied egg-rr65.8%
cbrt-prod75.6%
Applied egg-rr75.6%
if 0.0235 < k Initial program 41.8%
*-commutative41.8%
associate-*l*41.8%
associate-*r*41.8%
+-commutative41.8%
associate-+r+41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in k around inf 63.7%
*-commutative63.7%
unpow263.7%
times-frac68.7%
unpow268.7%
Simplified68.7%
associate-*l/70.2%
associate-/l*83.6%
Applied egg-rr83.6%
associate-/l*84.8%
associate-/r/84.8%
Simplified84.8%
*-un-lft-identity84.8%
add-sqr-sqrt84.6%
times-frac84.6%
*-un-lft-identity84.6%
frac-times84.6%
clear-num84.7%
sqrt-unprod60.2%
add-sqr-sqrt66.9%
clear-num66.8%
remove-double-div66.9%
*-un-lft-identity66.9%
frac-times69.8%
clear-num69.8%
sqrt-unprod63.1%
add-sqr-sqrt91.7%
Applied egg-rr91.7%
Final simplification79.7%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5.5e-169)
(/ 2.0 (pow (* t (* (cbrt (* (/ k l) (/ k l))) (cbrt 2.0))) 3.0))
(if (<= k 0.00126)
(/
2.0
(pow (* (cbrt (* k (* k 2.0))) (/ 1.0 (/ (pow (cbrt l) 2.0) t))) 3.0))
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5.5e-169) {
tmp = 2.0 / pow((t * (cbrt(((k / l) * (k / l))) * cbrt(2.0))), 3.0);
} else if (k <= 0.00126) {
tmp = 2.0 / pow((cbrt((k * (k * 2.0))) * (1.0 / (pow(cbrt(l), 2.0) / t))), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.5e-169) {
tmp = 2.0 / Math.pow((t * (Math.cbrt(((k / l) * (k / l))) * Math.cbrt(2.0))), 3.0);
} else if (k <= 0.00126) {
tmp = 2.0 / Math.pow((Math.cbrt((k * (k * 2.0))) * (1.0 / (Math.pow(Math.cbrt(l), 2.0) / t))), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5.5e-169) tmp = Float64(2.0 / (Float64(t * Float64(cbrt(Float64(Float64(k / l) * Float64(k / l))) * cbrt(2.0))) ^ 3.0)); elseif (k <= 0.00126) tmp = Float64(2.0 / (Float64(cbrt(Float64(k * Float64(k * 2.0))) * Float64(1.0 / Float64((cbrt(l) ^ 2.0) / t))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5.5e-169], N[(2.0 / N[Power[N[(t * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.00126], N[(2.0 / N[Power[N[(N[Power[N[(k * N[(k * 2.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(1.0 / N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{2}{{\left(t \cdot \left(\sqrt[3]{\frac{k}{\ell} \cdot \frac{k}{\ell}} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 0.00126:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{k \cdot \left(k \cdot 2\right)} \cdot \frac{1}{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 5.4999999999999994e-169Initial program 45.4%
associate-*l*45.4%
+-commutative45.4%
Simplified45.4%
Taylor expanded in k around 0 44.5%
Taylor expanded in k around 0 47.1%
associate-/l*45.8%
unpow245.8%
associate-*r/54.8%
Simplified54.8%
add-cube-cbrt54.7%
pow354.7%
associate-*l/47.8%
cbrt-div47.8%
*-commutative47.8%
associate-*r/39.6%
cbrt-div39.6%
cbrt-unprod48.7%
pow248.7%
rem-cbrt-cube59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 46.0%
associate-*r*46.0%
*-commutative46.0%
unpow1/346.1%
unpow246.1%
*-rgt-identity46.1%
unpow246.1%
times-frac65.8%
Simplified65.8%
if 5.4999999999999994e-169 < k < 0.00126000000000000005Initial program 66.9%
associate-*l*66.9%
+-commutative66.9%
Simplified66.9%
Taylor expanded in k around 0 71.0%
Taylor expanded in k around 0 72.5%
associate-/l*71.0%
unpow271.0%
associate-*r/73.5%
Simplified73.5%
add-cube-cbrt73.4%
pow373.4%
associate-*l/73.4%
cbrt-div73.3%
*-commutative73.3%
associate-*r/70.8%
cbrt-div74.4%
cbrt-unprod76.6%
pow276.6%
rem-cbrt-cube84.2%
Applied egg-rr84.2%
div-inv84.2%
Applied egg-rr84.2%
if 0.00126000000000000005 < k Initial program 41.8%
*-commutative41.8%
associate-*l*41.8%
associate-*r*41.8%
+-commutative41.8%
associate-+r+41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in k around inf 63.7%
*-commutative63.7%
unpow263.7%
times-frac68.7%
unpow268.7%
Simplified68.7%
associate-*l/70.2%
associate-/l*83.6%
Applied egg-rr83.6%
associate-/l*84.8%
associate-/r/84.8%
Simplified84.8%
*-un-lft-identity84.8%
add-sqr-sqrt84.6%
times-frac84.6%
*-un-lft-identity84.6%
frac-times84.6%
clear-num84.7%
sqrt-unprod60.2%
add-sqr-sqrt66.9%
clear-num66.8%
remove-double-div66.9%
*-un-lft-identity66.9%
frac-times69.8%
clear-num69.8%
sqrt-unprod63.1%
add-sqr-sqrt91.7%
Applied egg-rr91.7%
Final simplification76.0%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5.5e-169)
(/ 2.0 (pow (* t (* (cbrt (* (/ k l) (/ k l))) (cbrt 2.0))) 3.0))
(if (<= k 0.008)
(/ 2.0 (pow (* t (/ (cbrt (* k (* k 2.0))) (pow (cbrt l) 2.0))) 3.0))
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5.5e-169) {
tmp = 2.0 / pow((t * (cbrt(((k / l) * (k / l))) * cbrt(2.0))), 3.0);
} else if (k <= 0.008) {
tmp = 2.0 / pow((t * (cbrt((k * (k * 2.0))) / pow(cbrt(l), 2.0))), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.5e-169) {
tmp = 2.0 / Math.pow((t * (Math.cbrt(((k / l) * (k / l))) * Math.cbrt(2.0))), 3.0);
} else if (k <= 0.008) {
tmp = 2.0 / Math.pow((t * (Math.cbrt((k * (k * 2.0))) / Math.pow(Math.cbrt(l), 2.0))), 3.0);
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5.5e-169) tmp = Float64(2.0 / (Float64(t * Float64(cbrt(Float64(Float64(k / l) * Float64(k / l))) * cbrt(2.0))) ^ 3.0)); elseif (k <= 0.008) tmp = Float64(2.0 / (Float64(t * Float64(cbrt(Float64(k * Float64(k * 2.0))) / (cbrt(l) ^ 2.0))) ^ 3.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5.5e-169], N[(2.0 / N[Power[N[(t * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.008], N[(2.0 / N[Power[N[(t * N[(N[Power[N[(k * N[(k * 2.0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.5 \cdot 10^{-169}:\\
\;\;\;\;\frac{2}{{\left(t \cdot \left(\sqrt[3]{\frac{k}{\ell} \cdot \frac{k}{\ell}} \cdot \sqrt[3]{2}\right)\right)}^{3}}\\
\mathbf{elif}\;k \leq 0.008:\\
\;\;\;\;\frac{2}{{\left(t \cdot \frac{\sqrt[3]{k \cdot \left(k \cdot 2\right)}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 5.4999999999999994e-169Initial program 45.4%
associate-*l*45.4%
+-commutative45.4%
Simplified45.4%
Taylor expanded in k around 0 44.5%
Taylor expanded in k around 0 47.1%
associate-/l*45.8%
unpow245.8%
associate-*r/54.8%
Simplified54.8%
add-cube-cbrt54.7%
pow354.7%
associate-*l/47.8%
cbrt-div47.8%
*-commutative47.8%
associate-*r/39.6%
cbrt-div39.6%
cbrt-unprod48.7%
pow248.7%
rem-cbrt-cube59.2%
Applied egg-rr59.2%
Taylor expanded in t around 0 46.0%
associate-*r*46.0%
*-commutative46.0%
unpow1/346.1%
unpow246.1%
*-rgt-identity46.1%
unpow246.1%
times-frac65.8%
Simplified65.8%
if 5.4999999999999994e-169 < k < 0.0080000000000000002Initial program 66.9%
associate-*l*66.9%
+-commutative66.9%
Simplified66.9%
Taylor expanded in k around 0 71.0%
Taylor expanded in k around 0 72.5%
associate-/l*71.0%
unpow271.0%
associate-*r/73.5%
Simplified73.5%
add-cube-cbrt73.4%
pow373.4%
associate-*l/73.4%
cbrt-div73.3%
*-commutative73.3%
associate-*r/70.8%
cbrt-div74.4%
cbrt-unprod76.6%
pow276.6%
rem-cbrt-cube84.2%
Applied egg-rr84.2%
associate-/r/84.2%
Applied egg-rr84.2%
if 0.0080000000000000002 < k Initial program 41.8%
*-commutative41.8%
associate-*l*41.8%
associate-*r*41.8%
+-commutative41.8%
associate-+r+41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in k around inf 63.7%
*-commutative63.7%
unpow263.7%
times-frac68.7%
unpow268.7%
Simplified68.7%
associate-*l/70.2%
associate-/l*83.6%
Applied egg-rr83.6%
associate-/l*84.8%
associate-/r/84.8%
Simplified84.8%
*-un-lft-identity84.8%
add-sqr-sqrt84.6%
times-frac84.6%
*-un-lft-identity84.6%
frac-times84.6%
clear-num84.7%
sqrt-unprod60.2%
add-sqr-sqrt66.9%
clear-num66.8%
remove-double-div66.9%
*-un-lft-identity66.9%
frac-times69.8%
clear-num69.8%
sqrt-unprod63.1%
add-sqr-sqrt91.7%
Applied egg-rr91.7%
Final simplification76.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 0.054) (/ 2.0 (* (pow (/ (cbrt (/ k l)) (/ (cbrt l) t)) 3.0) (* k 2.0))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 0.054) {
tmp = 2.0 / (pow((cbrt((k / l)) / (cbrt(l) / t)), 3.0) * (k * 2.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.054) {
tmp = 2.0 / (Math.pow((Math.cbrt((k / l)) / (Math.cbrt(l) / t)), 3.0) * (k * 2.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 0.054) tmp = Float64(2.0 / Float64((Float64(cbrt(Float64(k / l)) / Float64(cbrt(l) / t)) ^ 3.0) * Float64(k * 2.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 0.054], N[(2.0 / N[(N[Power[N[(N[Power[N[(k / l), $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[l, 1/3], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(k * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.054:\\
\;\;\;\;\frac{2}{{\left(\frac{\sqrt[3]{\frac{k}{\ell}}}{\frac{\sqrt[3]{\ell}}{t}}\right)}^{3} \cdot \left(k \cdot 2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 0.0539999999999999994Initial program 51.0%
associate-*l*51.0%
+-commutative51.0%
Simplified51.0%
Taylor expanded in k around 0 51.4%
Taylor expanded in k around 0 53.8%
associate-/l*52.4%
unpow252.4%
associate-*r/59.7%
Simplified59.7%
add-cube-cbrt59.6%
pow359.6%
associate-/r*62.2%
cbrt-div62.1%
cbrt-div62.3%
rem-cbrt-cube68.6%
Applied egg-rr68.6%
if 0.0539999999999999994 < k Initial program 41.8%
*-commutative41.8%
associate-*l*41.8%
associate-*r*41.8%
+-commutative41.8%
associate-+r+41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in k around inf 63.7%
*-commutative63.7%
unpow263.7%
times-frac68.7%
unpow268.7%
Simplified68.7%
associate-*l/70.2%
associate-/l*83.6%
Applied egg-rr83.6%
associate-/l*84.8%
associate-/r/84.8%
Simplified84.8%
*-un-lft-identity84.8%
add-sqr-sqrt84.6%
times-frac84.6%
*-un-lft-identity84.6%
frac-times84.6%
clear-num84.7%
sqrt-unprod60.2%
add-sqr-sqrt66.9%
clear-num66.8%
remove-double-div66.9%
*-un-lft-identity66.9%
frac-times69.8%
clear-num69.8%
sqrt-unprod63.1%
add-sqr-sqrt91.7%
Applied egg-rr91.7%
Final simplification74.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 0.122) (/ 2.0 (* (* k 2.0) (/ k (pow (/ (pow (cbrt l) 2.0) t) 3.0)))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 0.122) {
tmp = 2.0 / ((k * 2.0) * (k / pow((pow(cbrt(l), 2.0) / t), 3.0)));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.122) {
tmp = 2.0 / ((k * 2.0) * (k / Math.pow((Math.pow(Math.cbrt(l), 2.0) / t), 3.0)));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 0.122) tmp = Float64(2.0 / Float64(Float64(k * 2.0) * Float64(k / (Float64((cbrt(l) ^ 2.0) / t) ^ 3.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 0.122], N[(2.0 / N[(N[(k * 2.0), $MachinePrecision] * N[(k / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.122:\\
\;\;\;\;\frac{2}{\left(k \cdot 2\right) \cdot \frac{k}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t}\right)}^{3}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 0.122Initial program 51.0%
associate-*l*51.0%
+-commutative51.0%
Simplified51.0%
Taylor expanded in k around 0 51.4%
Taylor expanded in k around 0 53.8%
associate-/l*52.4%
unpow252.4%
associate-*r/59.7%
Simplified59.7%
add-cube-cbrt59.6%
pow359.6%
associate-*r/52.3%
cbrt-div52.4%
cbrt-unprod59.6%
pow259.6%
rem-cbrt-cube65.7%
Applied egg-rr65.7%
if 0.122 < k Initial program 41.8%
*-commutative41.8%
associate-*l*41.8%
associate-*r*41.8%
+-commutative41.8%
associate-+r+41.8%
metadata-eval41.8%
Simplified41.8%
Taylor expanded in k around inf 63.7%
*-commutative63.7%
unpow263.7%
times-frac68.7%
unpow268.7%
Simplified68.7%
associate-*l/70.2%
associate-/l*83.6%
Applied egg-rr83.6%
associate-/l*84.8%
associate-/r/84.8%
Simplified84.8%
*-un-lft-identity84.8%
add-sqr-sqrt84.6%
times-frac84.6%
*-un-lft-identity84.6%
frac-times84.6%
clear-num84.7%
sqrt-unprod60.2%
add-sqr-sqrt66.9%
clear-num66.8%
remove-double-div66.9%
*-un-lft-identity66.9%
frac-times69.8%
clear-num69.8%
sqrt-unprod63.1%
add-sqr-sqrt91.7%
Applied egg-rr91.7%
Final simplification72.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -1.95e-99)
(/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0)))))
(if (<= t 1.36e-95)
(/ 2.0 (* (* k k) (/ (* t (/ k (/ l k))) l)))
(/ 2.0 (* (* k 2.0) (/ k (pow (/ l (pow t 1.5)) 2.0)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -1.95e-99) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else if (t <= 1.36e-95) {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
} else {
tmp = 2.0 / ((k * 2.0) * (k / pow((l / pow(t, 1.5)), 2.0)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.95d-99)) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else if (t <= 1.36d-95) then
tmp = 2.0d0 / ((k * k) * ((t * (k / (l / k))) / l))
else
tmp = 2.0d0 / ((k * 2.0d0) * (k / ((l / (t ** 1.5d0)) ** 2.0d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -1.95e-99) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else if (t <= 1.36e-95) {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
} else {
tmp = 2.0 / ((k * 2.0) * (k / Math.pow((l / Math.pow(t, 1.5)), 2.0)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -1.95e-99: tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) elif t <= 1.36e-95: tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)) else: tmp = 2.0 / ((k * 2.0) * (k / math.pow((l / math.pow(t, 1.5)), 2.0))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -1.95e-99) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); elseif (t <= 1.36e-95) tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t * Float64(k / Float64(l / k))) / l))); else tmp = Float64(2.0 / Float64(Float64(k * 2.0) * Float64(k / (Float64(l / (t ^ 1.5)) ^ 2.0)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.95e-99) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); elseif (t <= 1.36e-95) tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)); else tmp = 2.0 / ((k * 2.0) * (k / ((l / (t ^ 1.5)) ^ 2.0))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -1.95e-99], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e-95], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * 2.0), $MachinePrecision] * N[(k / N[Power[N[(l / N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-95}:\\
\;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t \cdot \frac{k}{\frac{\ell}{k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(k \cdot 2\right) \cdot \frac{k}{{\left(\frac{\ell}{{t}^{1.5}}\right)}^{2}}}\\
\end{array}
\end{array}
if t < -1.94999999999999994e-99Initial program 62.2%
associate-*l*62.2%
+-commutative62.2%
Simplified62.2%
Taylor expanded in k around 0 59.1%
Taylor expanded in k around 0 61.2%
associate-/l*59.1%
unpow259.1%
associate-*r/61.9%
Simplified61.9%
expm1-log1p-u17.9%
expm1-udef1.3%
associate-*l/1.2%
times-frac1.7%
*-commutative1.7%
div-inv1.7%
pow-flip1.7%
metadata-eval1.7%
Applied egg-rr1.7%
expm1-def19.8%
expm1-log1p66.7%
times-frac67.0%
Simplified67.0%
if -1.94999999999999994e-99 < t < 1.36e-95Initial program 32.5%
*-commutative32.5%
associate-*l*32.5%
associate-*r*32.5%
+-commutative32.5%
associate-+r+32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in k around inf 65.2%
*-commutative65.2%
unpow265.2%
times-frac83.2%
unpow283.2%
Simplified83.2%
Taylor expanded in k around 0 72.8%
unpow273.0%
Simplified72.8%
associate-*l/84.4%
associate-/l*88.7%
Applied egg-rr73.0%
if 1.36e-95 < t Initial program 52.5%
associate-*l*52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in k around 0 47.4%
Taylor expanded in k around 0 51.3%
associate-/l*50.1%
unpow250.1%
associate-*r/54.7%
Simplified54.7%
add-sqr-sqrt54.7%
pow254.7%
associate-*r/50.1%
sqrt-div50.1%
sqrt-unprod34.1%
add-sqr-sqrt54.7%
sqrt-pow165.4%
metadata-eval65.4%
Applied egg-rr65.4%
Final simplification68.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 0.025) (/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0))))) (* (* l l) (/ 2.0 (* (tan k) (* (* k k) (* t (sin k))))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 0.025) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else {
tmp = (l * l) * (2.0 / (tan(k) * ((k * k) * (t * sin(k)))));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 0.025d0) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else
tmp = (l * l) * (2.0d0 / (tan(k) * ((k * k) * (t * sin(k)))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.025) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else {
tmp = (l * l) * (2.0 / (Math.tan(k) * ((k * k) * (t * Math.sin(k)))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 0.025: tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) else: tmp = (l * l) * (2.0 / (math.tan(k) * ((k * k) * (t * math.sin(k))))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 0.025) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(tan(k) * Float64(Float64(k * k) * Float64(t * sin(k)))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 0.025) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); else tmp = (l * l) * (2.0 / (tan(k) * ((k * k) * (t * sin(k))))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 0.025], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.025:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\tan k \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)\right)}\\
\end{array}
\end{array}
if k < 0.025000000000000001Initial program 51.0%
associate-*l*51.0%
+-commutative51.0%
Simplified51.0%
Taylor expanded in k around 0 51.4%
Taylor expanded in k around 0 53.8%
associate-/l*52.4%
unpow252.4%
associate-*r/59.7%
Simplified59.7%
expm1-log1p-u45.6%
expm1-udef27.2%
associate-*l/24.3%
times-frac28.6%
*-commutative28.6%
div-inv28.6%
pow-flip28.6%
metadata-eval28.6%
Applied egg-rr28.6%
expm1-def47.7%
expm1-log1p63.2%
times-frac63.8%
Simplified63.8%
if 0.025000000000000001 < k Initial program 41.8%
associate-/l/41.8%
associate-*l/41.8%
associate-*l/41.8%
associate-/r/41.4%
*-commutative41.4%
associate-/l/40.3%
associate-*r*40.3%
*-commutative40.3%
associate-*r*40.3%
*-commutative40.3%
Simplified40.3%
Taylor expanded in k around inf 63.6%
unpow263.6%
*-commutative63.6%
Simplified63.6%
Final simplification63.8%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 4.9e-42) (/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0))))) (/ 2.0 (* (* (sin k) (tan k)) (* k (* (/ k l) (/ t l)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 4.9e-42) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else {
tmp = 2.0 / ((sin(k) * tan(k)) * (k * ((k / l) * (t / l))));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.9d-42) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else
tmp = 2.0d0 / ((sin(k) * tan(k)) * (k * ((k / l) * (t / l))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.9e-42) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * (k * ((k / l) * (t / l))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 4.9e-42: tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) else: tmp = 2.0 / ((math.sin(k) * math.tan(k)) * (k * ((k / l) * (t / l)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 4.9e-42) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * Float64(k * Float64(Float64(k / l) * Float64(t / l))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.9e-42) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); else tmp = 2.0 / ((sin(k) * tan(k)) * (k * ((k / l) * (t / l)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 4.9e-42], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(k / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.9 \cdot 10^{-42}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot \left(k \cdot \left(\frac{k}{\ell} \cdot \frac{t}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 4.9e-42Initial program 49.4%
associate-*l*49.4%
+-commutative49.4%
Simplified49.4%
Taylor expanded in k around 0 49.2%
Taylor expanded in k around 0 51.7%
associate-/l*50.3%
unpow250.3%
associate-*r/58.1%
Simplified58.1%
expm1-log1p-u44.7%
expm1-udef27.9%
associate-*l/24.8%
times-frac29.4%
*-commutative29.4%
div-inv29.4%
pow-flip29.4%
metadata-eval29.4%
Applied egg-rr29.4%
expm1-def46.9%
expm1-log1p61.8%
times-frac62.5%
Simplified62.5%
if 4.9e-42 < k Initial program 47.0%
*-commutative47.0%
associate-*l*47.0%
associate-*r*47.0%
+-commutative47.0%
associate-+r+47.0%
metadata-eval47.0%
Simplified47.0%
Taylor expanded in k around inf 65.5%
*-commutative65.5%
unpow265.5%
times-frac69.8%
unpow269.8%
Simplified69.8%
associate-*l/71.2%
associate-/l*82.4%
Applied egg-rr82.4%
associate-/l*83.5%
associate-/r/83.5%
Simplified83.5%
associate-/r/81.8%
associate-*r*83.2%
Applied egg-rr83.2%
Final simplification68.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.12e-42) (/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0))))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.12e-42) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.12d-42) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.12e-42) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.12e-42: tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) else: tmp = 2.0 / (((k / l) * (t / (l / k))) * (math.sin(k) * math.tan(k))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.12e-42) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.12e-42) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); else tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.12e-42], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.12 \cdot 10^{-42}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 1.1199999999999999e-42Initial program 49.4%
associate-*l*49.4%
+-commutative49.4%
Simplified49.4%
Taylor expanded in k around 0 49.2%
Taylor expanded in k around 0 51.7%
associate-/l*50.3%
unpow250.3%
associate-*r/58.1%
Simplified58.1%
expm1-log1p-u44.7%
expm1-udef27.9%
associate-*l/24.8%
times-frac29.4%
*-commutative29.4%
div-inv29.4%
pow-flip29.4%
metadata-eval29.4%
Applied egg-rr29.4%
expm1-def46.9%
expm1-log1p61.8%
times-frac62.5%
Simplified62.5%
if 1.1199999999999999e-42 < k Initial program 47.0%
*-commutative47.0%
associate-*l*47.0%
associate-*r*47.0%
+-commutative47.0%
associate-+r+47.0%
metadata-eval47.0%
Simplified47.0%
Taylor expanded in k around inf 65.5%
*-commutative65.5%
unpow265.5%
times-frac69.8%
unpow269.8%
Simplified69.8%
associate-*l/71.2%
associate-/l*82.4%
Applied egg-rr82.4%
associate-/l*83.5%
associate-/r/83.5%
Simplified83.5%
*-un-lft-identity83.5%
add-sqr-sqrt83.3%
times-frac83.3%
*-un-lft-identity83.3%
frac-times83.3%
clear-num83.3%
sqrt-unprod56.0%
add-sqr-sqrt64.3%
clear-num64.3%
remove-double-div64.4%
*-un-lft-identity64.4%
frac-times66.8%
clear-num66.8%
sqrt-unprod58.4%
add-sqr-sqrt89.3%
Applied egg-rr89.3%
Final simplification70.5%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.22e-99) (not (<= t 5.6e-95))) (/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0))))) (/ 2.0 (* (* k k) (/ (* t (/ k (/ l k))) l)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.22e-99) || !(t <= 5.6e-95)) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.22d-99)) .or. (.not. (t <= 5.6d-95))) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else
tmp = 2.0d0 / ((k * k) * ((t * (k / (l / k))) / l))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.22e-99) || !(t <= 5.6e-95)) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.22e-99) or not (t <= 5.6e-95): tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) else: tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.22e-99) || !(t <= 5.6e-95)) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); else tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t * Float64(k / Float64(l / k))) / l))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.22e-99) || ~((t <= 5.6e-95))) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); else tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.22e-99], N[Not[LessEqual[t, 5.6e-95]], $MachinePrecision]], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{-99} \lor \neg \left(t \leq 5.6 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t \cdot \frac{k}{\frac{\ell}{k}}}{\ell}}\\
\end{array}
\end{array}
if t < -1.22e-99 or 5.5999999999999998e-95 < t Initial program 57.9%
associate-*l*57.9%
+-commutative57.9%
Simplified57.9%
Taylor expanded in k around 0 53.9%
Taylor expanded in k around 0 56.8%
associate-/l*55.1%
unpow255.1%
associate-*r/58.7%
Simplified58.7%
expm1-log1p-u34.2%
expm1-udef23.2%
associate-*l/21.6%
times-frac24.8%
*-commutative24.8%
div-inv24.8%
pow-flip24.8%
metadata-eval24.8%
Applied egg-rr24.8%
expm1-def36.6%
expm1-log1p62.9%
times-frac63.7%
Simplified63.7%
if -1.22e-99 < t < 5.5999999999999998e-95Initial program 32.5%
*-commutative32.5%
associate-*l*32.5%
associate-*r*32.5%
+-commutative32.5%
associate-+r+32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in k around inf 65.2%
*-commutative65.2%
unpow265.2%
times-frac83.2%
unpow283.2%
Simplified83.2%
Taylor expanded in k around 0 72.8%
unpow273.0%
Simplified72.8%
associate-*l/84.4%
associate-/l*88.7%
Applied egg-rr73.0%
Final simplification67.1%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -3.5e-99)
(/ 2.0 (* (/ k l) (* (/ k l) (/ 2.0 (pow t -3.0)))))
(if (<= t 9.5e-97)
(/ 2.0 (* (* k k) (/ (* t (/ k (/ l k))) l)))
(/ (/ 2.0 (/ k l)) (/ (* 2.0 (/ k l)) (pow t -3.0))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -3.5e-99) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / pow(t, -3.0))));
} else if (t <= 9.5e-97) {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
} else {
tmp = (2.0 / (k / l)) / ((2.0 * (k / l)) / pow(t, -3.0));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-3.5d-99)) then
tmp = 2.0d0 / ((k / l) * ((k / l) * (2.0d0 / (t ** (-3.0d0)))))
else if (t <= 9.5d-97) then
tmp = 2.0d0 / ((k * k) * ((t * (k / (l / k))) / l))
else
tmp = (2.0d0 / (k / l)) / ((2.0d0 * (k / l)) / (t ** (-3.0d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (t <= -3.5e-99) {
tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / Math.pow(t, -3.0))));
} else if (t <= 9.5e-97) {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
} else {
tmp = (2.0 / (k / l)) / ((2.0 * (k / l)) / Math.pow(t, -3.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -3.5e-99: tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / math.pow(t, -3.0)))) elif t <= 9.5e-97: tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)) else: tmp = (2.0 / (k / l)) / ((2.0 * (k / l)) / math.pow(t, -3.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -3.5e-99) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(k / l) * Float64(2.0 / (t ^ -3.0))))); elseif (t <= 9.5e-97) tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t * Float64(k / Float64(l / k))) / l))); else tmp = Float64(Float64(2.0 / Float64(k / l)) / Float64(Float64(2.0 * Float64(k / l)) / (t ^ -3.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -3.5e-99) tmp = 2.0 / ((k / l) * ((k / l) * (2.0 / (t ^ -3.0)))); elseif (t <= 9.5e-97) tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)); else tmp = (2.0 / (k / l)) / ((2.0 * (k / l)) / (t ^ -3.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -3.5e-99], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(2.0 / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-97], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 * N[(k / l), $MachinePrecision]), $MachinePrecision] / N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(\frac{k}{\ell} \cdot \frac{2}{{t}^{-3}}\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-97}:\\
\;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t \cdot \frac{k}{\frac{\ell}{k}}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{\ell}}}{\frac{2 \cdot \frac{k}{\ell}}{{t}^{-3}}}\\
\end{array}
\end{array}
if t < -3.4999999999999999e-99Initial program 62.2%
associate-*l*62.2%
+-commutative62.2%
Simplified62.2%
Taylor expanded in k around 0 59.1%
Taylor expanded in k around 0 61.2%
associate-/l*59.1%
unpow259.1%
associate-*r/61.9%
Simplified61.9%
expm1-log1p-u17.9%
expm1-udef1.3%
associate-*l/1.2%
times-frac1.7%
*-commutative1.7%
div-inv1.7%
pow-flip1.7%
metadata-eval1.7%
Applied egg-rr1.7%
expm1-def19.8%
expm1-log1p66.7%
times-frac67.0%
Simplified67.0%
if -3.4999999999999999e-99 < t < 9.5000000000000001e-97Initial program 32.5%
*-commutative32.5%
associate-*l*32.5%
associate-*r*32.5%
+-commutative32.5%
associate-+r+32.5%
metadata-eval32.5%
Simplified32.5%
Taylor expanded in k around inf 65.2%
*-commutative65.2%
unpow265.2%
times-frac83.2%
unpow283.2%
Simplified83.2%
Taylor expanded in k around 0 72.8%
unpow273.0%
Simplified72.8%
associate-*l/84.4%
associate-/l*88.7%
Applied egg-rr73.0%
if 9.5000000000000001e-97 < t Initial program 52.5%
associate-*l*52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in k around 0 47.4%
Taylor expanded in k around 0 51.3%
associate-/l*50.1%
unpow250.1%
associate-*r/54.7%
Simplified54.7%
expm1-log1p-u54.7%
expm1-udef50.8%
associate-*l/47.5%
times-frac54.0%
*-commutative54.0%
div-inv54.0%
pow-flip54.0%
metadata-eval54.0%
Applied egg-rr54.0%
expm1-def57.9%
expm1-log1p58.2%
times-frac59.6%
Simplified59.6%
expm1-log1p-u59.4%
expm1-udef54.2%
Applied egg-rr54.2%
expm1-def59.4%
expm1-log1p59.6%
associate-/r*59.6%
associate-*r/59.6%
*-commutative59.6%
Simplified59.6%
Final simplification67.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.05e-96) (not (<= t 1.3e-95))) (* (/ l k) (/ (* l (pow t -3.0)) k)) (/ 2.0 (* (* k k) (/ (* t (/ k (/ l k))) l)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.05e-96) || !(t <= 1.3e-95)) {
tmp = (l / k) * ((l * pow(t, -3.0)) / k);
} else {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.05d-96)) .or. (.not. (t <= 1.3d-95))) then
tmp = (l / k) * ((l * (t ** (-3.0d0))) / k)
else
tmp = 2.0d0 / ((k * k) * ((t * (k / (l / k))) / l))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.05e-96) || !(t <= 1.3e-95)) {
tmp = (l / k) * ((l * Math.pow(t, -3.0)) / k);
} else {
tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.05e-96) or not (t <= 1.3e-95): tmp = (l / k) * ((l * math.pow(t, -3.0)) / k) else: tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.05e-96) || !(t <= 1.3e-95)) tmp = Float64(Float64(l / k) * Float64(Float64(l * (t ^ -3.0)) / k)); else tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t * Float64(k / Float64(l / k))) / l))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.05e-96) || ~((t <= 1.3e-95))) tmp = (l / k) * ((l * (t ^ -3.0)) / k); else tmp = 2.0 / ((k * k) * ((t * (k / (l / k))) / l)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.05e-96], N[Not[LessEqual[t, 1.3e-95]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(N[(l * N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t * N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-96} \lor \neg \left(t \leq 1.3 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell \cdot {t}^{-3}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \frac{t \cdot \frac{k}{\frac{\ell}{k}}}{\ell}}\\
\end{array}
\end{array}
if t < -1.05000000000000001e-96 or 1.3e-95 < t Initial program 58.3%
associate-*l*58.3%
associate-/l/58.3%
*-commutative58.3%
associate-*r/60.0%
associate-/l*58.3%
associate-/r/52.9%
Simplified58.2%
Taylor expanded in k around 0 52.4%
unpow252.4%
unpow252.4%
Simplified52.4%
expm1-log1p-u42.9%
expm1-udef41.8%
times-frac43.7%
div-inv43.7%
pow-flip43.7%
metadata-eval43.7%
Applied egg-rr43.7%
expm1-def45.3%
expm1-log1p55.4%
unpow255.4%
associate-*l/54.3%
unpow254.3%
times-frac63.3%
Simplified63.3%
if -1.05000000000000001e-96 < t < 1.3e-95Initial program 32.2%
*-commutative32.2%
associate-*l*32.2%
associate-*r*32.2%
+-commutative32.2%
associate-+r+32.2%
metadata-eval32.2%
Simplified32.2%
Taylor expanded in k around inf 64.5%
*-commutative64.5%
unpow264.5%
times-frac82.4%
unpow282.4%
Simplified82.4%
Taylor expanded in k around 0 72.1%
unpow272.2%
Simplified72.1%
associate-*l/83.6%
associate-/l*88.8%
Applied egg-rr72.2%
Final simplification66.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* k k))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((k / l) * (t / (l / k))) * (k * k))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
k = abs(k) def code(t, l, k): return 2.0 / (((k / l) * (t / (l / k))) * (k * k))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(k * k))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(k \cdot k\right)}
\end{array}
Initial program 48.7%
*-commutative48.7%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 55.6%
*-commutative55.6%
unpow255.6%
times-frac66.1%
unpow266.1%
Simplified66.1%
associate-*l/65.6%
associate-/l*72.1%
Applied egg-rr72.1%
associate-/l*70.5%
associate-/r/70.5%
Simplified70.5%
*-un-lft-identity70.5%
add-sqr-sqrt70.4%
times-frac70.4%
*-un-lft-identity70.4%
frac-times70.4%
clear-num70.5%
sqrt-unprod43.3%
add-sqr-sqrt49.3%
clear-num49.3%
remove-double-div49.3%
*-un-lft-identity49.3%
frac-times50.0%
clear-num50.0%
sqrt-unprod47.1%
add-sqr-sqrt77.2%
Applied egg-rr77.2%
Taylor expanded in k around 0 57.0%
unpow257.0%
Simplified57.0%
Final simplification57.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* (* k k) (* (/ t l) (/ (* k k) l)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / ((k * k) * ((t / l) * ((k * k) / l)));
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / ((k * k) * ((t / l) * ((k * k) / l)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / ((k * k) * ((t / l) * ((k * k) / l)));
}
k = abs(k) def code(t, l, k): return 2.0 / ((k * k) * ((t / l) * ((k * k) / l)))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(Float64(k * k) / l)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / ((k * k) * ((t / l) * ((k * k) / l))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \frac{k \cdot k}{\ell}\right)}
\end{array}
Initial program 48.7%
*-commutative48.7%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 55.6%
*-commutative55.6%
unpow255.6%
times-frac66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in k around 0 57.6%
unpow257.0%
Simplified57.6%
Final simplification57.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* (* k k) (/ (* (/ t l) (* k k)) l))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / ((k * k) * (((t / l) * (k * k)) / l));
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / ((k * k) * (((t / l) * (k * k)) / l))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / ((k * k) * (((t / l) * (k * k)) / l));
}
k = abs(k) def code(t, l, k): return 2.0 / ((k * k) * (((t / l) * (k * k)) / l))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(k * k) * Float64(Float64(Float64(t / l) * Float64(k * k)) / l))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / ((k * k) * (((t / l) * (k * k)) / l)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(N[(N[(t / l), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\left(k \cdot k\right) \cdot \frac{\frac{t}{\ell} \cdot \left(k \cdot k\right)}{\ell}}
\end{array}
Initial program 48.7%
*-commutative48.7%
associate-*l*46.1%
associate-*r*46.1%
+-commutative46.1%
associate-+r+46.1%
metadata-eval46.1%
Simplified46.1%
Taylor expanded in k around inf 55.6%
*-commutative55.6%
unpow255.6%
times-frac66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in k around 0 57.6%
unpow257.0%
Simplified57.6%
associate-*r/57.6%
Applied egg-rr57.6%
Final simplification57.6%
herbie shell --seed 2023227
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10+)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))