
(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 17 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}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (cbrt (* (sin k) (tan k))))
(t_3 (/ (sqrt 2.0) k))
(t_4 (cbrt (* t_3 (/ t (pow (* (* t t_1) t_2) 2.0)))))
(t_5 (/ (* t_3 (/ 1.0 t_1)) t_2)))
(if (<= (* l l) 1e-150)
(* (* t_4 (pow t_4 2.0)) (/ (* t_3 (pow (cbrt l) 2.0)) t_2))
(if (<= (* l l) 2e+169)
(*
(*
(/ (sqrt 2.0) (* k t))
(cbrt (/ (* (pow l 4.0) (pow (cos k) 2.0)) (pow (sin k) 4.0))))
t_5)
(* t_5 (/ (* (sqrt 2.0) (* t (pow (* t (* t_1 t_2)) -2.0))) k))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double t_3 = sqrt(2.0) / k;
double t_4 = cbrt((t_3 * (t / pow(((t * t_1) * t_2), 2.0))));
double t_5 = (t_3 * (1.0 / t_1)) / t_2;
double tmp;
if ((l * l) <= 1e-150) {
tmp = (t_4 * pow(t_4, 2.0)) * ((t_3 * pow(cbrt(l), 2.0)) / t_2);
} else if ((l * l) <= 2e+169) {
tmp = ((sqrt(2.0) / (k * t)) * cbrt(((pow(l, 4.0) * pow(cos(k), 2.0)) / pow(sin(k), 4.0)))) * t_5;
} else {
tmp = t_5 * ((sqrt(2.0) * (t * pow((t * (t_1 * t_2)), -2.0))) / k);
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_3 = Math.sqrt(2.0) / k;
double t_4 = Math.cbrt((t_3 * (t / Math.pow(((t * t_1) * t_2), 2.0))));
double t_5 = (t_3 * (1.0 / t_1)) / t_2;
double tmp;
if ((l * l) <= 1e-150) {
tmp = (t_4 * Math.pow(t_4, 2.0)) * ((t_3 * Math.pow(Math.cbrt(l), 2.0)) / t_2);
} else if ((l * l) <= 2e+169) {
tmp = ((Math.sqrt(2.0) / (k * t)) * Math.cbrt(((Math.pow(l, 4.0) * Math.pow(Math.cos(k), 2.0)) / Math.pow(Math.sin(k), 4.0)))) * t_5;
} else {
tmp = t_5 * ((Math.sqrt(2.0) * (t * Math.pow((t * (t_1 * t_2)), -2.0))) / k);
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(sqrt(2.0) / k) t_4 = cbrt(Float64(t_3 * Float64(t / (Float64(Float64(t * t_1) * t_2) ^ 2.0)))) t_5 = Float64(Float64(t_3 * Float64(1.0 / t_1)) / t_2) tmp = 0.0 if (Float64(l * l) <= 1e-150) tmp = Float64(Float64(t_4 * (t_4 ^ 2.0)) * Float64(Float64(t_3 * (cbrt(l) ^ 2.0)) / t_2)); elseif (Float64(l * l) <= 2e+169) tmp = Float64(Float64(Float64(sqrt(2.0) / Float64(k * t)) * cbrt(Float64(Float64((l ^ 4.0) * (cos(k) ^ 2.0)) / (sin(k) ^ 4.0)))) * t_5); else tmp = Float64(t_5 * Float64(Float64(sqrt(2.0) * Float64(t * (Float64(t * Float64(t_1 * t_2)) ^ -2.0))) / k)); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(t$95$3 * N[(t / N[Power[N[(N[(t * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$5 = N[(N[(t$95$3 * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 1e-150], N[(N[(t$95$4 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 * N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+169], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[Power[l, 4.0], $MachinePrecision] * N[Power[N[Cos[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision], N[(t$95$5 * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := \sqrt[3]{t\_3 \cdot \frac{t}{{\left(\left(t \cdot t\_1\right) \cdot t\_2\right)}^{2}}}\\
t_5 := \frac{t\_3 \cdot \frac{1}{t\_1}}{t\_2}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-150}:\\
\;\;\;\;\left(t\_4 \cdot {t\_4}^{2}\right) \cdot \frac{t\_3 \cdot {\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+169}:\\
\;\;\;\;\left(\frac{\sqrt{2}}{k \cdot t} \cdot \sqrt[3]{\frac{{\ell}^{4} \cdot {\cos k}^{2}}{{\sin k}^{4}}}\right) \cdot t\_5\\
\mathbf{else}:\\
\;\;\;\;t\_5 \cdot \frac{\sqrt{2} \cdot \left(t \cdot {\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{-2}\right)}{k}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.00000000000000001e-150Initial program 27.4%
*-commutative27.4%
associate-/r*27.4%
Simplified36.3%
add-sqr-sqrt36.3%
add-cube-cbrt36.3%
times-frac36.3%
Applied egg-rr82.7%
associate-/r/82.7%
associate-/r*82.7%
associate-/r/83.3%
Simplified83.3%
add-cube-cbrt83.3%
Applied egg-rr83.3%
associate-/l*86.6%
div-inv86.6%
pow-flip86.6%
metadata-eval86.6%
Applied egg-rr86.6%
associate-/r*86.6%
*-inverses86.6%
Simplified86.6%
associate-*l/86.6%
pow-flip86.6%
metadata-eval86.6%
Applied egg-rr86.6%
associate-*l/86.6%
Simplified86.6%
if 1.00000000000000001e-150 < (*.f64 l l) < 1.99999999999999987e169Initial program 45.6%
*-commutative45.6%
associate-/r*45.6%
Simplified50.7%
add-sqr-sqrt50.7%
add-cube-cbrt50.7%
times-frac50.7%
Applied egg-rr85.7%
associate-/r/85.7%
associate-/r*85.7%
associate-/r/85.7%
Simplified85.7%
add-cube-cbrt85.7%
Applied egg-rr85.8%
associate-/l*85.9%
div-inv85.9%
pow-flip85.9%
metadata-eval85.9%
Applied egg-rr85.9%
associate-/r*85.9%
*-inverses85.9%
Simplified85.9%
Taylor expanded in k around inf 97.8%
if 1.99999999999999987e169 < (*.f64 l l) Initial program 41.9%
*-commutative41.9%
associate-/r*41.9%
Simplified43.1%
add-sqr-sqrt43.1%
add-cube-cbrt43.1%
times-frac43.1%
Applied egg-rr78.4%
associate-/r/78.4%
associate-/r*78.4%
associate-/r/79.5%
Simplified79.5%
add-cube-cbrt79.5%
Applied egg-rr79.5%
associate-/l*86.1%
div-inv86.1%
pow-flip86.1%
metadata-eval86.1%
Applied egg-rr86.1%
associate-/r*86.1%
*-inverses86.1%
Simplified86.1%
unpow286.1%
add-cube-cbrt86.1%
associate-*l/86.1%
Applied egg-rr87.4%
Final simplification89.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0))
(t_2 (cbrt (* (sin k) (tan k))))
(t_3 (/ (* (/ (sqrt 2.0) k) (/ 1.0 t_1)) t_2)))
(if (or (<= (* l l) 1e-150) (not (<= (* l l) 2e+169)))
(* t_3 (/ (* (sqrt 2.0) (* t (pow (* t (* t_1 t_2)) -2.0))) k))
(*
(*
(/ (sqrt 2.0) (* k t))
(cbrt (/ (* (pow l 4.0) (pow (cos k) 2.0)) (pow (sin k) 4.0))))
t_3))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double t_3 = ((sqrt(2.0) / k) * (1.0 / t_1)) / t_2;
double tmp;
if (((l * l) <= 1e-150) || !((l * l) <= 2e+169)) {
tmp = t_3 * ((sqrt(2.0) * (t * pow((t * (t_1 * t_2)), -2.0))) / k);
} else {
tmp = ((sqrt(2.0) / (k * t)) * cbrt(((pow(l, 4.0) * pow(cos(k), 2.0)) / pow(sin(k), 4.0)))) * t_3;
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_3 = ((Math.sqrt(2.0) / k) * (1.0 / t_1)) / t_2;
double tmp;
if (((l * l) <= 1e-150) || !((l * l) <= 2e+169)) {
tmp = t_3 * ((Math.sqrt(2.0) * (t * Math.pow((t * (t_1 * t_2)), -2.0))) / k);
} else {
tmp = ((Math.sqrt(2.0) / (k * t)) * Math.cbrt(((Math.pow(l, 4.0) * Math.pow(Math.cos(k), 2.0)) / Math.pow(Math.sin(k), 4.0)))) * t_3;
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(Float64(Float64(sqrt(2.0) / k) * Float64(1.0 / t_1)) / t_2) tmp = 0.0 if ((Float64(l * l) <= 1e-150) || !(Float64(l * l) <= 2e+169)) tmp = Float64(t_3 * Float64(Float64(sqrt(2.0) * Float64(t * (Float64(t * Float64(t_1 * t_2)) ^ -2.0))) / k)); else tmp = Float64(Float64(Float64(sqrt(2.0) / Float64(k * t)) * cbrt(Float64(Float64((l ^ 4.0) * (cos(k) ^ 2.0)) / (sin(k) ^ 4.0)))) * t_3); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[N[(l * l), $MachinePrecision], 1e-150], N[Not[LessEqual[N[(l * l), $MachinePrecision], 2e+169]], $MachinePrecision]], N[(t$95$3 * N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(t * N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[Power[l, 4.0], $MachinePrecision] * N[Power[N[Cos[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\frac{\sqrt{2}}{k} \cdot \frac{1}{t\_1}}{t\_2}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-150} \lor \neg \left(\ell \cdot \ell \leq 2 \cdot 10^{+169}\right):\\
\;\;\;\;t\_3 \cdot \frac{\sqrt{2} \cdot \left(t \cdot {\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{-2}\right)}{k}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\sqrt{2}}{k \cdot t} \cdot \sqrt[3]{\frac{{\ell}^{4} \cdot {\cos k}^{2}}{{\sin k}^{4}}}\right) \cdot t\_3\\
\end{array}
\end{array}
if (*.f64 l l) < 1.00000000000000001e-150 or 1.99999999999999987e169 < (*.f64 l l) Initial program 34.3%
*-commutative34.3%
associate-/r*34.3%
Simplified39.5%
add-sqr-sqrt39.5%
add-cube-cbrt39.5%
times-frac39.5%
Applied egg-rr80.6%
associate-/r/80.6%
associate-/r*80.6%
associate-/r/81.5%
Simplified81.5%
add-cube-cbrt81.5%
Applied egg-rr81.5%
associate-/l*86.4%
div-inv86.4%
pow-flip86.4%
metadata-eval86.4%
Applied egg-rr86.4%
associate-/r*86.4%
*-inverses86.4%
Simplified86.4%
unpow286.4%
add-cube-cbrt86.4%
associate-*l/86.4%
Applied egg-rr86.5%
if 1.00000000000000001e-150 < (*.f64 l l) < 1.99999999999999987e169Initial program 45.6%
*-commutative45.6%
associate-/r*45.6%
Simplified50.7%
add-sqr-sqrt50.7%
add-cube-cbrt50.7%
times-frac50.7%
Applied egg-rr85.7%
associate-/r/85.7%
associate-/r*85.7%
associate-/r/85.7%
Simplified85.7%
add-cube-cbrt85.7%
Applied egg-rr85.8%
associate-/l*85.9%
div-inv85.9%
pow-flip85.9%
metadata-eval85.9%
Applied egg-rr85.9%
associate-/r*85.9%
*-inverses85.9%
Simplified85.9%
Taylor expanded in k around inf 97.8%
Final simplification89.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (tan k)))) (t_2 (/ (sqrt 2.0) k)))
(if (or (<= l 6.8e-162) (not (<= l 1.15e+202)))
(*
(* t_2 t)
(*
(pow (* (* t (pow (cbrt l) -2.0)) t_1) -2.0)
(* t_2 (/ (pow (cbrt l) 2.0) t_1))))
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k)));
double t_2 = sqrt(2.0) / k;
double tmp;
if ((l <= 6.8e-162) || !(l <= 1.15e+202)) {
tmp = (t_2 * t) * (pow(((t * pow(cbrt(l), -2.0)) * t_1), -2.0) * (t_2 * (pow(cbrt(l), 2.0) / t_1)));
} else {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_2 = Math.sqrt(2.0) / k;
double tmp;
if ((l <= 6.8e-162) || !(l <= 1.15e+202)) {
tmp = (t_2 * t) * (Math.pow(((t * Math.pow(Math.cbrt(l), -2.0)) * t_1), -2.0) * (t_2 * (Math.pow(Math.cbrt(l), 2.0) / t_1)));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * tan(k))) t_2 = Float64(sqrt(2.0) / k) tmp = 0.0 if ((l <= 6.8e-162) || !(l <= 1.15e+202)) tmp = Float64(Float64(t_2 * t) * Float64((Float64(Float64(t * (cbrt(l) ^ -2.0)) * t_1) ^ -2.0) * Float64(t_2 * Float64((cbrt(l) ^ 2.0) / t_1)))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, If[Or[LessEqual[l, 6.8e-162], N[Not[LessEqual[l, 1.15e+202]], $MachinePrecision]], N[(N[(t$95$2 * t), $MachinePrecision] * N[(N[Power[N[(N[(t * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], -2.0], $MachinePrecision] * N[(t$95$2 * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := \frac{\sqrt{2}}{k}\\
\mathbf{if}\;\ell \leq 6.8 \cdot 10^{-162} \lor \neg \left(\ell \leq 1.15 \cdot 10^{+202}\right):\\
\;\;\;\;\left(t\_2 \cdot t\right) \cdot \left({\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot t\_1\right)}^{-2} \cdot \left(t\_2 \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if l < 6.8e-162 or 1.15e202 < l Initial program 31.3%
*-commutative31.3%
associate-/r*31.3%
Simplified37.3%
add-sqr-sqrt37.3%
add-cube-cbrt37.3%
times-frac37.3%
Applied egg-rr81.6%
associate-/r/81.6%
associate-/r*81.6%
associate-/r/82.0%
Simplified82.0%
add-cube-cbrt82.0%
Applied egg-rr82.0%
associate-/l*85.3%
div-inv85.3%
pow-flip85.3%
metadata-eval85.3%
Applied egg-rr85.3%
associate-/r*85.3%
*-inverses85.3%
Simplified85.3%
Applied egg-rr81.0%
associate-*r/81.7%
associate-*l*80.9%
*-commutative80.9%
associate-*r/80.9%
Simplified80.9%
if 6.8e-162 < l < 1.15e202Initial program 47.9%
*-commutative47.9%
associate-/r*47.9%
Simplified51.5%
add-cube-cbrt51.5%
div-inv51.5%
times-frac51.5%
Applied egg-rr69.3%
associate-*l/70.3%
associate-/l*70.3%
associate-/l/67.2%
unpow267.2%
unpow367.2%
*-commutative67.2%
Simplified60.5%
Taylor expanded in l around -inf 90.2%
associate-*r*90.2%
associate-*r/90.2%
associate-*r*90.2%
times-frac94.4%
*-commutative94.4%
Simplified94.4%
Final simplification85.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (cbrt (* (sin k) (tan k))))
(t_2 (pow (* (* t (pow (cbrt l) -2.0)) t_1) -2.0))
(t_3 (/ (sqrt 2.0) k))
(t_4 (* t_3 t))
(t_5 (pow (cbrt l) 2.0)))
(if (<= l 1.85e-161)
(/ (* (* t_3 t_5) (* t_4 t_2)) t_1)
(if (<= l 1.15e+202)
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0))))
(* t_4 (* t_2 (* t_3 (/ t_5 t_1))))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k)));
double t_2 = pow(((t * pow(cbrt(l), -2.0)) * t_1), -2.0);
double t_3 = sqrt(2.0) / k;
double t_4 = t_3 * t;
double t_5 = pow(cbrt(l), 2.0);
double tmp;
if (l <= 1.85e-161) {
tmp = ((t_3 * t_5) * (t_4 * t_2)) / t_1;
} else if (l <= 1.15e+202) {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
} else {
tmp = t_4 * (t_2 * (t_3 * (t_5 / t_1)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_2 = Math.pow(((t * Math.pow(Math.cbrt(l), -2.0)) * t_1), -2.0);
double t_3 = Math.sqrt(2.0) / k;
double t_4 = t_3 * t;
double t_5 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (l <= 1.85e-161) {
tmp = ((t_3 * t_5) * (t_4 * t_2)) / t_1;
} else if (l <= 1.15e+202) {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
} else {
tmp = t_4 * (t_2 * (t_3 * (t_5 / t_1)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(Float64(sin(k) * tan(k))) t_2 = Float64(Float64(t * (cbrt(l) ^ -2.0)) * t_1) ^ -2.0 t_3 = Float64(sqrt(2.0) / k) t_4 = Float64(t_3 * t) t_5 = cbrt(l) ^ 2.0 tmp = 0.0 if (l <= 1.85e-161) tmp = Float64(Float64(Float64(t_3 * t_5) * Float64(t_4 * t_2)) / t_1); elseif (l <= 1.15e+202) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); else tmp = Float64(t_4 * Float64(t_2 * Float64(t_3 * Float64(t_5 / t_1)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[(t * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, 1.85e-161], N[(N[(N[(t$95$3 * t$95$5), $MachinePrecision] * N[(t$95$4 * t$95$2), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[l, 1.15e+202], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(t$95$2 * N[(t$95$3 * N[(t$95$5 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := {\left(\left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot t\_1\right)}^{-2}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := t\_3 \cdot t\\
t_5 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;\ell \leq 1.85 \cdot 10^{-161}:\\
\;\;\;\;\frac{\left(t\_3 \cdot t\_5\right) \cdot \left(t\_4 \cdot t\_2\right)}{t\_1}\\
\mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+202}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(t\_2 \cdot \left(t\_3 \cdot \frac{t\_5}{t\_1}\right)\right)\\
\end{array}
\end{array}
if l < 1.8499999999999999e-161Initial program 28.8%
*-commutative28.8%
associate-/r*28.8%
Simplified36.0%
add-sqr-sqrt36.0%
add-cube-cbrt35.9%
times-frac36.0%
Applied egg-rr82.3%
associate-/r/82.3%
associate-/r*82.3%
associate-/r/82.8%
Simplified82.8%
add-cube-cbrt82.8%
Applied egg-rr82.8%
associate-/l*86.0%
div-inv86.0%
pow-flip86.0%
metadata-eval86.0%
Applied egg-rr86.0%
associate-/r*86.0%
*-inverses86.0%
Simplified86.0%
Applied egg-rr81.2%
if 1.8499999999999999e-161 < l < 1.15e202Initial program 47.9%
*-commutative47.9%
associate-/r*47.9%
Simplified51.5%
add-cube-cbrt51.5%
div-inv51.5%
times-frac51.5%
Applied egg-rr69.3%
associate-*l/70.3%
associate-/l*70.3%
associate-/l/67.2%
unpow267.2%
unpow367.2%
*-commutative67.2%
Simplified60.5%
Taylor expanded in l around -inf 90.2%
associate-*r*90.2%
associate-*r/90.2%
associate-*r*90.2%
times-frac94.4%
*-commutative94.4%
Simplified94.4%
if 1.15e202 < l Initial program 44.4%
*-commutative44.4%
associate-/r*44.4%
Simplified44.4%
add-sqr-sqrt44.4%
add-cube-cbrt44.4%
times-frac44.4%
Applied egg-rr77.9%
associate-/r/77.9%
associate-/r*77.9%
associate-/r/77.9%
Simplified77.9%
add-cube-cbrt78.0%
Applied egg-rr78.0%
associate-/l*81.7%
div-inv81.7%
pow-flip81.7%
metadata-eval81.7%
Applied egg-rr81.7%
associate-/r*81.7%
*-inverses81.7%
Simplified81.7%
Applied egg-rr79.7%
associate-*r/79.7%
associate-*l*79.7%
*-commutative79.7%
associate-*r/79.7%
Simplified79.7%
Final simplification85.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ t (pow (cbrt l) 2.0))) (t_2 (* (/ (sqrt 2.0) k) t)))
(if (<= (* l l) 0.0)
(*
(/ t_2 (pow (* t_1 (cbrt (pow k 2.0))) 2.0))
(/ (/ t_2 t_1) (cbrt (* (sin k) (tan k)))))
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double t_1 = t / pow(cbrt(l), 2.0);
double t_2 = (sqrt(2.0) / k) * t;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t_2 / pow((t_1 * cbrt(pow(k, 2.0))), 2.0)) * ((t_2 / t_1) / cbrt((sin(k) * tan(k))));
} else {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = t / Math.pow(Math.cbrt(l), 2.0);
double t_2 = (Math.sqrt(2.0) / k) * t;
double tmp;
if ((l * l) <= 0.0) {
tmp = (t_2 / Math.pow((t_1 * Math.cbrt(Math.pow(k, 2.0))), 2.0)) * ((t_2 / t_1) / Math.cbrt((Math.sin(k) * Math.tan(k))));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(t / (cbrt(l) ^ 2.0)) t_2 = Float64(Float64(sqrt(2.0) / k) * t) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(Float64(t_2 / (Float64(t_1 * cbrt((k ^ 2.0))) ^ 2.0)) * Float64(Float64(t_2 / t_1) / cbrt(Float64(sin(k) * tan(k))))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[(N[(t$95$2 / N[Power[N[(t$95$1 * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 / t$95$1), $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t_2 := \frac{\sqrt{2}}{k} \cdot t\\
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;\frac{t\_2}{{\left(t\_1 \cdot \sqrt[3]{{k}^{2}}\right)}^{2}} \cdot \frac{\frac{t\_2}{t\_1}}{\sqrt[3]{\sin k \cdot \tan k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 15.7%
*-commutative15.7%
associate-/r*15.7%
Simplified24.8%
add-sqr-sqrt24.8%
add-cube-cbrt24.8%
times-frac24.8%
Applied egg-rr75.8%
associate-/r/75.8%
associate-/r*75.9%
associate-/r/76.7%
Simplified76.7%
Taylor expanded in k around 0 72.1%
if 0.0 < (*.f64 l l) Initial program 44.7%
*-commutative44.7%
associate-/r*44.7%
Simplified48.5%
add-cube-cbrt48.5%
div-inv48.5%
times-frac48.5%
Applied egg-rr71.7%
associate-*l/72.1%
associate-/l*72.1%
associate-/l/69.4%
unpow269.4%
unpow369.4%
*-commutative69.4%
Simplified61.0%
Taylor expanded in l around -inf 82.7%
associate-*r*82.7%
associate-*r/82.7%
associate-*r*82.7%
times-frac86.3%
*-commutative86.3%
Simplified86.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (cbrt (* (sin k) (tan k))) (/ t (pow (cbrt l) 2.0)))))
(if (<= k 3.6e-136)
(* (/ 2.0 (pow t_1 2.0)) (/ (pow (/ k t) -2.0) t_1))
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double t_1 = cbrt((sin(k) * tan(k))) * (t / pow(cbrt(l), 2.0));
double tmp;
if (k <= 3.6e-136) {
tmp = (2.0 / pow(t_1, 2.0)) * (pow((k / t), -2.0) / t_1);
} else {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k))) * (t / Math.pow(Math.cbrt(l), 2.0));
double tmp;
if (k <= 3.6e-136) {
tmp = (2.0 / Math.pow(t_1, 2.0)) * (Math.pow((k / t), -2.0) / t_1);
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(cbrt(Float64(sin(k) * tan(k))) * Float64(t / (cbrt(l) ^ 2.0))) tmp = 0.0 if (k <= 3.6e-136) tmp = Float64(Float64(2.0 / (t_1 ^ 2.0)) * Float64((Float64(k / t) ^ -2.0) / t_1)); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3.6e-136], N[(N[(2.0 / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
\mathbf{if}\;k \leq 3.6 \cdot 10^{-136}:\\
\;\;\;\;\frac{2}{{t\_1}^{2}} \cdot \frac{{\left(\frac{k}{t}\right)}^{-2}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 3.5999999999999998e-136Initial program 37.7%
*-commutative37.7%
associate-/r*37.7%
Simplified42.1%
add-cube-cbrt42.1%
div-inv42.1%
times-frac42.1%
Applied egg-rr71.7%
if 3.5999999999999998e-136 < k Initial program 35.8%
*-commutative35.8%
associate-/r*35.8%
Simplified42.3%
add-cube-cbrt42.3%
div-inv42.3%
times-frac42.3%
Applied egg-rr63.6%
associate-*l/63.6%
associate-/l*63.6%
associate-/l/61.3%
unpow261.3%
unpow361.3%
*-commutative61.3%
Simplified59.3%
Taylor expanded in l around -inf 72.3%
associate-*r*72.3%
associate-*r/72.3%
associate-*r*72.3%
times-frac74.4%
*-commutative74.4%
Simplified74.4%
Final simplification72.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (cbrt l) -2.0)) (t_2 (cbrt (* (sin k) (tan k)))))
(if (<= k 1.6e-136)
(/
(/ (/ (* 2.0 (* (/ t k) (/ t k))) (* t t_1)) t_2)
(pow (* t (* t_1 t_2)) 2.0))
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double t_1 = pow(cbrt(l), -2.0);
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if (k <= 1.6e-136) {
tmp = (((2.0 * ((t / k) * (t / k))) / (t * t_1)) / t_2) / pow((t * (t_1 * t_2)), 2.0);
} else {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.cbrt(l), -2.0);
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if (k <= 1.6e-136) {
tmp = (((2.0 * ((t / k) * (t / k))) / (t * t_1)) / t_2) / Math.pow((t * (t_1 * t_2)), 2.0);
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) t_1 = cbrt(l) ^ -2.0 t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (k <= 1.6e-136) tmp = Float64(Float64(Float64(Float64(2.0 * Float64(Float64(t / k) * Float64(t / k))) / Float64(t * t_1)) / t_2) / (Float64(t * Float64(t_1 * t_2)) ^ 2.0)); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[k, 1.6e-136], N[(N[(N[(N[(2.0 * N[(N[(t / k), $MachinePrecision] * N[(t / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / N[Power[N[(t * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
\mathbf{if}\;k \leq 1.6 \cdot 10^{-136}:\\
\;\;\;\;\frac{\frac{\frac{2 \cdot \left(\frac{t}{k} \cdot \frac{t}{k}\right)}{t \cdot t\_1}}{t\_2}}{{\left(t \cdot \left(t\_1 \cdot t\_2\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 1.59999999999999996e-136Initial program 37.7%
*-commutative37.7%
associate-/r*37.7%
Simplified42.1%
add-sqr-sqrt42.1%
add-cube-cbrt42.1%
times-frac42.1%
Applied egg-rr82.5%
associate-/r/82.5%
associate-/r*82.5%
associate-/r/83.1%
Simplified83.1%
associate-*l/81.3%
associate-*l/81.3%
associate-*l/81.3%
div-inv81.3%
pow-flip81.3%
metadata-eval81.3%
Applied egg-rr81.3%
associate-*r/81.1%
associate-*r/72.9%
associate-/l*72.9%
associate-/l*72.9%
swap-sqr72.9%
rem-square-sqrt72.9%
associate-*l*72.9%
Simplified72.9%
if 1.59999999999999996e-136 < k Initial program 35.8%
*-commutative35.8%
associate-/r*35.8%
Simplified42.3%
add-cube-cbrt42.3%
div-inv42.3%
times-frac42.3%
Applied egg-rr63.6%
associate-*l/63.6%
associate-/l*63.6%
associate-/l/61.3%
unpow261.3%
unpow361.3%
*-commutative61.3%
Simplified59.3%
Taylor expanded in l around -inf 72.3%
associate-*r*72.3%
associate-*r/72.3%
associate-*r*72.3%
times-frac74.4%
*-commutative74.4%
Simplified74.4%
(FPCore (t l k)
:precision binary64
(if (<= k 5.2e-137)
(/
(* 2.0 (pow (/ k t) -2.0))
(pow (* t (* (pow (cbrt l) -2.0) (cbrt (* (sin k) (tan k))))) 3.0))
(*
(/ 2.0 (pow k 2.0))
(/
(* (pow l 2.0) (* (cos k) (pow (cbrt -1.0) 6.0)))
(* t (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e-137) {
tmp = (2.0 * pow((k / t), -2.0)) / pow((t * (pow(cbrt(l), -2.0) * cbrt((sin(k) * tan(k))))), 3.0);
} else {
tmp = (2.0 / pow(k, 2.0)) * ((pow(l, 2.0) * (cos(k) * pow(cbrt(-1.0), 6.0))) / (t * pow(sin(k), 2.0)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.2e-137) {
tmp = (2.0 * Math.pow((k / t), -2.0)) / Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((Math.sin(k) * Math.tan(k))))), 3.0);
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * ((Math.pow(l, 2.0) * (Math.cos(k) * Math.pow(Math.cbrt(-1.0), 6.0))) / (t * Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 5.2e-137) tmp = Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(sin(k) * tan(k))))) ^ 3.0)); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64(Float64((l ^ 2.0) * Float64(cos(k) * (cbrt(-1.0) ^ 6.0))) / Float64(t * (sin(k) ^ 2.0)))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 5.2e-137], N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.2 \cdot 10^{-137}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{{\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2} \cdot \left(\cos k \cdot {\left(\sqrt[3]{-1}\right)}^{6}\right)}{t \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 5.1999999999999999e-137Initial program 37.7%
*-commutative37.7%
associate-/r*37.7%
Simplified42.1%
add-cube-cbrt42.1%
div-inv42.1%
times-frac42.1%
Applied egg-rr71.7%
associate-*l/72.9%
associate-/l*72.9%
associate-/l/68.2%
unpow268.2%
unpow368.2%
*-commutative68.2%
Simplified58.4%
add-cube-cbrt58.4%
pow358.4%
cbrt-prod58.4%
unpow358.4%
add-cbrt-cube68.2%
*-commutative68.2%
div-inv68.2%
pow-flip68.2%
metadata-eval68.2%
associate-*l*68.3%
Applied egg-rr68.3%
if 5.1999999999999999e-137 < k Initial program 35.8%
*-commutative35.8%
associate-/r*35.8%
Simplified42.3%
add-cube-cbrt42.3%
div-inv42.3%
times-frac42.3%
Applied egg-rr63.6%
associate-*l/63.6%
associate-/l*63.6%
associate-/l/61.3%
unpow261.3%
unpow361.3%
*-commutative61.3%
Simplified59.3%
Taylor expanded in l around -inf 72.3%
associate-*r*72.3%
associate-*r/72.3%
associate-*r*72.3%
times-frac74.4%
*-commutative74.4%
Simplified74.4%
(FPCore (t l k)
:precision binary64
(if (<= k 3e-136)
(/
(* 2.0 (pow (/ k t) -2.0))
(pow (* t (* (pow (cbrt l) -2.0) (cbrt (* (sin k) (tan k))))) 3.0))
(*
2.0
(* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3e-136) {
tmp = (2.0 * pow((k / t), -2.0)) / pow((t * (pow(cbrt(l), -2.0) * cbrt((sin(k) * tan(k))))), 3.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3e-136) {
tmp = (2.0 * Math.pow((k / t), -2.0)) / Math.pow((t * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((Math.sin(k) * Math.tan(k))))), 3.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (k <= 3e-136) tmp = Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / (Float64(t * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(sin(k) * tan(k))))) ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
code[t_, l_, k_] := If[LessEqual[k, 3e-136], N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3 \cdot 10^{-136}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{{\left(t \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 2.9999999999999998e-136Initial program 37.7%
*-commutative37.7%
associate-/r*37.7%
Simplified42.1%
add-cube-cbrt42.1%
div-inv42.1%
times-frac42.1%
Applied egg-rr71.7%
associate-*l/72.9%
associate-/l*72.9%
associate-/l/68.2%
unpow268.2%
unpow368.2%
*-commutative68.2%
Simplified58.4%
add-cube-cbrt58.4%
pow358.4%
cbrt-prod58.4%
unpow358.4%
add-cbrt-cube68.2%
*-commutative68.2%
div-inv68.2%
pow-flip68.2%
metadata-eval68.2%
associate-*l*68.3%
Applied egg-rr68.3%
if 2.9999999999999998e-136 < k Initial program 35.8%
Simplified43.3%
Taylor expanded in t around 0 72.3%
times-frac73.5%
Simplified73.5%
(FPCore (t l k)
:precision binary64
(if (<= k 6e-159)
(/
(* 2.0 (pow (/ k t) -2.0))
(log (pow (exp (sin k)) (/ (* k (pow t 3.0)) (pow l 2.0)))))
(if (<= k 9.2e-60)
(pow
(/
(* (/ (sqrt 2.0) k) (/ t (/ (pow t 1.5) l)))
(sqrt (* (sin k) (tan k))))
2.0)
(*
2.0
(* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 6e-159) {
tmp = (2.0 * pow((k / t), -2.0)) / log(pow(exp(sin(k)), ((k * pow(t, 3.0)) / pow(l, 2.0))));
} else if (k <= 9.2e-60) {
tmp = pow((((sqrt(2.0) / k) * (t / (pow(t, 1.5) / l))) / sqrt((sin(k) * tan(k)))), 2.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
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 <= 6d-159) then
tmp = (2.0d0 * ((k / t) ** (-2.0d0))) / log((exp(sin(k)) ** ((k * (t ** 3.0d0)) / (l ** 2.0d0))))
else if (k <= 9.2d-60) then
tmp = (((sqrt(2.0d0) / k) * (t / ((t ** 1.5d0) / l))) / sqrt((sin(k) * tan(k)))) ** 2.0d0
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6e-159) {
tmp = (2.0 * Math.pow((k / t), -2.0)) / Math.log(Math.pow(Math.exp(Math.sin(k)), ((k * Math.pow(t, 3.0)) / Math.pow(l, 2.0))));
} else if (k <= 9.2e-60) {
tmp = Math.pow((((Math.sqrt(2.0) / k) * (t / (Math.pow(t, 1.5) / l))) / Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 6e-159: tmp = (2.0 * math.pow((k / t), -2.0)) / math.log(math.pow(math.exp(math.sin(k)), ((k * math.pow(t, 3.0)) / math.pow(l, 2.0)))) elif k <= 9.2e-60: tmp = math.pow((((math.sqrt(2.0) / k) * (t / (math.pow(t, 1.5) / l))) / math.sqrt((math.sin(k) * math.tan(k)))), 2.0) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 6e-159) tmp = Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / log((exp(sin(k)) ^ Float64(Float64(k * (t ^ 3.0)) / (l ^ 2.0))))); elseif (k <= 9.2e-60) tmp = Float64(Float64(Float64(sqrt(2.0) / k) * Float64(t / Float64((t ^ 1.5) / l))) / sqrt(Float64(sin(k) * tan(k)))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6e-159) tmp = (2.0 * ((k / t) ^ -2.0)) / log((exp(sin(k)) ^ ((k * (t ^ 3.0)) / (l ^ 2.0)))); elseif (k <= 9.2e-60) tmp = (((sqrt(2.0) / k) * (t / ((t ^ 1.5) / l))) / sqrt((sin(k) * tan(k)))) ^ 2.0; else tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 6e-159], N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[Log[N[Power[N[Exp[N[Sin[k], $MachinePrecision]], $MachinePrecision], N[(N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e-60], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(t / N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6 \cdot 10^{-159}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\log \left({\left(e^{\sin k}\right)}^{\left(\frac{k \cdot {t}^{3}}{{\ell}^{2}}\right)}\right)}\\
\mathbf{elif}\;k \leq 9.2 \cdot 10^{-60}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{k} \cdot \frac{t}{\frac{{t}^{1.5}}{\ell}}}{\sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 6.00000000000000018e-159Initial program 38.4%
*-commutative38.4%
associate-/r*38.4%
Simplified43.0%
add-cube-cbrt43.0%
div-inv43.0%
times-frac43.0%
Applied egg-rr71.2%
associate-*l/72.4%
associate-/l*72.4%
associate-/l/67.8%
unpow267.8%
unpow367.8%
*-commutative67.8%
Simplified60.0%
add-log-exp30.5%
associate-*l*30.5%
exp-prod33.5%
cube-div31.5%
pow331.5%
pow231.5%
unpow-prod-down31.5%
unpow231.5%
add-cube-cbrt31.5%
Applied egg-rr31.5%
Taylor expanded in k around 0 32.8%
if 6.00000000000000018e-159 < k < 9.2000000000000005e-60Initial program 39.3%
*-commutative39.3%
associate-/r*39.3%
Simplified39.4%
add-sqr-sqrt18.0%
Applied egg-rr42.5%
unpow242.5%
associate-/r*42.6%
associate-/r/42.6%
associate-/l*49.8%
Simplified49.8%
if 9.2000000000000005e-60 < k Initial program 33.4%
Simplified42.9%
Taylor expanded in t around 0 68.9%
times-frac70.3%
Simplified70.3%
(FPCore (t l k)
:precision binary64
(if (<= k 4.4e-250)
(* (* l l) (* (/ 2.0 t) (pow k -4.0)))
(if (<= k 9.2e-60)
(pow
(/
(* (/ (sqrt 2.0) k) (/ t (/ (pow t 1.5) l)))
(sqrt (* (sin k) (tan k))))
2.0)
(*
2.0
(* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.4e-250) {
tmp = (l * l) * ((2.0 / t) * pow(k, -4.0));
} else if (k <= 9.2e-60) {
tmp = pow((((sqrt(2.0) / k) * (t / (pow(t, 1.5) / l))) / sqrt((sin(k) * tan(k)))), 2.0);
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
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.4d-250) then
tmp = (l * l) * ((2.0d0 / t) * (k ** (-4.0d0)))
else if (k <= 9.2d-60) then
tmp = (((sqrt(2.0d0) / k) * (t / ((t ** 1.5d0) / l))) / sqrt((sin(k) * tan(k)))) ** 2.0d0
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.4e-250) {
tmp = (l * l) * ((2.0 / t) * Math.pow(k, -4.0));
} else if (k <= 9.2e-60) {
tmp = Math.pow((((Math.sqrt(2.0) / k) * (t / (Math.pow(t, 1.5) / l))) / Math.sqrt((Math.sin(k) * Math.tan(k)))), 2.0);
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4.4e-250: tmp = (l * l) * ((2.0 / t) * math.pow(k, -4.0)) elif k <= 9.2e-60: tmp = math.pow((((math.sqrt(2.0) / k) * (t / (math.pow(t, 1.5) / l))) / math.sqrt((math.sin(k) * math.tan(k)))), 2.0) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4.4e-250) tmp = Float64(Float64(l * l) * Float64(Float64(2.0 / t) * (k ^ -4.0))); elseif (k <= 9.2e-60) tmp = Float64(Float64(Float64(sqrt(2.0) / k) * Float64(t / Float64((t ^ 1.5) / l))) / sqrt(Float64(sin(k) * tan(k)))) ^ 2.0; else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.4e-250) tmp = (l * l) * ((2.0 / t) * (k ^ -4.0)); elseif (k <= 9.2e-60) tmp = (((sqrt(2.0) / k) * (t / ((t ^ 1.5) / l))) / sqrt((sin(k) * tan(k)))) ^ 2.0; else tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4.4e-250], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e-60], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(t / N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{-250}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t} \cdot {k}^{-4}\right)\\
\mathbf{elif}\;k \leq 9.2 \cdot 10^{-60}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{k} \cdot \frac{t}{\frac{{t}^{1.5}}{\ell}}}{\sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 4.4e-250Initial program 38.0%
Simplified42.9%
Taylor expanded in k around 0 67.4%
*-commutative67.4%
associate-/r*67.4%
Simplified67.4%
div-inv67.4%
pow-flip67.4%
metadata-eval67.4%
Applied egg-rr67.4%
if 4.4e-250 < k < 9.2000000000000005e-60Initial program 40.0%
*-commutative40.0%
associate-/r*40.0%
Simplified40.1%
add-sqr-sqrt17.9%
Applied egg-rr37.8%
unpow237.8%
associate-/r*37.9%
associate-/r/37.9%
associate-/l*42.4%
Simplified42.4%
if 9.2000000000000005e-60 < k Initial program 33.4%
Simplified42.9%
Taylor expanded in t around 0 68.9%
times-frac70.3%
Simplified70.3%
Final simplification63.9%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
return 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t * pow(sin(k), 2.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 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
def code(t, l, k): return 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0))))
function code(t, l, k) return Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)
\end{array}
Initial program 37.0%
Simplified43.2%
Taylor expanded in t around 0 73.4%
times-frac75.2%
Simplified75.2%
(FPCore (t l k) :precision binary64 (* (/ 2.0 (* t (pow k 2.0))) (/ (pow l 2.0) (* (sin k) (tan k)))))
double code(double t, double l, double k) {
return (2.0 / (t * pow(k, 2.0))) * (pow(l, 2.0) / (sin(k) * tan(k)));
}
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 * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) * tan(k)))
end function
public static double code(double t, double l, double k) {
return (2.0 / (t * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / (Math.sin(k) * Math.tan(k)));
}
def code(t, l, k): return (2.0 / (t * math.pow(k, 2.0))) * (math.pow(l, 2.0) / (math.sin(k) * math.tan(k)))
function code(t, l, k) return Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64((l ^ 2.0) / Float64(sin(k) * tan(k)))) end
function tmp = code(t, l, k) tmp = (2.0 / (t * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) * tan(k))); end
code[t_, l_, k_] := N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{t \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{\sin k \cdot \tan k}
\end{array}
Initial program 37.0%
*-commutative37.0%
associate-/r*37.0%
Simplified42.2%
add-cube-cbrt42.2%
div-inv42.2%
times-frac42.2%
Applied egg-rr68.7%
associate-*l/69.4%
associate-/l*69.4%
associate-/l/65.7%
unpow265.7%
unpow365.7%
*-commutative65.7%
Simplified58.7%
add-log-exp32.5%
associate-*l*32.5%
exp-prod35.1%
cube-div33.4%
pow333.4%
pow233.4%
unpow-prod-down33.4%
unpow233.4%
add-cube-cbrt33.4%
Applied egg-rr33.4%
Taylor expanded in t around inf 73.4%
associate-*r/73.4%
associate-*r*73.4%
times-frac74.3%
Simplified74.3%
Final simplification74.3%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* (pow k 2.0) (* (tan k) (* t (sin k)))))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (pow(k, 2.0) * (tan(k) * (t * sin(k)))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 / ((k ** 2.0d0) * (tan(k) * (t * sin(k)))))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (Math.pow(k, 2.0) * (Math.tan(k) * (t * Math.sin(k)))));
}
def code(t, l, k): return (l * l) * (2.0 / (math.pow(k, 2.0) * (math.tan(k) * (t * math.sin(k)))))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 2.0) * Float64(tan(k) * Float64(t * sin(k)))))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / ((k ^ 2.0) * (tan(k) * (t * sin(k))))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot \left(\tan k \cdot \left(t \cdot \sin k\right)\right)}
\end{array}
Initial program 37.0%
Simplified43.2%
add-log-exp27.7%
exp-prod31.8%
associate-*r*31.8%
*-commutative31.8%
associate-*l*31.8%
Applied egg-rr31.8%
Taylor expanded in k around inf 73.1%
associate-*r*73.1%
Simplified73.1%
Final simplification73.1%
(FPCore (t l k) :precision binary64 (* (* l l) (/ 2.0 (* (pow (sin k) 2.0) (* t (pow k 2.0))))))
double code(double t, double l, double k) {
return (l * l) * (2.0 / (pow(sin(k), 2.0) * (t * pow(k, 2.0))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * (2.0d0 / ((sin(k) ** 2.0d0) * (t * (k ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return (l * l) * (2.0 / (Math.pow(Math.sin(k), 2.0) * (t * Math.pow(k, 2.0))));
}
def code(t, l, k): return (l * l) * (2.0 / (math.pow(math.sin(k), 2.0) * (t * math.pow(k, 2.0))))
function code(t, l, k) return Float64(Float64(l * l) * Float64(2.0 / Float64((sin(k) ^ 2.0) * Float64(t * (k ^ 2.0))))) end
function tmp = code(t, l, k) tmp = (l * l) * (2.0 / ((sin(k) ^ 2.0) * (t * (k ^ 2.0)))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{{\sin k}^{2} \cdot \left(t \cdot {k}^{2}\right)}
\end{array}
Initial program 37.0%
Simplified43.2%
Taylor expanded in t around 0 73.1%
associate-*r/73.1%
associate-*r*73.1%
Simplified73.1%
Taylor expanded in k around 0 66.9%
Final simplification66.9%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (/ (pow l 2.0) t) (pow k 4.0))))
double code(double t, double l, double k) {
return 2.0 * ((pow(l, 2.0) / t) / pow(k, 4.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 * (((l ** 2.0d0) / t) / (k ** 4.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow(l, 2.0) / t) / Math.pow(k, 4.0));
}
def code(t, l, k): return 2.0 * ((math.pow(l, 2.0) / t) / math.pow(k, 4.0))
function code(t, l, k) return Float64(2.0 * Float64(Float64((l ^ 2.0) / t) / (k ^ 4.0))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l ^ 2.0) / t) / (k ^ 4.0)); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / t), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}
\end{array}
Initial program 37.0%
Simplified43.2%
Taylor expanded in k around 0 65.3%
*-commutative65.3%
associate-/r*65.7%
Simplified65.7%
(FPCore (t l k) :precision binary64 (* (* l l) (* (/ 2.0 t) (pow k -4.0))))
double code(double t, double l, double k) {
return (l * l) * ((2.0 / t) * pow(k, -4.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((2.0d0 / t) * (k ** (-4.0d0)))
end function
public static double code(double t, double l, double k) {
return (l * l) * ((2.0 / t) * Math.pow(k, -4.0));
}
def code(t, l, k): return (l * l) * ((2.0 / t) * math.pow(k, -4.0))
function code(t, l, k) return Float64(Float64(l * l) * Float64(Float64(2.0 / t) * (k ^ -4.0))) end
function tmp = code(t, l, k) tmp = (l * l) * ((2.0 / t) * (k ^ -4.0)); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t} \cdot {k}^{-4}\right)
\end{array}
Initial program 37.0%
Simplified43.2%
Taylor expanded in k around 0 65.0%
*-commutative65.0%
associate-/r*65.0%
Simplified65.0%
div-inv65.0%
pow-flip65.0%
metadata-eval65.0%
Applied egg-rr65.0%
Final simplification65.0%
herbie shell --seed 2024149
(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))))