
(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 1.55e-214)
(/
(* l (/ (* 2.0 l) (pow (* t (* (cbrt (tan k)) (cbrt k))) 3.0)))
(+ 2.0 (pow (/ k t) 2.0)))
(if (<= k 1.55e+22)
(/ (/ l k) (/ (pow t 3.0) (/ l k)))
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t (pow (sin k) 2.0))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.55e-214) {
tmp = (l * ((2.0 * l) / pow((t * (cbrt(tan(k)) * cbrt(k))), 3.0))) / (2.0 + pow((k / t), 2.0));
} else if (k <= 1.55e+22) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.55e-214) {
tmp = (l * ((2.0 * l) / Math.pow((t * (Math.cbrt(Math.tan(k)) * Math.cbrt(k))), 3.0))) / (2.0 + Math.pow((k / t), 2.0));
} else if (k <= 1.55e+22) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.55e-214) tmp = Float64(Float64(l * Float64(Float64(2.0 * l) / (Float64(t * Float64(cbrt(tan(k)) * cbrt(k))) ^ 3.0))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); elseif (k <= 1.55e+22) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.55e-214], N[(N[(l * N[(N[(2.0 * l), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.55e+22], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.55 \cdot 10^{-214}:\\
\;\;\;\;\frac{\ell \cdot \frac{2 \cdot \ell}{{\left(t \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{k}\right)\right)}^{3}}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.55 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.55000000000000002e-214Initial program 50.3%
associate-/r*50.3%
associate-*l*44.4%
sqr-neg44.4%
associate-*l*50.3%
*-commutative50.3%
sqr-neg50.3%
associate-*l/50.2%
associate-*r/50.8%
associate-/r/50.8%
Simplified50.8%
add-cube-cbrt50.7%
pow350.7%
*-commutative50.7%
cbrt-prod50.7%
cbrt-prod50.6%
rem-cbrt-cube58.9%
Applied egg-rr58.9%
associate-*l/58.9%
associate-*l*58.9%
Applied egg-rr58.9%
unpow258.9%
*-commutative58.9%
associate-*r/58.9%
unpow258.9%
associate-*l*67.5%
associate-*r/67.5%
Simplified67.5%
Taylor expanded in k around 0 66.3%
if 1.55000000000000002e-214 < k < 1.5500000000000001e22Initial program 65.1%
associate-/r*65.1%
associate-*l*65.0%
sqr-neg65.0%
associate-*l*65.1%
*-commutative65.1%
sqr-neg65.1%
associate-*l/65.0%
associate-*r/65.0%
associate-/r/65.0%
Simplified65.0%
Taylor expanded in k around 0 70.0%
associate-/r*68.3%
unpow268.3%
unpow268.3%
times-frac73.4%
Simplified73.4%
add-exp-log51.7%
pow251.7%
Applied egg-rr51.7%
add-exp-log73.4%
pow273.4%
associate-/l*78.4%
Applied egg-rr78.4%
if 1.5500000000000001e22 < k Initial program 48.0%
associate-/r*48.0%
associate-*l*48.0%
sqr-neg48.0%
associate-*l*48.0%
*-commutative48.0%
sqr-neg48.0%
associate-*l/48.0%
associate-*r/48.0%
associate-/r/48.0%
Simplified48.0%
Taylor expanded in k around inf 69.9%
associate-*r/69.9%
associate-*r*69.9%
times-frac69.8%
unpow269.8%
associate-*l*69.8%
unpow269.8%
Simplified69.8%
Taylor expanded in k around inf 69.9%
times-frac65.8%
unpow265.8%
unpow265.8%
times-frac74.7%
unpow274.7%
Simplified74.7%
Final simplification70.8%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
1e+288)
(/
(* l (/ (* 2.0 l) (pow (* t (* (cbrt (sin k)) (cbrt (tan k)))) 3.0)))
(+ 2.0 t_1))
(/ 2.0 (/ (/ (* t (pow (sin k) 2.0)) (pow (/ l k) 2.0)) (cos k))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * ((2.0 * l) / pow((t * (cbrt(sin(k)) * cbrt(tan(k)))), 3.0))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * pow(sin(k), 2.0)) / pow((l / k), 2.0)) / cos(k));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * ((2.0 * l) / Math.pow((t * (Math.cbrt(Math.sin(k)) * Math.cbrt(Math.tan(k)))), 3.0))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * Math.pow(Math.sin(k), 2.0)) / Math.pow((l / k), 2.0)) / Math.cos(k));
}
return tmp;
}
k = abs(k) function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 1e+288) tmp = Float64(Float64(l * Float64(Float64(2.0 * l) / (Float64(t * Float64(cbrt(sin(k)) * cbrt(tan(k)))) ^ 3.0))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(t * (sin(k) ^ 2.0)) / (Float64(l / k) ^ 2.0)) / cos(k))); end return tmp end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[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[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+288], N[(N[(l * N[(N[(2.0 * l), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 10^{+288}:\\
\;\;\;\;\frac{\ell \cdot \frac{2 \cdot \ell}{{\left(t \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k}\right)\right)}^{3}}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t \cdot {\sin k}^{2}}{{\left(\frac{\ell}{k}\right)}^{2}}}{\cos k}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1e288Initial program 76.5%
associate-/r*76.5%
associate-*l*70.8%
sqr-neg70.8%
associate-*l*76.5%
*-commutative76.5%
sqr-neg76.5%
associate-*l/76.4%
associate-*r/76.9%
associate-/r/76.9%
Simplified76.9%
add-cube-cbrt76.8%
pow376.8%
*-commutative76.8%
cbrt-prod76.8%
cbrt-prod76.7%
rem-cbrt-cube85.2%
Applied egg-rr85.2%
associate-*l/85.2%
associate-*l*85.2%
Applied egg-rr85.2%
unpow285.2%
*-commutative85.2%
associate-*r/85.1%
unpow285.1%
associate-*l*87.7%
associate-*r/88.0%
Simplified88.0%
if 1e288 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 18.7%
add-sqr-sqrt18.7%
pow218.7%
associate-*l*18.7%
sqrt-prod18.6%
sqrt-div18.6%
sqrt-pow121.7%
metadata-eval21.7%
sqrt-prod10.9%
add-sqr-sqrt26.6%
Applied egg-rr26.6%
Taylor expanded in k around 0 16.8%
unpow216.8%
unpow216.8%
Simplified16.8%
Taylor expanded in t around 0 44.2%
associate-/r*44.2%
*-commutative44.2%
associate-/l*44.3%
unpow244.3%
unpow244.3%
times-frac60.1%
unpow260.1%
Simplified60.1%
Final simplification76.9%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
1e+288)
(/
(* l (* l (/ 2.0 (pow (* (cbrt (tan k)) (* t (cbrt (sin k)))) 3.0))))
(+ 2.0 t_1))
(/ 2.0 (/ (/ (* t (pow (sin k) 2.0)) (pow (/ l k) 2.0)) (cos k))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * (l * (2.0 / pow((cbrt(tan(k)) * (t * cbrt(sin(k)))), 3.0)))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * pow(sin(k), 2.0)) / pow((l / k), 2.0)) / cos(k));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * (l * (2.0 / Math.pow((Math.cbrt(Math.tan(k)) * (t * Math.cbrt(Math.sin(k)))), 3.0)))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * Math.pow(Math.sin(k), 2.0)) / Math.pow((l / k), 2.0)) / Math.cos(k));
}
return tmp;
}
k = abs(k) function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 1e+288) tmp = Float64(Float64(l * Float64(l * Float64(2.0 / (Float64(cbrt(tan(k)) * Float64(t * cbrt(sin(k)))) ^ 3.0)))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(t * (sin(k) ^ 2.0)) / (Float64(l / k) ^ 2.0)) / cos(k))); end return tmp end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[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[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+288], N[(N[(l * N[(l * N[(2.0 / N[Power[N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 10^{+288}:\\
\;\;\;\;\frac{\ell \cdot \left(\ell \cdot \frac{2}{{\left(\sqrt[3]{\tan k} \cdot \left(t \cdot \sqrt[3]{\sin k}\right)\right)}^{3}}\right)}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t \cdot {\sin k}^{2}}{{\left(\frac{\ell}{k}\right)}^{2}}}{\cos k}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1e288Initial program 76.5%
associate-/r*76.5%
associate-*l*70.8%
sqr-neg70.8%
associate-*l*76.5%
*-commutative76.5%
sqr-neg76.5%
associate-*l/76.4%
associate-*r/76.9%
associate-/r/76.9%
Simplified76.9%
add-cube-cbrt76.8%
pow376.8%
*-commutative76.8%
cbrt-prod76.8%
cbrt-prod76.7%
rem-cbrt-cube85.2%
Applied egg-rr85.2%
associate-*l/85.2%
associate-*l*85.2%
Applied egg-rr85.2%
unpow285.2%
*-commutative85.2%
associate-*r/85.1%
unpow285.1%
associate-*l*87.7%
associate-*r*87.7%
Simplified87.7%
if 1e288 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 18.7%
add-sqr-sqrt18.7%
pow218.7%
associate-*l*18.7%
sqrt-prod18.6%
sqrt-div18.6%
sqrt-pow121.7%
metadata-eval21.7%
sqrt-prod10.9%
add-sqr-sqrt26.6%
Applied egg-rr26.6%
Taylor expanded in k around 0 16.8%
unpow216.8%
unpow216.8%
Simplified16.8%
Taylor expanded in t around 0 44.2%
associate-/r*44.2%
*-commutative44.2%
associate-/l*44.3%
unpow244.3%
unpow244.3%
times-frac60.1%
unpow260.1%
Simplified60.1%
Final simplification76.7%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
1e+288)
(/
(* l (/ 2.0 (/ (pow (* (cbrt (tan k)) (* t (cbrt (sin k)))) 3.0) l)))
(+ 2.0 t_1))
(/ 2.0 (/ (/ (* t (pow (sin k) 2.0)) (pow (/ l k) 2.0)) (cos k))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * (2.0 / (pow((cbrt(tan(k)) * (t * cbrt(sin(k)))), 3.0) / l))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * pow(sin(k), 2.0)) / pow((l / k), 2.0)) / cos(k));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 1e+288) {
tmp = (l * (2.0 / (Math.pow((Math.cbrt(Math.tan(k)) * (t * Math.cbrt(Math.sin(k)))), 3.0) / l))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((t * Math.pow(Math.sin(k), 2.0)) / Math.pow((l / k), 2.0)) / Math.cos(k));
}
return tmp;
}
k = abs(k) function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 1e+288) tmp = Float64(Float64(l * Float64(2.0 / Float64((Float64(cbrt(tan(k)) * Float64(t * cbrt(sin(k)))) ^ 3.0) / l))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(t * (sin(k) ^ 2.0)) / (Float64(l / k) ^ 2.0)) / cos(k))); end return tmp end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[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[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+288], N[(N[(l * N[(2.0 / N[(N[Power[N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 10^{+288}:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{\frac{{\left(\sqrt[3]{\tan k} \cdot \left(t \cdot \sqrt[3]{\sin k}\right)\right)}^{3}}{\ell}}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t \cdot {\sin k}^{2}}{{\left(\frac{\ell}{k}\right)}^{2}}}{\cos k}}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1e288Initial program 76.5%
associate-/r*76.5%
associate-*l*70.8%
sqr-neg70.8%
associate-*l*76.5%
*-commutative76.5%
sqr-neg76.5%
associate-*l/76.4%
associate-*r/76.9%
associate-/r/76.9%
Simplified76.9%
add-cube-cbrt76.8%
pow376.8%
*-commutative76.8%
cbrt-prod76.8%
cbrt-prod76.7%
rem-cbrt-cube85.2%
Applied egg-rr85.2%
associate-*l/85.2%
associate-*l*85.2%
Applied egg-rr85.2%
unpow285.2%
*-commutative85.2%
associate-*r/85.1%
unpow285.1%
associate-*l*87.7%
associate-*r*87.7%
Simplified87.7%
associate-*r/87.9%
associate-*l*88.0%
Applied egg-rr88.0%
*-commutative88.0%
associate-/l*88.0%
associate-*r*87.9%
*-commutative87.9%
Simplified87.9%
if 1e288 < (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) Initial program 18.7%
add-sqr-sqrt18.7%
pow218.7%
associate-*l*18.7%
sqrt-prod18.6%
sqrt-div18.6%
sqrt-pow121.7%
metadata-eval21.7%
sqrt-prod10.9%
add-sqr-sqrt26.6%
Applied egg-rr26.6%
Taylor expanded in k around 0 16.8%
unpow216.8%
unpow216.8%
Simplified16.8%
Taylor expanded in t around 0 44.2%
associate-/r*44.2%
*-commutative44.2%
associate-/l*44.3%
unpow244.3%
unpow244.3%
times-frac60.1%
unpow260.1%
Simplified60.1%
Final simplification76.9%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5.8e-214)
(/
(* l (* l (/ 2.0 (pow (* (cbrt (tan k)) (* t (cbrt k))) 3.0))))
(+ 2.0 (pow (/ k t) 2.0)))
(if (<= k 1.75e+22)
(/ (/ l k) (/ (pow t 3.0) (/ l k)))
(* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t (pow (sin k) 2.0))))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 5.8e-214) {
tmp = (l * (l * (2.0 / pow((cbrt(tan(k)) * (t * cbrt(k))), 3.0)))) / (2.0 + pow((k / t), 2.0));
} else if (k <= 1.75e+22) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.8e-214) {
tmp = (l * (l * (2.0 / Math.pow((Math.cbrt(Math.tan(k)) * (t * Math.cbrt(k))), 3.0)))) / (2.0 + Math.pow((k / t), 2.0));
} else if (k <= 1.75e+22) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 5.8e-214) tmp = Float64(Float64(l * Float64(l * Float64(2.0 / (Float64(cbrt(tan(k)) * Float64(t * cbrt(k))) ^ 3.0)))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); elseif (k <= 1.75e+22) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5.8e-214], N[(N[(l * N[(l * N[(2.0 / N[Power[N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[k, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.75e+22], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.8 \cdot 10^{-214}:\\
\;\;\;\;\frac{\ell \cdot \left(\ell \cdot \frac{2}{{\left(\sqrt[3]{\tan k} \cdot \left(t \cdot \sqrt[3]{k}\right)\right)}^{3}}\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.75 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 5.7999999999999997e-214Initial program 50.3%
associate-/r*50.3%
associate-*l*44.4%
sqr-neg44.4%
associate-*l*50.3%
*-commutative50.3%
sqr-neg50.3%
associate-*l/50.2%
associate-*r/50.8%
associate-/r/50.8%
Simplified50.8%
add-cube-cbrt50.7%
pow350.7%
*-commutative50.7%
cbrt-prod50.7%
cbrt-prod50.6%
rem-cbrt-cube58.9%
Applied egg-rr58.9%
associate-*l/58.9%
associate-*l*58.9%
Applied egg-rr58.9%
unpow258.9%
*-commutative58.9%
associate-*r/58.9%
unpow258.9%
associate-*l*67.5%
associate-*r*67.5%
Simplified67.5%
Taylor expanded in k around 0 65.6%
if 5.7999999999999997e-214 < k < 1.75e22Initial program 65.1%
associate-/r*65.1%
associate-*l*65.0%
sqr-neg65.0%
associate-*l*65.1%
*-commutative65.1%
sqr-neg65.1%
associate-*l/65.0%
associate-*r/65.0%
associate-/r/65.0%
Simplified65.0%
Taylor expanded in k around 0 70.0%
associate-/r*68.3%
unpow268.3%
unpow268.3%
times-frac73.4%
Simplified73.4%
add-exp-log51.7%
pow251.7%
Applied egg-rr51.7%
add-exp-log73.4%
pow273.4%
associate-/l*78.4%
Applied egg-rr78.4%
if 1.75e22 < k Initial program 48.0%
associate-/r*48.0%
associate-*l*48.0%
sqr-neg48.0%
associate-*l*48.0%
*-commutative48.0%
sqr-neg48.0%
associate-*l/48.0%
associate-*r/48.0%
associate-/r/48.0%
Simplified48.0%
Taylor expanded in k around inf 69.9%
associate-*r/69.9%
associate-*r*69.9%
times-frac69.8%
unpow269.8%
associate-*l*69.8%
unpow269.8%
Simplified69.8%
Taylor expanded in k around inf 69.9%
times-frac65.8%
unpow265.8%
unpow265.8%
times-frac74.7%
unpow274.7%
Simplified74.7%
Final simplification70.4%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.3e+22) (/ (/ l k) (/ (pow t 3.0) (/ l k))) (* 2.0 (* (pow (/ l k) 2.0) (/ (cos k) (* t (pow (sin k) 2.0)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.3e+22) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (pow((l / k), 2.0) * (cos(k) / (t * pow(sin(k), 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 (k <= 6.3d+22) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else
tmp = 2.0d0 * (((l / k) ** 2.0d0) * (cos(k) / (t * (sin(k) ** 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 (k <= 6.3e+22) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * (Math.pow((l / k), 2.0) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 6.3e+22: tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) else: tmp = 2.0 * (math.pow((l / k), 2.0) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 6.3e+22) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(2.0 * Float64((Float64(l / k) ^ 2.0) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.3e+22) tmp = (l / k) / ((t ^ 3.0) / (l / k)); else tmp = 2.0 * (((l / k) ^ 2.0) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.3e+22], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.3 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 6.30000000000000021e22Initial program 54.6%
associate-/r*54.6%
associate-*l*50.4%
sqr-neg50.4%
associate-*l*54.6%
*-commutative54.6%
sqr-neg54.6%
associate-*l/54.6%
associate-*r/55.0%
associate-/r/55.0%
Simplified55.0%
Taylor expanded in k around 0 53.9%
associate-/r*53.4%
unpow253.4%
unpow253.4%
times-frac65.6%
Simplified65.6%
add-exp-log42.1%
pow242.1%
Applied egg-rr42.1%
add-exp-log65.6%
pow265.6%
associate-/l*68.5%
Applied egg-rr68.5%
if 6.30000000000000021e22 < k Initial program 48.0%
associate-/r*48.0%
associate-*l*48.0%
sqr-neg48.0%
associate-*l*48.0%
*-commutative48.0%
sqr-neg48.0%
associate-*l/48.0%
associate-*r/48.0%
associate-/r/48.0%
Simplified48.0%
Taylor expanded in k around inf 69.9%
associate-*r/69.9%
associate-*r*69.9%
times-frac69.8%
unpow269.8%
associate-*l*69.8%
unpow269.8%
Simplified69.8%
Taylor expanded in k around inf 69.9%
times-frac65.8%
unpow265.8%
unpow265.8%
times-frac74.7%
unpow274.7%
Simplified74.7%
Final simplification69.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.75e+22) (/ (/ l k) (/ (pow t 3.0) (/ l k))) (* (/ 2.0 (* k (* t k))) (/ (* (* l l) (cos k)) (pow (sin k) 2.0)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.75e+22) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = (2.0 / (k * (t * k))) * (((l * l) * cos(k)) / pow(sin(k), 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 (k <= 1.75d+22) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else
tmp = (2.0d0 / (k * (t * k))) * (((l * l) * cos(k)) / (sin(k) ** 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 (k <= 1.75e+22) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = (2.0 / (k * (t * k))) * (((l * l) * Math.cos(k)) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.75e+22: tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) else: tmp = (2.0 / (k * (t * k))) * (((l * l) * math.cos(k)) / math.pow(math.sin(k), 2.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.75e+22) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(Float64(l * l) * cos(k)) / (sin(k) ^ 2.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.75e+22) tmp = (l / k) / ((t ^ 3.0) / (l / k)); else tmp = (2.0 / (k * (t * k))) * (((l * l) * cos(k)) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.75e+22], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.75 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2}}\\
\end{array}
\end{array}
if k < 1.75e22Initial program 54.6%
associate-/r*54.6%
associate-*l*50.4%
sqr-neg50.4%
associate-*l*54.6%
*-commutative54.6%
sqr-neg54.6%
associate-*l/54.6%
associate-*r/55.0%
associate-/r/55.0%
Simplified55.0%
Taylor expanded in k around 0 53.9%
associate-/r*53.4%
unpow253.4%
unpow253.4%
times-frac65.6%
Simplified65.6%
add-exp-log42.1%
pow242.1%
Applied egg-rr42.1%
add-exp-log65.6%
pow265.6%
associate-/l*68.5%
Applied egg-rr68.5%
if 1.75e22 < k Initial program 48.0%
associate-/r*48.0%
associate-*l*48.0%
sqr-neg48.0%
associate-*l*48.0%
*-commutative48.0%
sqr-neg48.0%
associate-*l/48.0%
associate-*r/48.0%
associate-/r/48.0%
Simplified48.0%
Taylor expanded in k around inf 69.9%
associate-*r/69.9%
associate-*r*69.9%
times-frac69.8%
unpow269.8%
associate-*l*69.8%
unpow269.8%
Simplified69.8%
Final simplification68.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 1.75e+22) (/ (/ l k) (/ (pow t 3.0) (/ l k))) (/ (* 2.0 (* l (* l (cos k)))) (* (pow (sin k) 2.0) (* k (* t k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.75e+22) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = (2.0 * (l * (l * cos(k)))) / (pow(sin(k), 2.0) * (k * (t * 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.75d+22) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else
tmp = (2.0d0 * (l * (l * cos(k)))) / ((sin(k) ** 2.0d0) * (k * (t * 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.75e+22) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = (2.0 * (l * (l * Math.cos(k)))) / (Math.pow(Math.sin(k), 2.0) * (k * (t * k)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 1.75e+22: tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) else: tmp = (2.0 * (l * (l * math.cos(k)))) / (math.pow(math.sin(k), 2.0) * (k * (t * k))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 1.75e+22) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(Float64(2.0 * Float64(l * Float64(l * cos(k)))) / Float64((sin(k) ^ 2.0) * Float64(k * Float64(t * k)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.75e+22) tmp = (l / k) / ((t ^ 3.0) / (l / k)); else tmp = (2.0 * (l * (l * cos(k)))) / ((sin(k) ^ 2.0) * (k * (t * k))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.75e+22], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.75 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{{\sin k}^{2} \cdot \left(k \cdot \left(t \cdot k\right)\right)}\\
\end{array}
\end{array}
if k < 1.75e22Initial program 54.6%
associate-/r*54.6%
associate-*l*50.4%
sqr-neg50.4%
associate-*l*54.6%
*-commutative54.6%
sqr-neg54.6%
associate-*l/54.6%
associate-*r/55.0%
associate-/r/55.0%
Simplified55.0%
Taylor expanded in k around 0 53.9%
associate-/r*53.4%
unpow253.4%
unpow253.4%
times-frac65.6%
Simplified65.6%
add-exp-log42.1%
pow242.1%
Applied egg-rr42.1%
add-exp-log65.6%
pow265.6%
associate-/l*68.5%
Applied egg-rr68.5%
if 1.75e22 < k Initial program 48.0%
associate-/r*48.0%
associate-*l*48.0%
sqr-neg48.0%
associate-*l*48.0%
*-commutative48.0%
sqr-neg48.0%
associate-*l/48.0%
associate-*r/48.0%
associate-/r/48.0%
Simplified48.0%
Taylor expanded in k around inf 69.9%
associate-*r/69.9%
associate-*r*69.9%
times-frac69.8%
unpow269.8%
associate-*l*69.8%
unpow269.8%
Simplified69.8%
frac-times69.8%
associate-*l*69.9%
Applied egg-rr69.9%
Final simplification68.7%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -1.35e-108)
(/ (/ l k) (/ (pow t 3.0) (/ l k)))
(if (<= t 1.65e-34)
(* 2.0 (/ (* l (/ l (pow k 4.0))) t))
(exp (- (* 2.0 (log (/ l k))) (* 3.0 (log t)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -1.35e-108) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else if (t <= 1.65e-34) {
tmp = 2.0 * ((l * (l / pow(k, 4.0))) / t);
} else {
tmp = exp(((2.0 * log((l / k))) - (3.0 * log(t))));
}
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.35d-108)) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else if (t <= 1.65d-34) then
tmp = 2.0d0 * ((l * (l / (k ** 4.0d0))) / t)
else
tmp = exp(((2.0d0 * log((l / k))) - (3.0d0 * log(t))))
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.35e-108) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else if (t <= 1.65e-34) {
tmp = 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
} else {
tmp = Math.exp(((2.0 * Math.log((l / k))) - (3.0 * Math.log(t))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -1.35e-108: tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) elif t <= 1.65e-34: tmp = 2.0 * ((l * (l / math.pow(k, 4.0))) / t) else: tmp = math.exp(((2.0 * math.log((l / k))) - (3.0 * math.log(t)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -1.35e-108) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); elseif (t <= 1.65e-34) tmp = Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)); else tmp = exp(Float64(Float64(2.0 * log(Float64(l / k))) - Float64(3.0 * log(t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.35e-108) tmp = (l / k) / ((t ^ 3.0) / (l / k)); elseif (t <= 1.65e-34) tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); else tmp = exp(((2.0 * log((l / k))) - (3.0 * log(t)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -1.35e-108], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-34], N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[Exp[N[(N[(2.0 * N[Log[N[(l / k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(3.0 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-34}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}\\
\mathbf{else}:\\
\;\;\;\;e^{2 \cdot \log \left(\frac{\ell}{k}\right) - 3 \cdot \log t}\\
\end{array}
\end{array}
if t < -1.35000000000000002e-108Initial program 68.6%
associate-/r*68.5%
associate-*l*66.0%
sqr-neg66.0%
associate-*l*68.5%
*-commutative68.5%
sqr-neg68.5%
associate-*l/68.5%
associate-*r/69.4%
associate-/r/69.4%
Simplified69.4%
Taylor expanded in k around 0 63.1%
associate-/r*63.0%
unpow263.0%
unpow263.0%
times-frac71.8%
Simplified71.8%
add-exp-log44.2%
pow244.2%
Applied egg-rr44.2%
add-exp-log71.8%
pow271.8%
associate-/l*74.0%
Applied egg-rr74.0%
if -1.35000000000000002e-108 < t < 1.64999999999999991e-34Initial program 34.9%
associate-/r*34.9%
associate-*l*34.8%
sqr-neg34.8%
associate-*l*34.9%
*-commutative34.9%
sqr-neg34.9%
associate-*l/34.8%
associate-*r/34.8%
associate-/r/34.8%
Simplified34.8%
Taylor expanded in k around inf 65.0%
associate-*r/65.0%
associate-*r*65.1%
times-frac66.2%
unpow266.2%
associate-*l*66.2%
unpow266.2%
Simplified66.2%
Taylor expanded in k around 0 57.2%
unpow257.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in l around 0 57.2%
unpow257.2%
*-commutative57.2%
times-frac70.5%
Simplified70.5%
associate-*l/70.6%
Applied egg-rr70.6%
if 1.64999999999999991e-34 < t Initial program 56.6%
associate-/r*56.6%
associate-*l*47.6%
sqr-neg47.6%
associate-*l*56.6%
*-commutative56.6%
sqr-neg56.6%
associate-*l/56.7%
associate-*r/56.5%
associate-/r/56.5%
Simplified56.5%
Taylor expanded in k around 0 44.9%
associate-/r*43.4%
unpow243.4%
unpow243.4%
times-frac59.3%
Simplified59.3%
add-exp-log58.6%
pow258.6%
Applied egg-rr58.6%
log-div58.3%
pow-to-exp29.5%
add-log-exp32.0%
pow-to-exp32.0%
add-log-exp34.6%
Applied egg-rr34.6%
Final simplification62.0%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= t -1.35e-108)
(/ (/ l k) (/ (pow t 3.0) (/ l k)))
(if (<= t 6e-88)
(* 2.0 (/ (* l (/ l (pow k 4.0))) t))
(if (<= t 1e+208)
(/
2.0
(*
(pow (* k (/ (pow t 1.5) l)) 2.0)
(+ 1.0 (+ 1.0 (/ (* k k) (* t t))))))
(/
(* l (* 2.0 (/ l (* k (* (pow t 3.0) k)))))
(+ 2.0 (pow (/ k t) 2.0)))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (t <= -1.35e-108) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else if (t <= 6e-88) {
tmp = 2.0 * ((l * (l / pow(k, 4.0))) / t);
} else if (t <= 1e+208) {
tmp = 2.0 / (pow((k * (pow(t, 1.5) / l)), 2.0) * (1.0 + (1.0 + ((k * k) / (t * t)))));
} else {
tmp = (l * (2.0 * (l / (k * (pow(t, 3.0) * k))))) / (2.0 + pow((k / t), 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.35d-108)) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else if (t <= 6d-88) then
tmp = 2.0d0 * ((l * (l / (k ** 4.0d0))) / t)
else if (t <= 1d+208) then
tmp = 2.0d0 / (((k * ((t ** 1.5d0) / l)) ** 2.0d0) * (1.0d0 + (1.0d0 + ((k * k) / (t * t)))))
else
tmp = (l * (2.0d0 * (l / (k * ((t ** 3.0d0) * k))))) / (2.0d0 + ((k / t) ** 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.35e-108) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else if (t <= 6e-88) {
tmp = 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
} else if (t <= 1e+208) {
tmp = 2.0 / (Math.pow((k * (Math.pow(t, 1.5) / l)), 2.0) * (1.0 + (1.0 + ((k * k) / (t * t)))));
} else {
tmp = (l * (2.0 * (l / (k * (Math.pow(t, 3.0) * k))))) / (2.0 + Math.pow((k / t), 2.0));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if t <= -1.35e-108: tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) elif t <= 6e-88: tmp = 2.0 * ((l * (l / math.pow(k, 4.0))) / t) elif t <= 1e+208: tmp = 2.0 / (math.pow((k * (math.pow(t, 1.5) / l)), 2.0) * (1.0 + (1.0 + ((k * k) / (t * t))))) else: tmp = (l * (2.0 * (l / (k * (math.pow(t, 3.0) * k))))) / (2.0 + math.pow((k / t), 2.0)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (t <= -1.35e-108) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); elseif (t <= 6e-88) tmp = Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)); elseif (t <= 1e+208) tmp = Float64(2.0 / Float64((Float64(k * Float64((t ^ 1.5) / l)) ^ 2.0) * Float64(1.0 + Float64(1.0 + Float64(Float64(k * k) / Float64(t * t)))))); else tmp = Float64(Float64(l * Float64(2.0 * Float64(l / Float64(k * Float64((t ^ 3.0) * k))))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.35e-108) tmp = (l / k) / ((t ^ 3.0) / (l / k)); elseif (t <= 6e-88) tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); elseif (t <= 1e+208) tmp = 2.0 / (((k * ((t ^ 1.5) / l)) ^ 2.0) * (1.0 + (1.0 + ((k * k) / (t * t))))); else tmp = (l * (2.0 * (l / (k * ((t ^ 3.0) * k))))) / (2.0 + ((k / t) ^ 2.0)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[t, -1.35e-108], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-88], N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+208], N[(2.0 / N[(N[Power[N[(k * N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(1.0 + N[(1.0 + N[(N[(k * k), $MachinePrecision] / N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * N[(2.0 * N[(l / N[(k * N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-108}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-88}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}\\
\mathbf{elif}\;t \leq 10^{+208}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(1 + \left(1 + \frac{k \cdot k}{t \cdot t}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell \cdot \left(2 \cdot \frac{\ell}{k \cdot \left({t}^{3} \cdot k\right)}\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\end{array}
\end{array}
if t < -1.35000000000000002e-108Initial program 68.6%
associate-/r*68.5%
associate-*l*66.0%
sqr-neg66.0%
associate-*l*68.5%
*-commutative68.5%
sqr-neg68.5%
associate-*l/68.5%
associate-*r/69.4%
associate-/r/69.4%
Simplified69.4%
Taylor expanded in k around 0 63.1%
associate-/r*63.0%
unpow263.0%
unpow263.0%
times-frac71.8%
Simplified71.8%
add-exp-log44.2%
pow244.2%
Applied egg-rr44.2%
add-exp-log71.8%
pow271.8%
associate-/l*74.0%
Applied egg-rr74.0%
if -1.35000000000000002e-108 < t < 5.9999999999999999e-88Initial program 33.4%
associate-/r*33.4%
associate-*l*33.4%
sqr-neg33.4%
associate-*l*33.4%
*-commutative33.4%
sqr-neg33.4%
associate-*l/33.4%
associate-*r/33.3%
associate-/r/33.3%
Simplified33.3%
Taylor expanded in k around inf 64.3%
associate-*r/64.3%
associate-*r*64.4%
times-frac65.5%
unpow265.5%
associate-*l*65.6%
unpow265.6%
Simplified65.6%
Taylor expanded in k around 0 57.1%
unpow257.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in l around 0 57.1%
unpow257.1%
*-commutative57.1%
times-frac71.2%
Simplified71.2%
associate-*l/71.3%
Applied egg-rr71.3%
if 5.9999999999999999e-88 < t < 9.9999999999999998e207Initial program 57.0%
add-sqr-sqrt47.0%
pow247.0%
associate-*l*40.4%
sqrt-prod40.4%
sqrt-div40.4%
sqrt-pow144.3%
metadata-eval44.3%
sqrt-prod26.3%
add-sqr-sqrt50.5%
Applied egg-rr50.5%
Taylor expanded in k around 0 48.5%
unpow248.5%
unpow248.5%
Simplified48.5%
Taylor expanded in k around 0 72.8%
if 9.9999999999999998e207 < t Initial program 56.6%
associate-/r*56.6%
associate-*l*44.3%
sqr-neg44.3%
associate-*l*56.6%
*-commutative56.6%
sqr-neg56.6%
associate-*l/56.6%
associate-*r/56.6%
associate-/r/56.6%
Simplified56.6%
add-cube-cbrt56.6%
pow356.6%
*-commutative56.6%
cbrt-prod56.6%
cbrt-prod56.6%
rem-cbrt-cube63.9%
Applied egg-rr63.9%
associate-*l/63.9%
associate-*l*63.9%
Applied egg-rr63.9%
unpow263.9%
*-commutative63.9%
associate-*r/63.9%
unpow263.9%
associate-*l*75.0%
associate-*r*75.0%
Simplified75.0%
Taylor expanded in k around 0 55.2%
unpow255.2%
associate-*l*67.7%
Simplified67.7%
Final simplification72.2%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.35e-108) (not (<= t 3e-32))) (* (/ l (pow t 3.0)) (/ l (* k k))) (* 2.0 (/ (* l (/ l (pow k 4.0))) t))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.35e-108) || !(t <= 3e-32)) {
tmp = (l / pow(t, 3.0)) * (l / (k * k));
} else {
tmp = 2.0 * ((l * (l / pow(k, 4.0))) / t);
}
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.35d-108)) .or. (.not. (t <= 3d-32))) then
tmp = (l / (t ** 3.0d0)) * (l / (k * k))
else
tmp = 2.0d0 * ((l * (l / (k ** 4.0d0))) / t)
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.35e-108) || !(t <= 3e-32)) {
tmp = (l / Math.pow(t, 3.0)) * (l / (k * k));
} else {
tmp = 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.35e-108) or not (t <= 3e-32): tmp = (l / math.pow(t, 3.0)) * (l / (k * k)) else: tmp = 2.0 * ((l * (l / math.pow(k, 4.0))) / t) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.35e-108) || !(t <= 3e-32)) tmp = Float64(Float64(l / (t ^ 3.0)) * Float64(l / Float64(k * k))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.35e-108) || ~((t <= 3e-32))) tmp = (l / (t ^ 3.0)) * (l / (k * k)); else tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.35e-108], N[Not[LessEqual[t, 3e-32]], $MachinePrecision]], N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-108} \lor \neg \left(t \leq 3 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}\\
\end{array}
\end{array}
if t < -1.35000000000000002e-108 or 3e-32 < t Initial program 63.5%
associate-/r*63.5%
associate-*l*58.2%
sqr-neg58.2%
associate-*l*63.5%
*-commutative63.5%
sqr-neg63.5%
associate-*l/63.5%
associate-*r/64.0%
associate-/r/64.0%
Simplified64.0%
Taylor expanded in k around 0 55.4%
unpow255.4%
*-commutative55.4%
unpow255.4%
Simplified55.4%
times-frac59.8%
Applied egg-rr59.8%
if -1.35000000000000002e-108 < t < 3e-32Initial program 34.9%
associate-/r*34.9%
associate-*l*34.8%
sqr-neg34.8%
associate-*l*34.9%
*-commutative34.9%
sqr-neg34.9%
associate-*l/34.8%
associate-*r/34.8%
associate-/r/34.8%
Simplified34.8%
Taylor expanded in k around inf 65.0%
associate-*r/65.0%
associate-*r*65.1%
times-frac66.2%
unpow266.2%
associate-*l*66.2%
unpow266.2%
Simplified66.2%
Taylor expanded in k around 0 57.2%
unpow257.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in l around 0 57.2%
unpow257.2%
*-commutative57.2%
times-frac70.5%
Simplified70.5%
associate-*l/70.6%
Applied egg-rr70.6%
Final simplification63.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.35e-108) (not (<= t 7.6e-81))) (/ (* (/ l k) (/ l k)) (pow t 3.0)) (* 2.0 (/ (* l (/ l (pow k 4.0))) t))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.35e-108) || !(t <= 7.6e-81)) {
tmp = ((l / k) * (l / k)) / pow(t, 3.0);
} else {
tmp = 2.0 * ((l * (l / pow(k, 4.0))) / t);
}
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.35d-108)) .or. (.not. (t <= 7.6d-81))) then
tmp = ((l / k) * (l / k)) / (t ** 3.0d0)
else
tmp = 2.0d0 * ((l * (l / (k ** 4.0d0))) / t)
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.35e-108) || !(t <= 7.6e-81)) {
tmp = ((l / k) * (l / k)) / Math.pow(t, 3.0);
} else {
tmp = 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.35e-108) or not (t <= 7.6e-81): tmp = ((l / k) * (l / k)) / math.pow(t, 3.0) else: tmp = 2.0 * ((l * (l / math.pow(k, 4.0))) / t) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.35e-108) || !(t <= 7.6e-81)) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) / (t ^ 3.0)); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.35e-108) || ~((t <= 7.6e-81))) tmp = ((l / k) * (l / k)) / (t ^ 3.0); else tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.35e-108], N[Not[LessEqual[t, 7.6e-81]], $MachinePrecision]], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-108} \lor \neg \left(t \leq 7.6 \cdot 10^{-81}\right):\\
\;\;\;\;\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}\\
\end{array}
\end{array}
if t < -1.35000000000000002e-108 or 7.5999999999999997e-81 < t Initial program 63.4%
associate-/r*63.4%
associate-*l*58.3%
sqr-neg58.3%
associate-*l*63.4%
*-commutative63.4%
sqr-neg63.4%
associate-*l/63.4%
associate-*r/63.9%
associate-/r/63.9%
Simplified63.9%
Taylor expanded in k around 0 54.5%
associate-/r*54.4%
unpow254.4%
unpow254.4%
times-frac66.4%
Simplified66.4%
if -1.35000000000000002e-108 < t < 7.5999999999999997e-81Initial program 33.4%
associate-/r*33.4%
associate-*l*33.4%
sqr-neg33.4%
associate-*l*33.4%
*-commutative33.4%
sqr-neg33.4%
associate-*l/33.4%
associate-*r/33.3%
associate-/r/33.3%
Simplified33.3%
Taylor expanded in k around inf 64.3%
associate-*r/64.3%
associate-*r*64.4%
times-frac65.5%
unpow265.5%
associate-*l*65.6%
unpow265.6%
Simplified65.6%
Taylor expanded in k around 0 57.1%
unpow257.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in l around 0 57.1%
unpow257.1%
*-commutative57.1%
times-frac71.2%
Simplified71.2%
associate-*l/71.3%
Applied egg-rr71.3%
Final simplification68.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (or (<= t -1.35e-108) (not (<= t 1.65e-34))) (/ (/ l k) (/ (pow t 3.0) (/ l k))) (* 2.0 (/ (* l (/ l (pow k 4.0))) t))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.35e-108) || !(t <= 1.65e-34)) {
tmp = (l / k) / (pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * ((l * (l / pow(k, 4.0))) / t);
}
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.35d-108)) .or. (.not. (t <= 1.65d-34))) then
tmp = (l / k) / ((t ** 3.0d0) / (l / k))
else
tmp = 2.0d0 * ((l * (l / (k ** 4.0d0))) / t)
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.35e-108) || !(t <= 1.65e-34)) {
tmp = (l / k) / (Math.pow(t, 3.0) / (l / k));
} else {
tmp = 2.0 * ((l * (l / Math.pow(k, 4.0))) / t);
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (t <= -1.35e-108) or not (t <= 1.65e-34): tmp = (l / k) / (math.pow(t, 3.0) / (l / k)) else: tmp = 2.0 * ((l * (l / math.pow(k, 4.0))) / t) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if ((t <= -1.35e-108) || !(t <= 1.65e-34)) tmp = Float64(Float64(l / k) / Float64((t ^ 3.0) / Float64(l / k))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / (k ^ 4.0))) / t)); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.35e-108) || ~((t <= 1.65e-34))) tmp = (l / k) / ((t ^ 3.0) / (l / k)); else tmp = 2.0 * ((l * (l / (k ^ 4.0))) / t); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[Or[LessEqual[t, -1.35e-108], N[Not[LessEqual[t, 1.65e-34]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-108} \lor \neg \left(t \leq 1.65 \cdot 10^{-34}\right):\\
\;\;\;\;\frac{\frac{\ell}{k}}{\frac{{t}^{3}}{\frac{\ell}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell \cdot \frac{\ell}{{k}^{4}}}{t}\\
\end{array}
\end{array}
if t < -1.35000000000000002e-108 or 1.64999999999999991e-34 < t Initial program 63.5%
associate-/r*63.5%
associate-*l*58.2%
sqr-neg58.2%
associate-*l*63.5%
*-commutative63.5%
sqr-neg63.5%
associate-*l/63.5%
associate-*r/64.0%
associate-/r/64.0%
Simplified64.0%
Taylor expanded in k around 0 55.4%
associate-/r*54.7%
unpow254.7%
unpow254.7%
times-frac66.5%
Simplified66.5%
add-exp-log50.3%
pow250.3%
Applied egg-rr50.3%
add-exp-log66.5%
pow266.5%
associate-/l*70.1%
Applied egg-rr70.1%
if -1.35000000000000002e-108 < t < 1.64999999999999991e-34Initial program 34.9%
associate-/r*34.9%
associate-*l*34.8%
sqr-neg34.8%
associate-*l*34.9%
*-commutative34.9%
sqr-neg34.9%
associate-*l/34.8%
associate-*r/34.8%
associate-/r/34.8%
Simplified34.8%
Taylor expanded in k around inf 65.0%
associate-*r/65.0%
associate-*r*65.1%
times-frac66.2%
unpow266.2%
associate-*l*66.2%
unpow266.2%
Simplified66.2%
Taylor expanded in k around 0 57.2%
unpow257.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in l around 0 57.2%
unpow257.2%
*-commutative57.2%
times-frac70.5%
Simplified70.5%
associate-*l/70.6%
Applied egg-rr70.6%
Final simplification70.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ l (pow k 4.0)) (/ l t))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l / pow(k, 4.0)) * (l / t));
}
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 * ((l / (k ** 4.0d0)) * (l / t))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l / Math.pow(k, 4.0)) * (l / t));
}
k = abs(k) def code(t, l, k): return 2.0 * ((l / math.pow(k, 4.0)) * (l / t))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l / (k ^ 4.0)) * Float64(l / t))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l / (k ^ 4.0)) * (l / t)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left(\frac{\ell}{{k}^{4}} \cdot \frac{\ell}{t}\right)
\end{array}
Initial program 53.4%
associate-/r*53.4%
associate-*l*50.0%
sqr-neg50.0%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
associate-*l/53.4%
associate-*r/53.7%
associate-/r/53.7%
Simplified53.7%
Taylor expanded in k around inf 52.8%
associate-*r/52.8%
associate-*r*52.8%
times-frac54.0%
unpow254.0%
associate-*l*54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in k around 0 46.6%
unpow246.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in l around 0 46.6%
unpow246.6%
*-commutative46.6%
times-frac52.1%
Simplified52.1%
Final simplification52.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* l (/ l t)) (pow k 4.0))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((l * (l / t)) / pow(k, 4.0));
}
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 * ((l * (l / t)) / (k ** 4.0d0))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((l * (l / t)) / Math.pow(k, 4.0));
}
k = abs(k) def code(t, l, k): return 2.0 * ((l * (l / t)) / math.pow(k, 4.0))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(l * Float64(l / t)) / (k ^ 4.0))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((l * (l / t)) / (k ^ 4.0)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \frac{\ell \cdot \frac{\ell}{t}}{{k}^{4}}
\end{array}
Initial program 53.4%
associate-/r*53.4%
associate-*l*50.0%
sqr-neg50.0%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
associate-*l/53.4%
associate-*r/53.7%
associate-/r/53.7%
Simplified53.7%
Taylor expanded in k around inf 52.8%
associate-*r/52.8%
associate-*r*52.8%
times-frac54.0%
unpow254.0%
associate-*l*54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in k around 0 46.6%
unpow246.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in l around 0 46.6%
unpow246.6%
*-commutative46.6%
times-frac52.1%
Simplified52.1%
associate-*r/52.1%
Applied egg-rr52.1%
Final simplification52.1%
herbie shell --seed 2023292
(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))))