
(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 16 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 (+ 2.0 (pow (/ k t) 2.0))) (t_2 (/ 2.0 (tan k))))
(if (<= t -2.1e-59)
(/ (pow (/ (cbrt t_2) (/ t (/ (cbrt (* l l)) (cbrt (sin k))))) 3.0) t_1)
(if (<= t 4.2e-11)
(* 2.0 (/ (/ (/ l k) (* t (/ k l))) (/ (pow (sin k) 2.0) (cos k))))
(/ (/ t_2 (* (sin k) (pow (/ (pow t 1.5) l) 2.0))) t_1)))))
double code(double t, double l, double k) {
double t_1 = 2.0 + pow((k / t), 2.0);
double t_2 = 2.0 / tan(k);
double tmp;
if (t <= -2.1e-59) {
tmp = pow((cbrt(t_2) / (t / (cbrt((l * l)) / cbrt(sin(k))))), 3.0) / t_1;
} else if (t <= 4.2e-11) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = (t_2 / (sin(k) * pow((pow(t, 1.5) / l), 2.0))) / t_1;
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = 2.0 + Math.pow((k / t), 2.0);
double t_2 = 2.0 / Math.tan(k);
double tmp;
if (t <= -2.1e-59) {
tmp = Math.pow((Math.cbrt(t_2) / (t / (Math.cbrt((l * l)) / Math.cbrt(Math.sin(k))))), 3.0) / t_1;
} else if (t <= 4.2e-11) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = (t_2 / (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0))) / t_1;
}
return tmp;
}
function code(t, l, k) t_1 = Float64(2.0 + (Float64(k / t) ^ 2.0)) t_2 = Float64(2.0 / tan(k)) tmp = 0.0 if (t <= -2.1e-59) tmp = Float64((Float64(cbrt(t_2) / Float64(t / Float64(cbrt(Float64(l * l)) / cbrt(sin(k))))) ^ 3.0) / t_1); elseif (t <= 4.2e-11) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(Float64(t_2 / Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0))) / t_1); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e-59], N[(N[Power[N[(N[Power[t$95$2, 1/3], $MachinePrecision] / N[(t / N[(N[Power[N[(l * l), $MachinePrecision], 1/3], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 4.2e-11], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 + {\left(\frac{k}{t}\right)}^{2}\\
t_2 := \frac{2}{\tan k}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{-59}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{t_2}}{\frac{t}{\frac{\sqrt[3]{\ell \cdot \ell}}{\sqrt[3]{\sin k}}}}\right)}^{3}}{t_1}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{\frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_2}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}}{t_1}\\
\end{array}
\end{array}
if t < -2.09999999999999997e-59Initial program 71.3%
associate-/r*71.3%
associate-*l*64.1%
sqr-neg64.1%
associate-*l*71.3%
*-commutative71.3%
sqr-neg71.3%
associate-/r*71.3%
Simplified71.0%
add-cube-cbrt70.8%
pow370.8%
cbrt-div70.8%
cbrt-div70.7%
rem-cbrt-cube74.0%
Applied egg-rr74.0%
cbrt-div80.3%
Applied egg-rr80.3%
if -2.09999999999999997e-59 < t < 4.1999999999999997e-11Initial program 40.8%
associate-/r*40.8%
associate-*l*40.8%
sqr-neg40.8%
associate-*l*40.8%
*-commutative40.8%
sqr-neg40.8%
associate-*l/40.8%
associate-*r/40.6%
associate-/r/38.8%
Simplified38.8%
Taylor expanded in k around inf 75.2%
associate-*r*75.2%
times-frac75.7%
unpow275.7%
unpow275.7%
associate-*l*80.6%
Simplified80.6%
Taylor expanded in l around 0 75.2%
associate-*r*75.2%
associate-/r*75.8%
associate-*l/75.7%
unpow275.7%
associate-*r*80.5%
unpow280.5%
associate-/l*80.6%
times-frac93.4%
associate-/r*95.4%
Simplified95.4%
clear-num95.5%
frac-times95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
if 4.1999999999999997e-11 < t Initial program 63.8%
associate-/r*63.8%
associate-*l*56.8%
sqr-neg56.8%
associate-*l*63.8%
*-commutative63.8%
sqr-neg63.8%
associate-/r*63.8%
Simplified63.6%
associate-/r/63.8%
add-sqr-sqrt63.8%
pow263.8%
sqrt-div63.8%
sqrt-pow172.1%
metadata-eval72.1%
sqrt-prod48.1%
add-sqr-sqrt90.7%
Applied egg-rr90.7%
Final simplification89.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ (pow (/ k t) 2.0) 1.0))))
(if (<= (/ 2.0 (* t_1 (* (tan k) (* (sin k) (/ (pow t 3.0) (* l l)))))) 0.0)
(/ 2.0 (* (* (tan k) (* (/ k l) (/ (pow t 3.0) l))) t_1))
(* 2.0 (/ (/ (/ l k) (* t (/ k l))) (/ (pow (sin k) 2.0) (cos k)))))))
double code(double t, double l, double k) {
double t_1 = 1.0 + (pow((k / t), 2.0) + 1.0);
double tmp;
if ((2.0 / (t_1 * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= 0.0) {
tmp = 2.0 / ((tan(k) * ((k / l) * (pow(t, 3.0) / l))) * t_1);
} else {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (pow(sin(k), 2.0) / cos(k)));
}
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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + (((k / t) ** 2.0d0) + 1.0d0)
if ((2.0d0 / (t_1 * (tan(k) * (sin(k) * ((t ** 3.0d0) / (l * l)))))) <= 0.0d0) then
tmp = 2.0d0 / ((tan(k) * ((k / l) * ((t ** 3.0d0) / l))) * t_1)
else
tmp = 2.0d0 * (((l / k) / (t * (k / l))) / ((sin(k) ** 2.0d0) / cos(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (Math.pow((k / t), 2.0) + 1.0);
double tmp;
if ((2.0 / (t_1 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= 0.0) {
tmp = 2.0 / ((Math.tan(k) * ((k / l) * (Math.pow(t, 3.0) / l))) * t_1);
} else {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
}
return tmp;
}
def code(t, l, k): t_1 = 1.0 + (math.pow((k / t), 2.0) + 1.0) tmp = 0 if (2.0 / (t_1 * (math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))))) <= 0.0: tmp = 2.0 / ((math.tan(k) * ((k / l) * (math.pow(t, 3.0) / l))) * t_1) else: tmp = 2.0 * (((l / k) / (t * (k / l))) / (math.pow(math.sin(k), 2.0) / math.cos(k))) return tmp
function code(t, l, k) t_1 = Float64(1.0 + Float64((Float64(k / t) ^ 2.0) + 1.0)) tmp = 0.0 if (Float64(2.0 / Float64(t_1 * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= 0.0) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(k / l) * Float64((t ^ 3.0) / l))) * t_1)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64((sin(k) ^ 2.0) / cos(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 1.0 + (((k / t) ^ 2.0) + 1.0); tmp = 0.0; if ((2.0 / (t_1 * (tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))))) <= 0.0) tmp = 2.0 / ((tan(k) * ((k / l) * ((t ^ 3.0) / l))) * t_1); else tmp = 2.0 * (((l / k) / (t * (k / l))) / ((sin(k) ^ 2.0) / cos(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 + N[(N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\\
\mathbf{if}\;\frac{2}{t_1 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq 0:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)\right) \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{\frac{{\sin k}^{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))) < -0.0Initial program 82.4%
Taylor expanded in k around 0 81.7%
*-commutative81.7%
unpow281.7%
times-frac89.1%
Simplified89.1%
if -0.0 < (/.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 23.5%
associate-/r*23.5%
associate-*l*23.5%
sqr-neg23.5%
associate-*l*23.5%
*-commutative23.5%
sqr-neg23.5%
associate-*l/23.5%
associate-*r/23.5%
associate-/r/23.5%
Simplified23.5%
Taylor expanded in k around inf 58.3%
associate-*r*58.3%
times-frac58.7%
unpow258.7%
unpow258.7%
associate-*l*63.4%
Simplified63.4%
Taylor expanded in l around 0 58.3%
associate-*r*58.3%
associate-/r*58.7%
associate-*l/58.7%
unpow258.7%
associate-*r*63.4%
unpow263.4%
associate-/l*63.4%
times-frac77.7%
associate-/r*80.0%
Simplified80.0%
clear-num80.1%
frac-times80.1%
*-un-lft-identity80.1%
Applied egg-rr80.1%
Final simplification85.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 2.0 (pow (/ k t) 2.0))) (t_2 (/ 2.0 (tan k))))
(if (<= t -2.35e-70)
(/ (pow (/ (cbrt t_2) (/ t (cbrt (/ l (/ (sin k) l))))) 3.0) t_1)
(if (<= t 1.15e-11)
(* 2.0 (/ (/ (/ l k) (* t (/ k l))) (/ (pow (sin k) 2.0) (cos k))))
(/ (/ t_2 (* (sin k) (pow (/ (pow t 1.5) l) 2.0))) t_1)))))
double code(double t, double l, double k) {
double t_1 = 2.0 + pow((k / t), 2.0);
double t_2 = 2.0 / tan(k);
double tmp;
if (t <= -2.35e-70) {
tmp = pow((cbrt(t_2) / (t / cbrt((l / (sin(k) / l))))), 3.0) / t_1;
} else if (t <= 1.15e-11) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = (t_2 / (sin(k) * pow((pow(t, 1.5) / l), 2.0))) / t_1;
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = 2.0 + Math.pow((k / t), 2.0);
double t_2 = 2.0 / Math.tan(k);
double tmp;
if (t <= -2.35e-70) {
tmp = Math.pow((Math.cbrt(t_2) / (t / Math.cbrt((l / (Math.sin(k) / l))))), 3.0) / t_1;
} else if (t <= 1.15e-11) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = (t_2 / (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0))) / t_1;
}
return tmp;
}
function code(t, l, k) t_1 = Float64(2.0 + (Float64(k / t) ^ 2.0)) t_2 = Float64(2.0 / tan(k)) tmp = 0.0 if (t <= -2.35e-70) tmp = Float64((Float64(cbrt(t_2) / Float64(t / cbrt(Float64(l / Float64(sin(k) / l))))) ^ 3.0) / t_1); elseif (t <= 1.15e-11) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(Float64(t_2 / Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0))) / t_1); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.35e-70], N[(N[Power[N[(N[Power[t$95$2, 1/3], $MachinePrecision] / N[(t / N[Power[N[(l / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.15e-11], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 + {\left(\frac{k}{t}\right)}^{2}\\
t_2 := \frac{2}{\tan k}\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{-70}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{t_2}}{\frac{t}{\sqrt[3]{\frac{\ell}{\frac{\sin k}{\ell}}}}}\right)}^{3}}{t_1}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-11}:\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{\frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_2}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}}{t_1}\\
\end{array}
\end{array}
if t < -2.3499999999999999e-70Initial program 69.9%
associate-/r*69.9%
associate-*l*63.0%
sqr-neg63.0%
associate-*l*69.9%
*-commutative69.9%
sqr-neg69.9%
associate-/r*69.9%
Simplified69.6%
add-cube-cbrt69.4%
pow369.4%
cbrt-div69.4%
cbrt-div69.3%
rem-cbrt-cube72.4%
Applied egg-rr72.4%
Taylor expanded in k around inf 53.6%
unpow1/372.4%
unpow272.4%
associate-/l*75.7%
Simplified75.7%
if -2.3499999999999999e-70 < t < 1.15000000000000007e-11Initial program 41.0%
associate-/r*41.0%
associate-*l*40.9%
sqr-neg40.9%
associate-*l*41.0%
*-commutative41.0%
sqr-neg41.0%
associate-*l/40.9%
associate-*r/40.8%
associate-/r/39.0%
Simplified39.0%
Taylor expanded in k around inf 76.3%
associate-*r*76.3%
times-frac76.9%
unpow276.9%
unpow276.9%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in l around 0 76.3%
associate-*r*76.3%
associate-/r*76.9%
associate-*l/76.9%
unpow276.9%
associate-*r*81.8%
unpow281.8%
associate-/l*81.9%
times-frac95.0%
associate-/r*97.0%
Simplified97.0%
clear-num97.1%
frac-times97.2%
*-un-lft-identity97.2%
Applied egg-rr97.2%
if 1.15000000000000007e-11 < t Initial program 63.8%
associate-/r*63.8%
associate-*l*56.8%
sqr-neg56.8%
associate-*l*63.8%
*-commutative63.8%
sqr-neg63.8%
associate-/r*63.8%
Simplified63.6%
associate-/r/63.8%
add-sqr-sqrt63.8%
pow263.8%
sqrt-div63.8%
sqrt-pow172.1%
metadata-eval72.1%
sqrt-prod48.1%
add-sqr-sqrt90.7%
Applied egg-rr90.7%
Final simplification89.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<= t -3.4e-68)
(/ 2.0 (* (* (tan k) (* (/ k l) (/ (pow t 3.0) l))) (+ 1.0 (+ t_1 1.0))))
(if (<= t 5.2e-13)
(* 2.0 (/ (/ (/ l k) (* t (/ k l))) (/ (pow (sin k) 2.0) (cos k))))
(/
(/ (/ 2.0 (tan k)) (* (sin k) (pow (/ (pow t 1.5) l) 2.0)))
(+ 2.0 t_1))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (t <= -3.4e-68) {
tmp = 2.0 / ((tan(k) * ((k / l) * (pow(t, 3.0) / l))) * (1.0 + (t_1 + 1.0)));
} else if (t <= 5.2e-13) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = ((2.0 / tan(k)) / (sin(k) * pow((pow(t, 1.5) / l), 2.0))) / (2.0 + t_1);
}
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) :: t_1
real(8) :: tmp
t_1 = (k / t) ** 2.0d0
if (t <= (-3.4d-68)) then
tmp = 2.0d0 / ((tan(k) * ((k / l) * ((t ** 3.0d0) / l))) * (1.0d0 + (t_1 + 1.0d0)))
else if (t <= 5.2d-13) then
tmp = 2.0d0 * (((l / k) / (t * (k / l))) / ((sin(k) ** 2.0d0) / cos(k)))
else
tmp = ((2.0d0 / tan(k)) / (sin(k) * (((t ** 1.5d0) / l) ** 2.0d0))) / (2.0d0 + t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if (t <= -3.4e-68) {
tmp = 2.0 / ((Math.tan(k) * ((k / l) * (Math.pow(t, 3.0) / l))) * (1.0 + (t_1 + 1.0)));
} else if (t <= 5.2e-13) {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0))) / (2.0 + t_1);
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if t <= -3.4e-68: tmp = 2.0 / ((math.tan(k) * ((k / l) * (math.pow(t, 3.0) / l))) * (1.0 + (t_1 + 1.0))) elif t <= 5.2e-13: tmp = 2.0 * (((l / k) / (t * (k / l))) / (math.pow(math.sin(k), 2.0) / math.cos(k))) else: tmp = ((2.0 / math.tan(k)) / (math.sin(k) * math.pow((math.pow(t, 1.5) / l), 2.0))) / (2.0 + t_1) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (t <= -3.4e-68) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(Float64(k / l) * Float64((t ^ 3.0) / l))) * Float64(1.0 + Float64(t_1 + 1.0)))); elseif (t <= 5.2e-13) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0))) / Float64(2.0 + t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if (t <= -3.4e-68) tmp = 2.0 / ((tan(k) * ((k / l) * ((t ^ 3.0) / l))) * (1.0 + (t_1 + 1.0))); elseif (t <= 5.2e-13) tmp = 2.0 * (((l / k) / (t * (k / l))) / ((sin(k) ^ 2.0) / cos(k))); else tmp = ((2.0 / tan(k)) / (sin(k) * (((t ^ 1.5) / l) ^ 2.0))) / (2.0 + t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, -3.4e-68], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-13], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)\right) \cdot \left(1 + \left(t_1 + 1\right)\right)}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-13}:\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{\frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{\tan k}}{\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}}}{2 + t_1}\\
\end{array}
\end{array}
if t < -3.40000000000000018e-68Initial program 69.9%
Taylor expanded in k around 0 67.3%
*-commutative67.3%
unpow267.3%
times-frac72.9%
Simplified72.9%
if -3.40000000000000018e-68 < t < 5.2000000000000001e-13Initial program 41.0%
associate-/r*41.0%
associate-*l*40.9%
sqr-neg40.9%
associate-*l*41.0%
*-commutative41.0%
sqr-neg41.0%
associate-*l/40.9%
associate-*r/40.8%
associate-/r/39.0%
Simplified39.0%
Taylor expanded in k around inf 76.3%
associate-*r*76.3%
times-frac76.9%
unpow276.9%
unpow276.9%
associate-*l*81.9%
Simplified81.9%
Taylor expanded in l around 0 76.3%
associate-*r*76.3%
associate-/r*76.9%
associate-*l/76.9%
unpow276.9%
associate-*r*81.8%
unpow281.8%
associate-/l*81.9%
times-frac95.0%
associate-/r*97.0%
Simplified97.0%
clear-num97.1%
frac-times97.2%
*-un-lft-identity97.2%
Applied egg-rr97.2%
if 5.2000000000000001e-13 < t Initial program 63.8%
associate-/r*63.8%
associate-*l*56.8%
sqr-neg56.8%
associate-*l*63.8%
*-commutative63.8%
sqr-neg63.8%
associate-/r*63.8%
Simplified63.6%
associate-/r/63.8%
add-sqr-sqrt63.8%
pow263.8%
sqrt-div63.8%
sqrt-pow172.1%
metadata-eval72.1%
sqrt-prod48.1%
add-sqr-sqrt90.7%
Applied egg-rr90.7%
Final simplification88.2%
(FPCore (t l k) :precision binary64 (if (<= k 5.6e-36) (* (/ l k) (/ (/ l (pow t 3.0)) k)) (* 2.0 (* (cos k) (/ (* (/ l k) (/ (/ l k) t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.6e-36) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (cos(k) * (((l / k) * ((l / 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 <= 5.6d-36) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else
tmp = 2.0d0 * (cos(k) * (((l / k) * ((l / 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 <= 5.6e-36) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (Math.cos(k) * (((l / k) * ((l / k) / t)) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.6e-36: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) else: tmp = 2.0 * (math.cos(k) * (((l / k) * ((l / k) / t)) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.6e-36) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); else tmp = Float64(2.0 * Float64(cos(k) * Float64(Float64(Float64(l / k) * Float64(Float64(l / k) / t)) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.6e-36) tmp = (l / k) * ((l / (t ^ 3.0)) / k); else tmp = 2.0 * (cos(k) * (((l / k) * ((l / k) / t)) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.6e-36], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.6 \cdot 10^{-36}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos k \cdot \frac{\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 5.6000000000000002e-36Initial program 62.2%
associate-/r*62.2%
associate-*l*56.3%
sqr-neg56.3%
associate-*l*62.2%
*-commutative62.2%
sqr-neg62.2%
associate-*l/62.2%
associate-*r/61.4%
associate-/r/61.0%
Simplified61.0%
Taylor expanded in k around 0 57.5%
unpow257.5%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in l around 0 57.5%
unpow257.5%
times-frac63.1%
associate-*l/62.1%
unpow262.1%
times-frac72.2%
Simplified72.2%
if 5.6000000000000002e-36 < k Initial program 42.4%
associate-/r*42.4%
associate-*l*42.4%
sqr-neg42.4%
associate-*l*42.4%
*-commutative42.4%
sqr-neg42.4%
associate-*l/42.4%
associate-*r/42.4%
associate-/r/39.9%
Simplified39.9%
Taylor expanded in k around inf 68.9%
associate-*r*68.9%
times-frac69.5%
unpow269.5%
unpow269.5%
associate-*l*76.0%
Simplified76.0%
Taylor expanded in l around 0 68.9%
associate-*r*68.9%
associate-/r*69.5%
associate-*l/69.5%
unpow269.5%
associate-*r*75.9%
unpow275.9%
associate-/l*75.9%
times-frac85.7%
associate-/r*85.7%
Simplified85.7%
clear-num85.7%
frac-times85.8%
*-un-lft-identity85.8%
Applied egg-rr85.8%
expm1-log1p-u75.3%
expm1-udef59.7%
Applied egg-rr59.7%
expm1-def75.3%
expm1-log1p85.8%
associate-/r/85.7%
*-commutative85.7%
associate-/r*83.5%
*-commutative83.5%
associate-*l*84.7%
*-commutative84.7%
associate-/r/84.7%
associate-/r/85.8%
associate-/r*85.6%
Simplified85.6%
Final simplification76.5%
(FPCore (t l k) :precision binary64 (if (<= k 1.2e-17) (* (/ l k) (/ (/ l (pow t 3.0)) k)) (* 2.0 (* (cos k) (/ (/ l k) (* (pow (sin k) 2.0) (* t (/ k l))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.2e-17) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (cos(k) * ((l / k) / (pow(sin(k), 2.0) * (t * (k / l)))));
}
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 <= 1.2d-17) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else
tmp = 2.0d0 * (cos(k) * ((l / k) / ((sin(k) ** 2.0d0) * (t * (k / l)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.2e-17) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (Math.cos(k) * ((l / k) / (Math.pow(Math.sin(k), 2.0) * (t * (k / l)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.2e-17: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) else: tmp = 2.0 * (math.cos(k) * ((l / k) / (math.pow(math.sin(k), 2.0) * (t * (k / l))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.2e-17) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); else tmp = Float64(2.0 * Float64(cos(k) * Float64(Float64(l / k) / Float64((sin(k) ^ 2.0) * Float64(t * Float64(k / l)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.2e-17) tmp = (l / k) * ((l / (t ^ 3.0)) / k); else tmp = 2.0 * (cos(k) * ((l / k) / ((sin(k) ^ 2.0) * (t * (k / l))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.2e-17], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos k \cdot \frac{\frac{\ell}{k}}{{\sin k}^{2} \cdot \left(t \cdot \frac{k}{\ell}\right)}\right)\\
\end{array}
\end{array}
if k < 1.19999999999999993e-17Initial program 62.3%
associate-/r*62.3%
associate-*l*56.5%
sqr-neg56.5%
associate-*l*62.3%
*-commutative62.3%
sqr-neg62.3%
associate-*l/62.3%
associate-*r/61.5%
associate-/r/61.1%
Simplified61.1%
Taylor expanded in k around 0 57.6%
unpow257.6%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in l around 0 57.6%
unpow257.6%
times-frac63.1%
associate-*l/62.2%
unpow262.2%
times-frac72.1%
Simplified72.1%
if 1.19999999999999993e-17 < k Initial program 41.4%
associate-/r*41.4%
associate-*l*41.4%
sqr-neg41.4%
associate-*l*41.4%
*-commutative41.4%
sqr-neg41.4%
associate-*l/41.5%
associate-*r/41.4%
associate-/r/38.9%
Simplified38.9%
Taylor expanded in k around inf 67.7%
associate-*r*67.7%
times-frac68.3%
unpow268.3%
unpow268.3%
associate-*l*75.1%
Simplified75.1%
Taylor expanded in l around 0 67.7%
associate-*r*67.7%
associate-/r*68.3%
associate-*l/68.3%
unpow268.3%
associate-*r*75.0%
unpow275.0%
associate-/l*75.0%
times-frac85.2%
associate-/r*85.1%
Simplified85.1%
clear-num85.2%
frac-times85.2%
*-un-lft-identity85.2%
Applied egg-rr85.2%
expm1-log1p-u75.7%
expm1-udef59.5%
Applied egg-rr59.5%
expm1-def75.7%
expm1-log1p85.2%
associate-/r/85.2%
*-commutative85.2%
associate-/l/85.2%
*-commutative85.2%
Simplified85.2%
Final simplification76.1%
(FPCore (t l k) :precision binary64 (if (<= k 8.6e-35) (* (/ l k) (/ (/ l (pow t 3.0)) k)) (* 2.0 (* (cos k) (/ (/ (/ l k) (* t (/ k l))) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 8.6e-35) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (cos(k) * (((l / k) / (t * (k / l))) / 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 <= 8.6d-35) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else
tmp = 2.0d0 * (cos(k) * (((l / k) / (t * (k / l))) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8.6e-35) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (Math.cos(k) * (((l / k) / (t * (k / l))) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 8.6e-35: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) else: tmp = 2.0 * (math.cos(k) * (((l / k) / (t * (k / l))) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 8.6e-35) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); else tmp = Float64(2.0 * Float64(cos(k) * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 8.6e-35) tmp = (l / k) * ((l / (t ^ 3.0)) / k); else tmp = 2.0 * (cos(k) * (((l / k) / (t * (k / l))) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 8.6e-35], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8.6 \cdot 10^{-35}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos k \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 8.6000000000000004e-35Initial program 62.2%
associate-/r*62.2%
associate-*l*56.3%
sqr-neg56.3%
associate-*l*62.2%
*-commutative62.2%
sqr-neg62.2%
associate-*l/62.2%
associate-*r/61.4%
associate-/r/61.0%
Simplified61.0%
Taylor expanded in k around 0 57.5%
unpow257.5%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in l around 0 57.5%
unpow257.5%
times-frac63.1%
associate-*l/62.1%
unpow262.1%
times-frac72.2%
Simplified72.2%
if 8.6000000000000004e-35 < k Initial program 42.4%
associate-/r*42.4%
associate-*l*42.4%
sqr-neg42.4%
associate-*l*42.4%
*-commutative42.4%
sqr-neg42.4%
associate-*l/42.4%
associate-*r/42.4%
associate-/r/39.9%
Simplified39.9%
Taylor expanded in k around inf 68.9%
associate-*r*68.9%
times-frac69.5%
unpow269.5%
unpow269.5%
associate-*l*76.0%
Simplified76.0%
Taylor expanded in l around 0 68.9%
associate-*r*68.9%
associate-/r*69.5%
associate-*l/69.5%
unpow269.5%
associate-*r*75.9%
unpow275.9%
associate-/l*75.9%
times-frac85.7%
associate-/r*85.7%
Simplified85.7%
clear-num85.7%
frac-times85.8%
*-un-lft-identity85.8%
Applied egg-rr85.8%
associate-/r/85.7%
Applied egg-rr85.7%
Final simplification76.5%
(FPCore (t l k) :precision binary64 (if (<= k 1.02e-35) (* (/ l k) (/ (/ l (pow t 3.0)) k)) (* 2.0 (/ (/ (/ l k) (* t (/ k l))) (/ (pow (sin k) 2.0) (cos k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.02e-35) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (pow(sin(k), 2.0) / cos(k)));
}
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 <= 1.02d-35) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else
tmp = 2.0d0 * (((l / k) / (t * (k / l))) / ((sin(k) ** 2.0d0) / cos(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.02e-35) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else {
tmp = 2.0 * (((l / k) / (t * (k / l))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.02e-35: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) else: tmp = 2.0 * (((l / k) / (t * (k / l))) / (math.pow(math.sin(k), 2.0) / math.cos(k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.02e-35) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64((sin(k) ^ 2.0) / cos(k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.02e-35) tmp = (l / k) * ((l / (t ^ 3.0)) / k); else tmp = 2.0 * (((l / k) / (t * (k / l))) / ((sin(k) ^ 2.0) / cos(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.02e-35], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.02 \cdot 10^{-35}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{\frac{{\sin k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 1.01999999999999995e-35Initial program 62.2%
associate-/r*62.2%
associate-*l*56.3%
sqr-neg56.3%
associate-*l*62.2%
*-commutative62.2%
sqr-neg62.2%
associate-*l/62.2%
associate-*r/61.4%
associate-/r/61.0%
Simplified61.0%
Taylor expanded in k around 0 57.5%
unpow257.5%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in l around 0 57.5%
unpow257.5%
times-frac63.1%
associate-*l/62.1%
unpow262.1%
times-frac72.2%
Simplified72.2%
if 1.01999999999999995e-35 < k Initial program 42.4%
associate-/r*42.4%
associate-*l*42.4%
sqr-neg42.4%
associate-*l*42.4%
*-commutative42.4%
sqr-neg42.4%
associate-*l/42.4%
associate-*r/42.4%
associate-/r/39.9%
Simplified39.9%
Taylor expanded in k around inf 68.9%
associate-*r*68.9%
times-frac69.5%
unpow269.5%
unpow269.5%
associate-*l*76.0%
Simplified76.0%
Taylor expanded in l around 0 68.9%
associate-*r*68.9%
associate-/r*69.5%
associate-*l/69.5%
unpow269.5%
associate-*r*75.9%
unpow275.9%
associate-/l*75.9%
times-frac85.7%
associate-/r*85.7%
Simplified85.7%
clear-num85.7%
frac-times85.8%
*-un-lft-identity85.8%
Applied egg-rr85.8%
Final simplification76.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ k (/ l k))))
(if (<= t -3.15e-68)
(* (/ l k) (/ (/ l (pow t 3.0)) k))
(if (<= t 3.4e-55)
(/ 2.0 (* t_1 (* t_1 (/ t (cos k)))))
(* l (/ (/ l k) (* k (pow t 3.0))))))))
double code(double t, double l, double k) {
double t_1 = k / (l / k);
double tmp;
if (t <= -3.15e-68) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else if (t <= 3.4e-55) {
tmp = 2.0 / (t_1 * (t_1 * (t / cos(k))));
} else {
tmp = l * ((l / k) / (k * pow(t, 3.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) :: t_1
real(8) :: tmp
t_1 = k / (l / k)
if (t <= (-3.15d-68)) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else if (t <= 3.4d-55) then
tmp = 2.0d0 / (t_1 * (t_1 * (t / cos(k))))
else
tmp = l * ((l / k) / (k * (t ** 3.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = k / (l / k);
double tmp;
if (t <= -3.15e-68) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else if (t <= 3.4e-55) {
tmp = 2.0 / (t_1 * (t_1 * (t / Math.cos(k))));
} else {
tmp = l * ((l / k) / (k * Math.pow(t, 3.0)));
}
return tmp;
}
def code(t, l, k): t_1 = k / (l / k) tmp = 0 if t <= -3.15e-68: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) elif t <= 3.4e-55: tmp = 2.0 / (t_1 * (t_1 * (t / math.cos(k)))) else: tmp = l * ((l / k) / (k * math.pow(t, 3.0))) return tmp
function code(t, l, k) t_1 = Float64(k / Float64(l / k)) tmp = 0.0 if (t <= -3.15e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); elseif (t <= 3.4e-55) tmp = Float64(2.0 / Float64(t_1 * Float64(t_1 * Float64(t / cos(k))))); else tmp = Float64(l * Float64(Float64(l / k) / Float64(k * (t ^ 3.0)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k / (l / k); tmp = 0.0; if (t <= -3.15e-68) tmp = (l / k) * ((l / (t ^ 3.0)) / k); elseif (t <= 3.4e-55) tmp = 2.0 / (t_1 * (t_1 * (t / cos(k)))); else tmp = l * ((l / k) / (k * (t ^ 3.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.15e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-55], N[(2.0 / N[(t$95$1 * N[(t$95$1 * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / k), $MachinePrecision] / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{k}{\frac{\ell}{k}}\\
\mathbf{if}\;t \leq -3.15 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{t_1 \cdot \left(t_1 \cdot \frac{t}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k}}{k \cdot {t}^{3}}\\
\end{array}
\end{array}
if t < -3.1499999999999999e-68Initial program 69.9%
associate-/r*69.9%
associate-*l*63.0%
sqr-neg63.0%
associate-*l*69.9%
*-commutative69.9%
sqr-neg69.9%
associate-*l/69.9%
associate-*r/68.2%
associate-/r/67.2%
Simplified67.2%
Taylor expanded in k around 0 57.8%
unpow257.8%
times-frac61.0%
unpow261.0%
Simplified61.0%
Taylor expanded in l around 0 57.8%
unpow257.8%
times-frac61.0%
associate-*l/59.8%
unpow259.8%
times-frac71.7%
Simplified71.7%
if -3.1499999999999999e-68 < t < 3.39999999999999973e-55Initial program 38.8%
Taylor expanded in t around 0 76.6%
*-commutative76.6%
*-commutative76.6%
unpow276.6%
associate-*r*76.6%
times-frac85.2%
unpow285.2%
Simplified85.2%
Taylor expanded in k around 0 72.4%
unpow272.4%
Simplified72.4%
expm1-log1p-u56.6%
expm1-udef33.6%
*-commutative33.6%
associate-/l*33.6%
times-frac33.6%
associate-/l*33.7%
Applied egg-rr33.7%
expm1-def59.4%
expm1-log1p75.2%
*-commutative75.2%
Simplified75.2%
if 3.39999999999999973e-55 < t Initial program 64.5%
associate-/r*64.5%
associate-*l*58.1%
sqr-neg58.1%
associate-*l*64.5%
*-commutative64.5%
sqr-neg64.5%
associate-*l/64.5%
associate-*r/64.3%
associate-/r/64.4%
Simplified64.4%
Taylor expanded in k around 0 54.4%
unpow254.4%
times-frac61.1%
unpow261.1%
Simplified61.1%
associate-*r/59.7%
Applied egg-rr59.7%
Taylor expanded in l around 0 54.4%
associate-/r*54.3%
unpow254.3%
associate-*l/59.7%
unpow259.7%
associate-*l/61.1%
*-commutative61.1%
associate-/r*64.8%
associate-/l/70.1%
Simplified70.1%
Final simplification72.6%
(FPCore (t l k)
:precision binary64
(if (<= t -3.1e-73)
(* (/ l k) (/ (/ l (pow t 3.0)) k))
(if (<= t 3.4e-55)
(/ 2.0 (* (/ (/ k (/ (/ l k) t)) l) (/ (* k k) (cos k))))
(* l (/ (/ l k) (* k (pow t 3.0)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -3.1e-73) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else if (t <= 3.4e-55) {
tmp = 2.0 / (((k / ((l / k) / t)) / l) * ((k * k) / cos(k)));
} else {
tmp = l * ((l / k) / (k * pow(t, 3.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 (t <= (-3.1d-73)) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else if (t <= 3.4d-55) then
tmp = 2.0d0 / (((k / ((l / k) / t)) / l) * ((k * k) / cos(k)))
else
tmp = l * ((l / k) / (k * (t ** 3.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -3.1e-73) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else if (t <= 3.4e-55) {
tmp = 2.0 / (((k / ((l / k) / t)) / l) * ((k * k) / Math.cos(k)));
} else {
tmp = l * ((l / k) / (k * Math.pow(t, 3.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -3.1e-73: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) elif t <= 3.4e-55: tmp = 2.0 / (((k / ((l / k) / t)) / l) * ((k * k) / math.cos(k))) else: tmp = l * ((l / k) / (k * math.pow(t, 3.0))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -3.1e-73) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); elseif (t <= 3.4e-55) tmp = Float64(2.0 / Float64(Float64(Float64(k / Float64(Float64(l / k) / t)) / l) * Float64(Float64(k * k) / cos(k)))); else tmp = Float64(l * Float64(Float64(l / k) / Float64(k * (t ^ 3.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -3.1e-73) tmp = (l / k) * ((l / (t ^ 3.0)) / k); elseif (t <= 3.4e-55) tmp = 2.0 / (((k / ((l / k) / t)) / l) * ((k * k) / cos(k))); else tmp = l * ((l / k) / (k * (t ^ 3.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -3.1e-73], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-55], N[(2.0 / N[(N[(N[(k / N[(N[(l / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / k), $MachinePrecision] / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{-73}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{\frac{\frac{k}{\frac{\frac{\ell}{k}}{t}}}{\ell} \cdot \frac{k \cdot k}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k}}{k \cdot {t}^{3}}\\
\end{array}
\end{array}
if t < -3.09999999999999969e-73Initial program 69.9%
associate-/r*69.9%
associate-*l*63.0%
sqr-neg63.0%
associate-*l*69.9%
*-commutative69.9%
sqr-neg69.9%
associate-*l/69.9%
associate-*r/68.2%
associate-/r/67.2%
Simplified67.2%
Taylor expanded in k around 0 57.8%
unpow257.8%
times-frac61.0%
unpow261.0%
Simplified61.0%
Taylor expanded in l around 0 57.8%
unpow257.8%
times-frac61.0%
associate-*l/59.8%
unpow259.8%
times-frac71.7%
Simplified71.7%
if -3.09999999999999969e-73 < t < 3.39999999999999973e-55Initial program 38.8%
Taylor expanded in t around 0 76.6%
*-commutative76.6%
*-commutative76.6%
unpow276.6%
associate-*r*76.6%
times-frac85.2%
unpow285.2%
Simplified85.2%
Taylor expanded in t around 0 76.6%
unpow276.6%
associate-*l*76.6%
*-commutative76.6%
*-commutative76.6%
times-frac85.2%
unpow285.2%
associate-/l*86.4%
associate-/l*89.1%
associate-*l/91.9%
*-commutative91.9%
associate-*l/94.3%
associate-/l*92.9%
*-commutative92.9%
associate-*r*86.3%
unpow286.3%
associate-/l*86.3%
associate-/r/86.3%
Simplified96.6%
Taylor expanded in k around 0 76.0%
unpow272.4%
Simplified76.0%
if 3.39999999999999973e-55 < t Initial program 64.5%
associate-/r*64.5%
associate-*l*58.1%
sqr-neg58.1%
associate-*l*64.5%
*-commutative64.5%
sqr-neg64.5%
associate-*l/64.5%
associate-*r/64.3%
associate-/r/64.4%
Simplified64.4%
Taylor expanded in k around 0 54.4%
unpow254.4%
times-frac61.1%
unpow261.1%
Simplified61.1%
associate-*r/59.7%
Applied egg-rr59.7%
Taylor expanded in l around 0 54.4%
associate-/r*54.3%
unpow254.3%
associate-*l/59.7%
unpow259.7%
associate-*l/61.1%
*-commutative61.1%
associate-/r*64.8%
associate-/l/70.1%
Simplified70.1%
Final simplification72.9%
(FPCore (t l k) :precision binary64 (if (<= k 1.4e-35) (* (/ l k) (/ (/ l (pow t 3.0)) k)) (/ 2.0 (* (/ (* t (* k k)) (* l (cos k))) (/ (* k k) l)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.4e-35) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else {
tmp = 2.0 / (((t * (k * k)) / (l * cos(k))) * ((k * k) / l));
}
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 <= 1.4d-35) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else
tmp = 2.0d0 / (((t * (k * k)) / (l * cos(k))) * ((k * k) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.4e-35) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else {
tmp = 2.0 / (((t * (k * k)) / (l * Math.cos(k))) * ((k * k) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.4e-35: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) else: tmp = 2.0 / (((t * (k * k)) / (l * math.cos(k))) * ((k * k) / l)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.4e-35) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); else tmp = Float64(2.0 / Float64(Float64(Float64(t * Float64(k * k)) / Float64(l * cos(k))) * Float64(Float64(k * k) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.4e-35) tmp = (l / k) * ((l / (t ^ 3.0)) / k); else tmp = 2.0 / (((t * (k * k)) / (l * cos(k))) * ((k * k) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.4e-35], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.4 \cdot 10^{-35}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t \cdot \left(k \cdot k\right)}{\ell \cdot \cos k} \cdot \frac{k \cdot k}{\ell}}\\
\end{array}
\end{array}
if k < 1.4e-35Initial program 62.2%
associate-/r*62.2%
associate-*l*56.3%
sqr-neg56.3%
associate-*l*62.2%
*-commutative62.2%
sqr-neg62.2%
associate-*l/62.2%
associate-*r/61.4%
associate-/r/61.0%
Simplified61.0%
Taylor expanded in k around 0 57.5%
unpow257.5%
times-frac63.1%
unpow263.1%
Simplified63.1%
Taylor expanded in l around 0 57.5%
unpow257.5%
times-frac63.1%
associate-*l/62.1%
unpow262.1%
times-frac72.2%
Simplified72.2%
if 1.4e-35 < k Initial program 42.4%
Taylor expanded in t around 0 68.8%
*-commutative68.8%
*-commutative68.8%
unpow268.8%
associate-*r*68.9%
times-frac72.3%
unpow272.3%
Simplified72.3%
Taylor expanded in k around 0 57.4%
unpow257.4%
Simplified57.4%
Final simplification67.5%
(FPCore (t l k) :precision binary64 (if (or (<= t -1.55e-62) (not (<= t 7.2e-55))) (* l (/ (/ l k) (* k (pow t 3.0)))) (/ 2.0 (* (/ k (/ (/ l k) t)) (* k (/ k l))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.55e-62) || !(t <= 7.2e-55)) {
tmp = l * ((l / k) / (k * pow(t, 3.0)));
} else {
tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l)));
}
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 ((t <= (-1.55d-62)) .or. (.not. (t <= 7.2d-55))) then
tmp = l * ((l / k) / (k * (t ** 3.0d0)))
else
tmp = 2.0d0 / ((k / ((l / k) / t)) * (k * (k / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.55e-62) || !(t <= 7.2e-55)) {
tmp = l * ((l / k) / (k * Math.pow(t, 3.0)));
} else {
tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -1.55e-62) or not (t <= 7.2e-55): tmp = l * ((l / k) / (k * math.pow(t, 3.0))) else: tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -1.55e-62) || !(t <= 7.2e-55)) tmp = Float64(l * Float64(Float64(l / k) / Float64(k * (t ^ 3.0)))); else tmp = Float64(2.0 / Float64(Float64(k / Float64(Float64(l / k) / t)) * Float64(k * Float64(k / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.55e-62) || ~((t <= 7.2e-55))) tmp = l * ((l / k) / (k * (t ^ 3.0))); else tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.55e-62], N[Not[LessEqual[t, 7.2e-55]], $MachinePrecision]], N[(l * N[(N[(l / k), $MachinePrecision] / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / N[(N[(l / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{-62} \lor \neg \left(t \leq 7.2 \cdot 10^{-55}\right):\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k}}{k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\frac{\ell}{k}}{t}} \cdot \left(k \cdot \frac{k}{\ell}\right)}\\
\end{array}
\end{array}
if t < -1.55e-62 or 7.2000000000000001e-55 < t Initial program 67.5%
associate-/r*67.5%
associate-*l*60.8%
sqr-neg60.8%
associate-*l*67.5%
*-commutative67.5%
sqr-neg67.5%
associate-*l/67.6%
associate-*r/66.6%
associate-/r/66.2%
Simplified66.2%
Taylor expanded in k around 0 56.4%
unpow256.4%
times-frac61.4%
unpow261.4%
Simplified61.4%
associate-*r/60.1%
Applied egg-rr60.1%
Taylor expanded in l around 0 56.4%
associate-/r*57.1%
unpow257.1%
associate-*l/60.1%
unpow260.1%
associate-*l/61.4%
*-commutative61.4%
associate-/r*65.9%
associate-/l/70.7%
Simplified70.7%
if -1.55e-62 < t < 7.2000000000000001e-55Initial program 38.5%
Taylor expanded in t around 0 75.9%
*-commutative75.9%
*-commutative75.9%
unpow275.9%
associate-*r*75.9%
times-frac84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in k around 0 70.4%
unpow270.4%
associate-*r*70.4%
associate-/l*70.7%
associate-/r*73.1%
Simplified73.1%
Taylor expanded in k around 0 73.1%
unpow273.1%
associate-*l/73.1%
*-commutative73.1%
Simplified73.1%
Final simplification71.6%
(FPCore (t l k)
:precision binary64
(if (<= t -5.6e-75)
(* (/ l k) (/ (/ l (pow t 3.0)) k))
(if (<= t 8e-55)
(/ 2.0 (* (/ k (/ (/ l k) t)) (* k (/ k l))))
(* l (/ (/ l k) (* k (pow t 3.0)))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -5.6e-75) {
tmp = (l / k) * ((l / pow(t, 3.0)) / k);
} else if (t <= 8e-55) {
tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l)));
} else {
tmp = l * ((l / k) / (k * pow(t, 3.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 (t <= (-5.6d-75)) then
tmp = (l / k) * ((l / (t ** 3.0d0)) / k)
else if (t <= 8d-55) then
tmp = 2.0d0 / ((k / ((l / k) / t)) * (k * (k / l)))
else
tmp = l * ((l / k) / (k * (t ** 3.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -5.6e-75) {
tmp = (l / k) * ((l / Math.pow(t, 3.0)) / k);
} else if (t <= 8e-55) {
tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l)));
} else {
tmp = l * ((l / k) / (k * Math.pow(t, 3.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -5.6e-75: tmp = (l / k) * ((l / math.pow(t, 3.0)) / k) elif t <= 8e-55: tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l))) else: tmp = l * ((l / k) / (k * math.pow(t, 3.0))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -5.6e-75) tmp = Float64(Float64(l / k) * Float64(Float64(l / (t ^ 3.0)) / k)); elseif (t <= 8e-55) tmp = Float64(2.0 / Float64(Float64(k / Float64(Float64(l / k) / t)) * Float64(k * Float64(k / l)))); else tmp = Float64(l * Float64(Float64(l / k) / Float64(k * (t ^ 3.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -5.6e-75) tmp = (l / k) * ((l / (t ^ 3.0)) / k); elseif (t <= 8e-55) tmp = 2.0 / ((k / ((l / k) / t)) * (k * (k / l))); else tmp = l * ((l / k) / (k * (t ^ 3.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -5.6e-75], N[(N[(l / k), $MachinePrecision] * N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-55], N[(2.0 / N[(N[(k / N[(N[(l / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / k), $MachinePrecision] / N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{-75}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{{t}^{3}}}{k}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-55}:\\
\;\;\;\;\frac{2}{\frac{k}{\frac{\frac{\ell}{k}}{t}} \cdot \left(k \cdot \frac{k}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k}}{k \cdot {t}^{3}}\\
\end{array}
\end{array}
if t < -5.59999999999999996e-75Initial program 69.9%
associate-/r*69.9%
associate-*l*63.0%
sqr-neg63.0%
associate-*l*69.9%
*-commutative69.9%
sqr-neg69.9%
associate-*l/69.9%
associate-*r/68.2%
associate-/r/67.2%
Simplified67.2%
Taylor expanded in k around 0 57.8%
unpow257.8%
times-frac61.0%
unpow261.0%
Simplified61.0%
Taylor expanded in l around 0 57.8%
unpow257.8%
times-frac61.0%
associate-*l/59.8%
unpow259.8%
times-frac71.7%
Simplified71.7%
if -5.59999999999999996e-75 < t < 7.99999999999999996e-55Initial program 38.8%
Taylor expanded in t around 0 76.6%
*-commutative76.6%
*-commutative76.6%
unpow276.6%
associate-*r*76.6%
times-frac85.2%
unpow285.2%
Simplified85.2%
Taylor expanded in k around 0 71.0%
unpow271.0%
associate-*r*71.0%
associate-/l*71.3%
associate-/r*73.7%
Simplified73.7%
Taylor expanded in k around 0 73.7%
unpow273.7%
associate-*l/73.7%
*-commutative73.7%
Simplified73.7%
if 7.99999999999999996e-55 < t Initial program 64.5%
associate-/r*64.5%
associate-*l*58.1%
sqr-neg58.1%
associate-*l*64.5%
*-commutative64.5%
sqr-neg64.5%
associate-*l/64.5%
associate-*r/64.3%
associate-/r/64.4%
Simplified64.4%
Taylor expanded in k around 0 54.4%
unpow254.4%
times-frac61.1%
unpow261.1%
Simplified61.1%
associate-*r/59.7%
Applied egg-rr59.7%
Taylor expanded in l around 0 54.4%
associate-/r*54.3%
unpow254.3%
associate-*l/59.7%
unpow259.7%
associate-*l/61.1%
*-commutative61.1%
associate-/r*64.8%
associate-/l/70.1%
Simplified70.1%
Final simplification72.0%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (/ (/ l k) (* t (/ k l))) (* k k))))
double code(double t, double l, double k) {
return 2.0 * (((l / k) / (t * (k / l))) / (k * 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 * (((l / k) / (t * (k / l))) / (k * k))
end function
public static double code(double t, double l, double k) {
return 2.0 * (((l / k) / (t * (k / l))) / (k * k));
}
def code(t, l, k): return 2.0 * (((l / k) / (t * (k / l))) / (k * k))
function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l / k) / Float64(t * Float64(k / l))) / Float64(k * k))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l / k) / (t * (k / l))) / (k * k)); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] / N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\frac{\frac{\ell}{k}}{t \cdot \frac{k}{\ell}}}{k \cdot k}
\end{array}
Initial program 56.0%
associate-/r*56.0%
associate-*l*51.9%
sqr-neg51.9%
associate-*l*56.0%
*-commutative56.0%
sqr-neg56.0%
associate-*l/55.9%
associate-*r/55.4%
associate-/r/54.3%
Simplified54.3%
Taylor expanded in k around inf 61.9%
associate-*r*61.9%
times-frac62.2%
unpow262.2%
unpow262.2%
associate-*l*64.3%
Simplified64.3%
Taylor expanded in l around 0 61.9%
associate-*r*61.9%
associate-/r*62.6%
associate-*l/62.6%
unpow262.6%
associate-*r*64.6%
unpow264.6%
associate-/l*64.7%
times-frac72.0%
associate-/r*73.0%
Simplified73.0%
clear-num73.1%
frac-times73.1%
*-un-lft-identity73.1%
Applied egg-rr73.1%
Taylor expanded in k around 0 60.0%
unpow260.0%
Simplified60.0%
Final simplification60.0%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (/ (* k k) l) (/ (* k k) (/ l t)))))
double code(double t, double l, double k) {
return 2.0 / (((k * k) / l) * ((k * k) / (l / t)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((k * k) / l) * ((k * k) / (l / t)))
end function
public static double code(double t, double l, double k) {
return 2.0 / (((k * k) / l) * ((k * k) / (l / t)));
}
def code(t, l, k): return 2.0 / (((k * k) / l) * ((k * k) / (l / t)))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(k * k) / l) * Float64(Float64(k * k) / Float64(l / t)))) end
function tmp = code(t, l, k) tmp = 2.0 / (((k * k) / l) * ((k * k) / (l / t))); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\frac{k \cdot k}{\ell} \cdot \frac{k \cdot k}{\frac{\ell}{t}}}
\end{array}
Initial program 56.0%
Taylor expanded in t around 0 61.9%
*-commutative61.9%
*-commutative61.9%
unpow261.9%
associate-*r*61.9%
times-frac65.7%
unpow265.7%
Simplified65.7%
Taylor expanded in k around 0 58.6%
associate-/l*61.1%
unpow261.1%
Simplified61.1%
Final simplification61.1%
(FPCore (t l k) :precision binary64 (/ 2.0 (/ k (/ (/ (/ l t) k) (/ k (/ l k))))))
double code(double t, double l, double k) {
return 2.0 / (k / (((l / t) / k) / (k / (l / 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 / (k / (((l / t) / k) / (k / (l / k))))
end function
public static double code(double t, double l, double k) {
return 2.0 / (k / (((l / t) / k) / (k / (l / k))));
}
def code(t, l, k): return 2.0 / (k / (((l / t) / k) / (k / (l / k))))
function code(t, l, k) return Float64(2.0 / Float64(k / Float64(Float64(Float64(l / t) / k) / Float64(k / Float64(l / k))))) end
function tmp = code(t, l, k) tmp = 2.0 / (k / (((l / t) / k) / (k / (l / k)))); end
code[t_, l_, k_] := N[(2.0 / N[(k / N[(N[(N[(l / t), $MachinePrecision] / k), $MachinePrecision] / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\frac{k}{\frac{\frac{\frac{\ell}{t}}{k}}{\frac{k}{\frac{\ell}{k}}}}}
\end{array}
Initial program 56.0%
Taylor expanded in t around 0 61.9%
*-commutative61.9%
*-commutative61.9%
unpow261.9%
associate-*r*61.9%
times-frac65.7%
unpow265.7%
Simplified65.7%
Taylor expanded in k around 0 58.6%
unpow258.6%
associate-*r*58.6%
associate-/l*59.1%
associate-/r*59.7%
Simplified59.7%
associate-*l/59.7%
associate-/l*59.7%
associate-/l/59.1%
Applied egg-rr59.1%
associate-/l*59.5%
associate-/r*63.4%
Simplified63.4%
Final simplification63.4%
herbie shell --seed 2023297
(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))))