
(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 21 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: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= l 7e+169)
(* 2.0 (/ (* (/ l k) (/ l (* k t))) (/ t_1 (cos k))))
(* 2.0 (/ (* (cos k) (pow (/ l k) 2.0)) (* t t_1))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (l <= 7e+169) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k)));
} else {
tmp = 2.0 * ((cos(k) * pow((l / k), 2.0)) / (t * t_1));
}
return tmp;
}
NOTE: l 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) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (l <= 7d+169) then
tmp = 2.0d0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k)))
else
tmp = 2.0d0 * ((cos(k) * ((l / k) ** 2.0d0)) / (t * t_1))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (l <= 7e+169) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / Math.cos(k)));
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow((l / k), 2.0)) / (t * t_1));
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if l <= 7e+169: tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / math.cos(k))) else: tmp = 2.0 * ((math.cos(k) * math.pow((l / k), 2.0)) / (t * t_1)) return tmp
l = abs(l) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (l <= 7e+169) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) / Float64(t_1 / cos(k)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * (Float64(l / k) ^ 2.0)) / Float64(t * t_1))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (l <= 7e+169) tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k))); else tmp = 2.0 * ((cos(k) * ((l / k) ^ 2.0)) / (t * t_1)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, 7e+169], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;\ell \leq 7 \cdot 10^{+169}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}}{\frac{t_1}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\left(\frac{\ell}{k}\right)}^{2}}{t \cdot t_1}\\
\end{array}
\end{array}
if l < 7.00000000000000038e169Initial program 34.6%
associate-*l*34.6%
associate-*l*34.6%
associate-/r*34.6%
associate-/r/34.6%
*-commutative34.6%
times-frac34.8%
+-commutative34.8%
associate--l+45.3%
metadata-eval45.3%
+-rgt-identity45.3%
times-frac48.9%
Simplified48.9%
Taylor expanded in t around 0 86.7%
unpow286.7%
Simplified86.7%
Taylor expanded in k around inf 82.1%
associate-/l*82.1%
associate-*r*79.5%
associate-/l*78.5%
associate-/l*78.5%
unpow278.5%
associate-/l*82.9%
*-commutative82.9%
times-frac84.2%
Simplified89.5%
associate-*r/89.8%
Applied egg-rr89.8%
*-un-lft-identity89.8%
associate-/l*89.8%
frac-times82.8%
*-commutative82.8%
associate-*r*85.4%
times-frac96.5%
Applied egg-rr96.5%
if 7.00000000000000038e169 < l Initial program 35.6%
associate-*l*35.6%
associate-*l*35.6%
associate-/r*35.6%
associate-/r/35.6%
*-commutative35.6%
times-frac35.6%
+-commutative35.6%
associate--l+35.6%
metadata-eval35.6%
+-rgt-identity35.6%
times-frac35.6%
Simplified35.6%
Taylor expanded in t around 0 61.4%
unpow261.4%
Simplified61.4%
Taylor expanded in k around inf 61.4%
associate-/l*61.4%
associate-*r*61.4%
associate-/l*61.8%
associate-/l*61.8%
unpow261.8%
associate-/l*74.6%
*-commutative74.6%
times-frac74.5%
Simplified80.8%
Taylor expanded in l around 0 61.4%
associate-/r*61.8%
unpow261.8%
unpow261.8%
times-frac96.7%
unpow296.7%
Simplified96.7%
frac-times96.7%
Applied egg-rr96.7%
Final simplification96.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= l 2.1e+144)
(* 2.0 (/ (* (/ l k) (/ l (* k t))) (/ t_1 (cos k))))
(* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) t_1))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (l <= 2.1e+144) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k)));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / t_1));
}
return tmp;
}
NOTE: l 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) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (l <= 2.1d+144) then
tmp = 2.0d0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k)))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / t_1))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (l <= 2.1e+144) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / Math.cos(k)));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / t_1));
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if l <= 2.1e+144: tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / math.cos(k))) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / t_1)) return tmp
l = abs(l) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (l <= 2.1e+144) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) / Float64(t_1 / cos(k)))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / t_1))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (l <= 2.1e+144) tmp = 2.0 * (((l / k) * (l / (k * t))) / (t_1 / cos(k))); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / t_1)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[l, 2.1e+144], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{+144}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}}{\frac{t_1}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{t_1}\right)\\
\end{array}
\end{array}
if l < 2.09999999999999996e144Initial program 34.6%
associate-*l*34.6%
associate-*l*34.6%
associate-/r*34.6%
associate-/r/34.6%
*-commutative34.6%
times-frac34.9%
+-commutative34.9%
associate--l+45.6%
metadata-eval45.6%
+-rgt-identity45.6%
times-frac49.3%
Simplified49.3%
Taylor expanded in t around 0 87.2%
unpow287.2%
Simplified87.2%
Taylor expanded in k around inf 82.5%
associate-/l*82.4%
associate-*r*79.8%
associate-/l*78.8%
associate-/l*78.8%
unpow278.8%
associate-/l*82.8%
*-commutative82.8%
times-frac84.3%
Simplified89.6%
associate-*r/90.0%
Applied egg-rr90.0%
*-un-lft-identity90.0%
associate-/l*90.0%
frac-times83.2%
*-commutative83.2%
associate-*r*85.9%
times-frac96.4%
Applied egg-rr96.4%
if 2.09999999999999996e144 < l Initial program 35.2%
associate-*l*35.2%
associate-*l*35.2%
associate-/r*35.2%
associate-/r/35.2%
*-commutative35.2%
times-frac35.4%
+-commutative35.4%
associate--l+35.4%
metadata-eval35.4%
+-rgt-identity35.4%
times-frac35.4%
Simplified35.4%
Taylor expanded in t around 0 62.4%
unpow262.4%
Simplified62.4%
Taylor expanded in k around inf 62.4%
associate-/l*62.4%
associate-*r*62.4%
associate-/l*62.6%
associate-/l*62.6%
unpow262.6%
associate-/l*76.0%
*-commutative76.0%
times-frac76.0%
Simplified81.4%
Taylor expanded in l around 0 62.4%
associate-/r*62.7%
unpow262.7%
unpow262.7%
times-frac97.2%
unpow297.2%
Simplified97.2%
Final simplification96.6%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= (* l l) 5e+262) (* (/ (/ 2.0 k) (* k t)) (* (/ l (sin k)) (/ l (tan k)))) (* 2.0 (* (/ (cos k) (pow (sin k) 2.0)) (* (/ l t) (/ l (* k k)))))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+262) {
tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)));
} else {
tmp = 2.0 * ((cos(k) / pow(sin(k), 2.0)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
NOTE: l 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 ((l * l) <= 5d+262) then
tmp = ((2.0d0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)))
else
tmp = 2.0d0 * ((cos(k) / (sin(k) ** 2.0d0)) * ((l / t) * (l / (k * k))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+262) {
tmp = ((2.0 / k) / (k * t)) * ((l / Math.sin(k)) * (l / Math.tan(k)));
} else {
tmp = 2.0 * ((Math.cos(k) / Math.pow(Math.sin(k), 2.0)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if (l * l) <= 5e+262: tmp = ((2.0 / k) / (k * t)) * ((l / math.sin(k)) * (l / math.tan(k))) else: tmp = 2.0 * ((math.cos(k) / math.pow(math.sin(k), 2.0)) * ((l / t) * (l / (k * k)))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e+262) tmp = Float64(Float64(Float64(2.0 / k) / Float64(k * t)) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / (sin(k) ^ 2.0)) * Float64(Float64(l / t) * Float64(l / Float64(k * k))))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e+262) tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k))); else tmp = 2.0 * ((cos(k) / (sin(k) ^ 2.0)) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e+262], N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\frac{\frac{2}{k}}{k \cdot t} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{{\sin k}^{2}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5.00000000000000008e262Initial program 35.5%
associate-*l*35.4%
associate-*l*35.5%
associate-/r*35.4%
associate-/r/35.4%
*-commutative35.4%
times-frac35.7%
+-commutative35.7%
associate--l+48.0%
metadata-eval48.0%
+-rgt-identity48.0%
times-frac52.3%
Simplified52.3%
Taylor expanded in t around 0 91.0%
unpow291.0%
Simplified91.0%
Taylor expanded in k around 0 91.0%
unpow291.0%
associate-*r*93.9%
associate-/r*94.1%
Simplified94.1%
if 5.00000000000000008e262 < (*.f64 l l) Initial program 32.5%
associate-*l*32.5%
associate-*l*32.5%
associate-/r*32.5%
associate-/r/32.5%
*-commutative32.5%
times-frac32.6%
+-commutative32.6%
associate--l+32.6%
metadata-eval32.6%
+-rgt-identity32.6%
times-frac32.6%
Simplified32.6%
Taylor expanded in t around 0 62.0%
unpow262.0%
Simplified62.0%
Taylor expanded in k around inf 63.4%
associate-/l*63.4%
associate-*r*63.4%
associate-/l*63.5%
associate-/l*63.5%
unpow263.5%
associate-/l*75.7%
*-commutative75.7%
times-frac75.6%
Simplified80.2%
Final simplification90.6%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= (* l l) 5e+262) (* (/ (/ 2.0 k) (* k t)) (* (/ l (sin k)) (/ l (tan k)))) (* 2.0 (/ (* (cos k) (* (/ l t) (/ l (* k k)))) (pow (sin k) 2.0)))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+262) {
tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)));
} else {
tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / pow(sin(k), 2.0));
}
return tmp;
}
NOTE: l 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 ((l * l) <= 5d+262) then
tmp = ((2.0d0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)))
else
tmp = 2.0d0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (sin(k) ** 2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e+262) {
tmp = ((2.0 / k) / (k * t)) * ((l / Math.sin(k)) * (l / Math.tan(k)));
} else {
tmp = 2.0 * ((Math.cos(k) * ((l / t) * (l / (k * k)))) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if (l * l) <= 5e+262: tmp = ((2.0 / k) / (k * t)) * ((l / math.sin(k)) * (l / math.tan(k))) else: tmp = 2.0 * ((math.cos(k) * ((l / t) * (l / (k * k)))) / math.pow(math.sin(k), 2.0)) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e+262) tmp = Float64(Float64(Float64(2.0 / k) / Float64(k * t)) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / t) * Float64(l / Float64(k * k)))) / (sin(k) ^ 2.0))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e+262) tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k))); else tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e+262], N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{+262}:\\
\;\;\;\;\frac{\frac{2}{k}}{k \cdot t} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)}{{\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 5.00000000000000008e262Initial program 35.5%
associate-*l*35.4%
associate-*l*35.5%
associate-/r*35.4%
associate-/r/35.4%
*-commutative35.4%
times-frac35.7%
+-commutative35.7%
associate--l+48.0%
metadata-eval48.0%
+-rgt-identity48.0%
times-frac52.3%
Simplified52.3%
Taylor expanded in t around 0 91.0%
unpow291.0%
Simplified91.0%
Taylor expanded in k around 0 91.0%
unpow291.0%
associate-*r*93.9%
associate-/r*94.1%
Simplified94.1%
if 5.00000000000000008e262 < (*.f64 l l) Initial program 32.5%
associate-*l*32.5%
associate-*l*32.5%
associate-/r*32.5%
associate-/r/32.5%
*-commutative32.5%
times-frac32.6%
+-commutative32.6%
associate--l+32.6%
metadata-eval32.6%
+-rgt-identity32.6%
times-frac32.6%
Simplified32.6%
Taylor expanded in t around 0 62.0%
unpow262.0%
Simplified62.0%
Taylor expanded in k around inf 63.4%
associate-/l*63.4%
associate-*r*63.4%
associate-/l*63.5%
associate-/l*63.5%
unpow263.5%
associate-/l*75.7%
*-commutative75.7%
times-frac75.6%
Simplified80.2%
associate-*r/80.2%
Applied egg-rr80.2%
Final simplification90.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= l 7.4e+161)
(* 2.0 (/ (* (/ l k) (/ l (* k t))) (/ (pow (sin k) 2.0) (cos k))))
(*
2.0
(* (/ (pow (/ l k) 2.0) t) (/ (cos k) (- 0.5 (/ (cos (+ k k)) 2.0)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (l <= 7.4e+161) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / (0.5 - (cos((k + k)) / 2.0))));
}
return tmp;
}
NOTE: l 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 (l <= 7.4d+161) then
tmp = 2.0d0 * (((l / k) * (l / (k * t))) / ((sin(k) ** 2.0d0) / cos(k)))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / (0.5d0 - (cos((k + k)) / 2.0d0))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (l <= 7.4e+161) {
tmp = 2.0 * (((l / k) * (l / (k * t))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / (0.5 - (Math.cos((k + k)) / 2.0))));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if l <= 7.4e+161: tmp = 2.0 * (((l / k) * (l / (k * t))) / (math.pow(math.sin(k), 2.0) / math.cos(k))) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / (0.5 - (math.cos((k + k)) / 2.0)))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (l <= 7.4e+161) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) / Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / Float64(0.5 - Float64(cos(Float64(k + k)) / 2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 7.4e+161) tmp = 2.0 * (((l / k) * (l / (k * t))) / ((sin(k) ^ 2.0) / cos(k))); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / (0.5 - (cos((k + k)) / 2.0)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[l, 7.4e+161], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(0.5 - N[(N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.4 \cdot 10^{+161}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}}{\frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{0.5 - \frac{\cos \left(k + k\right)}{2}}\right)\\
\end{array}
\end{array}
if l < 7.39999999999999958e161Initial program 34.4%
associate-*l*34.4%
associate-*l*34.4%
associate-/r*34.4%
associate-/r/34.4%
*-commutative34.4%
times-frac34.7%
+-commutative34.7%
associate--l+45.2%
metadata-eval45.2%
+-rgt-identity45.2%
times-frac48.9%
Simplified48.9%
Taylor expanded in t around 0 87.0%
unpow287.0%
Simplified87.0%
Taylor expanded in k around inf 82.3%
associate-/l*82.3%
associate-*r*79.7%
associate-/l*78.7%
associate-/l*78.7%
unpow278.7%
associate-/l*82.7%
*-commutative82.7%
times-frac84.1%
Simplified89.4%
associate-*r/89.7%
Applied egg-rr89.7%
*-un-lft-identity89.7%
associate-/l*89.7%
frac-times83.1%
*-commutative83.1%
associate-*r*85.7%
times-frac96.5%
Applied egg-rr96.5%
if 7.39999999999999958e161 < l Initial program 36.5%
associate-*l*36.5%
associate-*l*36.5%
associate-/r*36.5%
associate-/r/36.5%
*-commutative36.5%
times-frac36.5%
+-commutative36.5%
associate--l+36.5%
metadata-eval36.5%
+-rgt-identity36.5%
times-frac36.5%
Simplified36.5%
Taylor expanded in t around 0 60.7%
unpow260.7%
Simplified60.7%
Taylor expanded in k around inf 60.7%
associate-/l*60.7%
associate-*r*60.7%
associate-/l*61.1%
associate-/l*61.1%
unpow261.1%
associate-/l*76.1%
*-commutative76.1%
times-frac76.1%
Simplified82.0%
Taylor expanded in l around 0 60.7%
associate-/r*61.1%
unpow261.1%
unpow261.1%
times-frac96.9%
unpow296.9%
Simplified96.9%
unpow282.0%
sin-mult82.2%
Applied egg-rr96.7%
div-sub82.2%
+-inverses82.2%
cos-082.2%
metadata-eval82.2%
Simplified96.7%
Final simplification96.5%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (/ (* (/ l k) (/ l (* k t))) (/ (pow (sin k) 2.0) (cos k)))))
l = abs(l);
double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / (k * t))) / (pow(sin(k), 2.0) / cos(k)));
}
NOTE: l 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) * (l / (k * t))) / ((sin(k) ** 2.0d0) / cos(k)))
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / (k * t))) / (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
}
l = abs(l) def code(t, l, k): return 2.0 * (((l / k) * (l / (k * t))) / (math.pow(math.sin(k), 2.0) / math.cos(k)))
l = abs(l) function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) / Float64((sin(k) ^ 2.0) / cos(k)))) end
l = abs(l) function tmp = code(t, l, k) tmp = 2.0 * (((l / k) * (l / (k * t))) / ((sin(k) ^ 2.0) / cos(k))); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}}{\frac{{\sin k}^{2}}{\cos k}}
\end{array}
Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/34.7%
*-commutative34.7%
times-frac34.9%
+-commutative34.9%
associate--l+44.1%
metadata-eval44.1%
+-rgt-identity44.1%
times-frac47.3%
Simplified47.3%
Taylor expanded in t around 0 83.6%
unpow283.6%
Simplified83.6%
Taylor expanded in k around inf 79.6%
associate-/l*79.6%
associate-*r*77.3%
associate-/l*76.4%
associate-/l*76.5%
unpow276.5%
associate-/l*81.9%
*-commutative81.9%
times-frac83.1%
Simplified88.4%
associate-*r/88.7%
Applied egg-rr88.7%
*-un-lft-identity88.7%
associate-/l*88.7%
frac-times80.2%
*-commutative80.2%
associate-*r*82.9%
times-frac95.4%
Applied egg-rr95.4%
Final simplification95.4%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= l 1.45e+159)
(* (/ (/ 2.0 k) (* k t)) (* (/ l (sin k)) (/ l (tan k))))
(*
2.0
(* (/ (cos k) (- 0.5 (/ (cos (+ k k)) 2.0))) (* (/ l t) (/ l (* k k)))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (l <= 1.45e+159) {
tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)));
} else {
tmp = 2.0 * ((cos(k) / (0.5 - (cos((k + k)) / 2.0))) * ((l / t) * (l / (k * k))));
}
return tmp;
}
NOTE: l 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 (l <= 1.45d+159) then
tmp = ((2.0d0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)))
else
tmp = 2.0d0 * ((cos(k) / (0.5d0 - (cos((k + k)) / 2.0d0))) * ((l / t) * (l / (k * k))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.45e+159) {
tmp = ((2.0 / k) / (k * t)) * ((l / Math.sin(k)) * (l / Math.tan(k)));
} else {
tmp = 2.0 * ((Math.cos(k) / (0.5 - (Math.cos((k + k)) / 2.0))) * ((l / t) * (l / (k * k))));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if l <= 1.45e+159: tmp = ((2.0 / k) / (k * t)) * ((l / math.sin(k)) * (l / math.tan(k))) else: tmp = 2.0 * ((math.cos(k) / (0.5 - (math.cos((k + k)) / 2.0))) * ((l / t) * (l / (k * k)))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (l <= 1.45e+159) tmp = Float64(Float64(Float64(2.0 / k) / Float64(k * t)) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(0.5 - Float64(cos(Float64(k + k)) / 2.0))) * Float64(Float64(l / t) * Float64(l / Float64(k * k))))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.45e+159) tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k))); else tmp = 2.0 * ((cos(k) / (0.5 - (cos((k + k)) / 2.0))) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[l, 1.45e+159], N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(0.5 - N[(N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.45 \cdot 10^{+159}:\\
\;\;\;\;\frac{\frac{2}{k}}{k \cdot t} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{0.5 - \frac{\cos \left(k + k\right)}{2}} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if l < 1.45000000000000007e159Initial program 34.4%
associate-*l*34.4%
associate-*l*34.4%
associate-/r*34.4%
associate-/r/34.4%
*-commutative34.4%
times-frac34.7%
+-commutative34.7%
associate--l+45.2%
metadata-eval45.2%
+-rgt-identity45.2%
times-frac48.9%
Simplified48.9%
Taylor expanded in t around 0 87.0%
unpow287.0%
Simplified87.0%
Taylor expanded in k around 0 87.0%
unpow287.0%
associate-*r*90.4%
associate-/r*90.6%
Simplified90.6%
if 1.45000000000000007e159 < l Initial program 36.5%
associate-*l*36.5%
associate-*l*36.5%
associate-/r*36.5%
associate-/r/36.5%
*-commutative36.5%
times-frac36.5%
+-commutative36.5%
associate--l+36.5%
metadata-eval36.5%
+-rgt-identity36.5%
times-frac36.5%
Simplified36.5%
Taylor expanded in t around 0 60.7%
unpow260.7%
Simplified60.7%
Taylor expanded in k around inf 60.7%
associate-/l*60.7%
associate-*r*60.7%
associate-/l*61.1%
associate-/l*61.1%
unpow261.1%
associate-/l*76.1%
*-commutative76.1%
times-frac76.1%
Simplified82.0%
unpow282.0%
sin-mult82.2%
Applied egg-rr82.2%
div-sub82.2%
+-inverses82.2%
cos-082.2%
metadata-eval82.2%
Simplified82.2%
Final simplification89.5%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6.2e-9)
(*
2.0
(/
(fma (/ l k) (/ l (* k t)) (* 0.3333333333333333 (/ l (/ t l))))
(* k k)))
(if (<= k 1.5e+154)
(* (* (/ l (sin k)) (/ l (tan k))) (/ 2.0 (* t (* k k))))
(* (/ (pow (/ l k) 2.0) t) -0.3333333333333333))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.2e-9) {
tmp = 2.0 * (fma((l / k), (l / (k * t)), (0.3333333333333333 * (l / (t / l)))) / (k * k));
} else if (k <= 1.5e+154) {
tmp = ((l / sin(k)) * (l / tan(k))) * (2.0 / (t * (k * k)));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 6.2e-9) tmp = Float64(2.0 * Float64(fma(Float64(l / k), Float64(l / Float64(k * t)), Float64(0.3333333333333333 * Float64(l / Float64(t / l)))) / Float64(k * k))); elseif (k <= 1.5e+154) tmp = Float64(Float64(Float64(l / sin(k)) * Float64(l / tan(k))) * Float64(2.0 / Float64(t * Float64(k * k)))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.2e-9], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.5e+154], N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \frac{\mathsf{fma}\left(\frac{\ell}{k}, \frac{\ell}{k \cdot t}, 0.3333333333333333 \cdot \frac{\ell}{\frac{t}{\ell}}\right)}{k \cdot k}\\
\mathbf{elif}\;k \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;\left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{2}{t \cdot \left(k \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 6.2000000000000001e-9Initial program 32.8%
associate-*l*32.8%
associate-*l*32.8%
associate-/r*32.8%
associate-/r/32.8%
*-commutative32.8%
times-frac33.4%
+-commutative33.4%
associate--l+40.7%
metadata-eval40.7%
+-rgt-identity40.7%
times-frac45.1%
Simplified45.1%
Taylor expanded in t around 0 79.1%
unpow279.1%
times-frac79.5%
unpow279.5%
*-commutative79.5%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in k around 0 70.4%
unpow270.4%
Simplified70.4%
Taylor expanded in k around 0 73.8%
unpow273.8%
unpow273.8%
associate-*r*73.8%
unpow273.8%
Simplified73.8%
associate-*l/73.8%
*-un-lft-identity73.8%
times-frac81.2%
fma-def81.2%
associate-/l*83.6%
Applied egg-rr83.6%
if 6.2000000000000001e-9 < k < 1.50000000000000013e154Initial program 34.8%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/34.7%
*-commutative34.7%
times-frac33.4%
+-commutative33.4%
associate--l+53.2%
metadata-eval53.2%
+-rgt-identity53.2%
times-frac53.2%
Simplified53.2%
Taylor expanded in t around 0 86.0%
unpow286.0%
Simplified86.0%
if 1.50000000000000013e154 < k Initial program 44.4%
associate-*l*44.4%
associate-*l*44.4%
associate-/r*44.4%
associate-/r/44.4%
*-commutative44.4%
times-frac44.6%
+-commutative44.6%
associate--l+52.9%
metadata-eval52.9%
+-rgt-identity52.9%
times-frac52.9%
Simplified52.9%
Taylor expanded in t around 0 75.5%
unpow275.5%
Simplified75.5%
Taylor expanded in k around 0 75.5%
*-commutative75.5%
fma-def75.5%
unpow275.5%
unpow275.5%
unpow275.5%
times-frac75.5%
Simplified75.5%
Taylor expanded in k around inf 75.5%
associate-/r*75.5%
unpow275.5%
unpow275.5%
times-frac79.9%
unpow279.9%
Simplified79.9%
Final simplification83.4%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.6e+182) (* (/ l (/ (sin k) (/ l (tan k)))) (/ 2.0 (* k (* k t)))) (* (/ (pow (/ l k) 2.0) t) -0.3333333333333333)))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e+182) {
tmp = (l / (sin(k) / (l / tan(k)))) * (2.0 / (k * (k * t)));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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 <= 2.6d+182) then
tmp = (l / (sin(k) / (l / tan(k)))) * (2.0d0 / (k * (k * t)))
else
tmp = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e+182) {
tmp = (l / (Math.sin(k) / (l / Math.tan(k)))) * (2.0 / (k * (k * t)));
} else {
tmp = (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 2.6e+182: tmp = (l / (math.sin(k) / (l / math.tan(k)))) * (2.0 / (k * (k * t))) else: tmp = (math.pow((l / k), 2.0) / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 2.6e+182) tmp = Float64(Float64(l / Float64(sin(k) / Float64(l / tan(k)))) * Float64(2.0 / Float64(k * Float64(k * t)))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.6e+182) tmp = (l / (sin(k) / (l / tan(k)))) * (2.0 / (k * (k * t))); else tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.6e+182], N[(N[(l / N[(N[Sin[k], $MachinePrecision] / N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{+182}:\\
\;\;\;\;\frac{\ell}{\frac{\sin k}{\frac{\ell}{\tan k}}} \cdot \frac{2}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 2.6e182Initial program 32.7%
associate-*l*32.7%
associate-*l*32.7%
associate-/r*32.7%
associate-/r/32.7%
*-commutative32.7%
times-frac32.9%
+-commutative32.9%
associate--l+42.4%
metadata-eval42.4%
+-rgt-identity42.4%
times-frac46.1%
Simplified46.1%
Taylor expanded in t around 0 84.5%
unpow284.5%
Simplified84.5%
associate-*l/84.5%
associate-*l*87.9%
Applied egg-rr87.9%
associate-*l/87.8%
*-commutative87.8%
associate-*l/87.4%
associate-/l*87.9%
Simplified87.9%
if 2.6e182 < k Initial program 49.9%
associate-*l*49.9%
associate-*l*49.9%
associate-/r*49.9%
associate-/r/49.9%
*-commutative49.9%
times-frac50.1%
+-commutative50.1%
associate--l+56.8%
metadata-eval56.8%
+-rgt-identity56.8%
times-frac56.8%
Simplified56.8%
Taylor expanded in t around 0 77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in k around 0 77.1%
*-commutative77.1%
fma-def77.1%
unpow277.1%
unpow277.1%
unpow277.1%
times-frac77.1%
Simplified77.1%
Taylor expanded in k around inf 77.1%
associate-/r*77.1%
unpow277.1%
unpow277.1%
times-frac81.9%
unpow281.9%
Simplified81.9%
Final simplification87.2%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 2.7e+182) (* (/ (/ 2.0 k) (* k t)) (* (/ l (sin k)) (/ l (tan k)))) (* (/ (pow (/ l k) 2.0) t) -0.3333333333333333)))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e+182) {
tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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 <= 2.7d+182) then
tmp = ((2.0d0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k)))
else
tmp = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e+182) {
tmp = ((2.0 / k) / (k * t)) * ((l / Math.sin(k)) * (l / Math.tan(k)));
} else {
tmp = (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 2.7e+182: tmp = ((2.0 / k) / (k * t)) * ((l / math.sin(k)) * (l / math.tan(k))) else: tmp = (math.pow((l / k), 2.0) / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 2.7e+182) tmp = Float64(Float64(Float64(2.0 / k) / Float64(k * t)) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.7e+182) tmp = ((2.0 / k) / (k * t)) * ((l / sin(k)) * (l / tan(k))); else tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.7e+182], N[(N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{+182}:\\
\;\;\;\;\frac{\frac{2}{k}}{k \cdot t} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 2.7000000000000003e182Initial program 32.7%
associate-*l*32.7%
associate-*l*32.7%
associate-/r*32.7%
associate-/r/32.7%
*-commutative32.7%
times-frac32.9%
+-commutative32.9%
associate--l+42.4%
metadata-eval42.4%
+-rgt-identity42.4%
times-frac46.1%
Simplified46.1%
Taylor expanded in t around 0 84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in k around 0 84.5%
unpow284.5%
associate-*r*87.8%
associate-/r*88.1%
Simplified88.1%
if 2.7000000000000003e182 < k Initial program 49.9%
associate-*l*49.9%
associate-*l*49.9%
associate-/r*49.9%
associate-/r/49.9%
*-commutative49.9%
times-frac50.1%
+-commutative50.1%
associate--l+56.8%
metadata-eval56.8%
+-rgt-identity56.8%
times-frac56.8%
Simplified56.8%
Taylor expanded in t around 0 77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in k around 0 77.1%
*-commutative77.1%
fma-def77.1%
unpow277.1%
unpow277.1%
unpow277.1%
times-frac77.1%
Simplified77.1%
Taylor expanded in k around inf 77.1%
associate-/r*77.1%
unpow277.1%
unpow277.1%
times-frac81.9%
unpow281.9%
Simplified81.9%
Final simplification87.3%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6.2e-9)
(*
2.0
(/
(fma (/ l k) (/ l (* k t)) (* 0.3333333333333333 (/ l (/ t l))))
(* k k)))
(/
(* 2.0 (+ -0.16666666666666666 (/ 1.0 (* k k))))
(/ t (pow (/ l k) 2.0)))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.2e-9) {
tmp = 2.0 * (fma((l / k), (l / (k * t)), (0.3333333333333333 * (l / (t / l)))) / (k * k));
} else {
tmp = (2.0 * (-0.16666666666666666 + (1.0 / (k * k)))) / (t / pow((l / k), 2.0));
}
return tmp;
}
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 6.2e-9) tmp = Float64(2.0 * Float64(fma(Float64(l / k), Float64(l / Float64(k * t)), Float64(0.3333333333333333 * Float64(l / Float64(t / l)))) / Float64(k * k))); else tmp = Float64(Float64(2.0 * Float64(-0.16666666666666666 + Float64(1.0 / Float64(k * k)))) / Float64(t / (Float64(l / k) ^ 2.0))); end return tmp end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.2e-9], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(-0.16666666666666666 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \frac{\mathsf{fma}\left(\frac{\ell}{k}, \frac{\ell}{k \cdot t}, 0.3333333333333333 \cdot \frac{\ell}{\frac{t}{\ell}}\right)}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(-0.16666666666666666 + \frac{1}{k \cdot k}\right)}{\frac{t}{{\left(\frac{\ell}{k}\right)}^{2}}}\\
\end{array}
\end{array}
if k < 6.2000000000000001e-9Initial program 32.8%
associate-*l*32.8%
associate-*l*32.8%
associate-/r*32.8%
associate-/r/32.8%
*-commutative32.8%
times-frac33.4%
+-commutative33.4%
associate--l+40.7%
metadata-eval40.7%
+-rgt-identity40.7%
times-frac45.1%
Simplified45.1%
Taylor expanded in t around 0 79.1%
unpow279.1%
times-frac79.5%
unpow279.5%
*-commutative79.5%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in k around 0 70.4%
unpow270.4%
Simplified70.4%
Taylor expanded in k around 0 73.8%
unpow273.8%
unpow273.8%
associate-*r*73.8%
unpow273.8%
Simplified73.8%
associate-*l/73.8%
*-un-lft-identity73.8%
times-frac81.2%
fma-def81.2%
associate-/l*83.6%
Applied egg-rr83.6%
if 6.2000000000000001e-9 < k Initial program 39.6%
associate-*l*39.6%
associate-*l*39.6%
associate-/r*39.6%
associate-/r/39.6%
*-commutative39.6%
times-frac39.1%
+-commutative39.1%
associate--l+53.1%
metadata-eval53.1%
+-rgt-identity53.1%
times-frac53.1%
Simplified53.1%
Taylor expanded in t around 0 80.7%
unpow280.7%
Simplified80.7%
Taylor expanded in k around 0 65.0%
*-commutative65.0%
fma-def65.0%
unpow265.0%
unpow265.0%
unpow265.0%
times-frac70.6%
Simplified70.6%
Taylor expanded in l around 0 72.0%
associate-/l*72.0%
associate-*r/72.0%
sub-neg72.0%
unpow272.0%
associate-/l/72.0%
metadata-eval72.0%
+-commutative72.0%
associate-/l/72.0%
*-commutative72.0%
associate-/l*72.1%
unpow272.1%
unpow272.1%
times-frac74.3%
unpow274.3%
Simplified74.3%
Final simplification81.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 1.75e-94)
(* (/ 2.0 (* k (* k t))) (* (/ l k) (/ l k)))
(if (<= k 4.6e+90)
(* 2.0 (* (* (/ l t) (/ l (* k k))) (/ (cos k) (* k k))))
(* (/ (pow (/ l k) 2.0) t) -0.3333333333333333))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 1.75e-94) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else if (k <= 4.6e+90) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / (k * k)));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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-94) then
tmp = (2.0d0 / (k * (k * t))) * ((l / k) * (l / k))
else if (k <= 4.6d+90) then
tmp = 2.0d0 * (((l / t) * (l / (k * k))) * (cos(k) / (k * k)))
else
tmp = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.75e-94) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else if (k <= 4.6e+90) {
tmp = 2.0 * (((l / t) * (l / (k * k))) * (Math.cos(k) / (k * k)));
} else {
tmp = (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 1.75e-94: tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)) elif k <= 4.6e+90: tmp = 2.0 * (((l / t) * (l / (k * k))) * (math.cos(k) / (k * k))) else: tmp = (math.pow((l / k), 2.0) / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 1.75e-94) tmp = Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / k) * Float64(l / k))); elseif (k <= 4.6e+90) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(cos(k) / Float64(k * k)))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.75e-94) tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)); elseif (k <= 4.6e+90) tmp = 2.0 * (((l / t) * (l / (k * k))) * (cos(k) / (k * k))); else tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 1.75e-94], N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.6e+90], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.75 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+90}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{k \cdot k}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 1.74999999999999999e-94Initial program 35.0%
associate-*l*35.0%
associate-*l*35.0%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac35.6%
+-commutative35.6%
associate--l+42.1%
metadata-eval42.1%
+-rgt-identity42.1%
times-frac47.2%
Simplified47.2%
Taylor expanded in t around 0 83.8%
unpow283.8%
Simplified83.8%
Taylor expanded in k around 0 70.7%
unpow270.7%
unpow270.7%
times-frac78.9%
Simplified78.9%
Taylor expanded in k around 0 78.9%
unpow278.9%
associate-*r*80.0%
Simplified80.0%
if 1.74999999999999999e-94 < k < 4.6e90Initial program 24.2%
associate-*l*24.2%
associate-*l*24.2%
associate-/r*24.2%
associate-/r/24.2%
*-commutative24.2%
times-frac24.2%
+-commutative24.2%
associate--l+45.8%
metadata-eval45.8%
+-rgt-identity45.8%
times-frac45.8%
Simplified45.8%
Taylor expanded in t around 0 93.3%
unpow293.3%
times-frac93.6%
unpow293.6%
*-commutative93.6%
associate-/r*91.4%
Simplified91.4%
Taylor expanded in k around 0 88.0%
unpow288.0%
*-commutative88.0%
times-frac90.1%
unpow290.1%
Simplified90.1%
if 4.6e90 < k Initial program 44.0%
associate-*l*44.0%
associate-*l*44.0%
associate-/r*44.0%
associate-/r/44.0%
*-commutative44.0%
times-frac43.1%
+-commutative43.1%
associate--l+49.3%
metadata-eval49.3%
+-rgt-identity49.3%
times-frac49.3%
Simplified49.3%
Taylor expanded in t around 0 73.5%
unpow273.5%
Simplified73.5%
Taylor expanded in k around 0 65.8%
*-commutative65.8%
fma-def65.8%
unpow265.8%
unpow265.8%
unpow265.8%
times-frac70.0%
Simplified70.0%
Taylor expanded in k around inf 70.0%
associate-/r*70.1%
unpow270.1%
unpow270.1%
times-frac73.5%
unpow273.5%
Simplified73.5%
Final simplification80.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 2.7e-94)
(* (/ 2.0 (* k (* k t))) (* (/ l k) (/ l k)))
(if (<= k 4.6e+90)
(* 2.0 (/ (* (cos k) (* (/ l t) (/ l (* k k)))) (* k k)))
(* (/ (pow (/ l k) 2.0) t) -0.3333333333333333))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-94) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else if (k <= 4.6e+90) {
tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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 <= 2.7d-94) then
tmp = (2.0d0 / (k * (k * t))) * ((l / k) * (l / k))
else if (k <= 4.6d+90) then
tmp = 2.0d0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k))
else
tmp = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-94) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else if (k <= 4.6e+90) {
tmp = 2.0 * ((Math.cos(k) * ((l / t) * (l / (k * k)))) / (k * k));
} else {
tmp = (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 2.7e-94: tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)) elif k <= 4.6e+90: tmp = 2.0 * ((math.cos(k) * ((l / t) * (l / (k * k)))) / (k * k)) else: tmp = (math.pow((l / k), 2.0) / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 2.7e-94) tmp = Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / k) * Float64(l / k))); elseif (k <= 4.6e+90) tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / t) * Float64(l / Float64(k * k)))) / Float64(k * k))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.7e-94) tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)); elseif (k <= 4.6e+90) tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k)); else tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.7e-94], N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.6e+90], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-94}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+90}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 2.7000000000000001e-94Initial program 35.0%
associate-*l*35.0%
associate-*l*35.0%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac35.6%
+-commutative35.6%
associate--l+42.1%
metadata-eval42.1%
+-rgt-identity42.1%
times-frac47.2%
Simplified47.2%
Taylor expanded in t around 0 83.8%
unpow283.8%
Simplified83.8%
Taylor expanded in k around 0 70.7%
unpow270.7%
unpow270.7%
times-frac78.9%
Simplified78.9%
Taylor expanded in k around 0 78.9%
unpow278.9%
associate-*r*80.0%
Simplified80.0%
if 2.7000000000000001e-94 < k < 4.6e90Initial program 24.2%
associate-*l*24.2%
associate-*l*24.2%
associate-/r*24.2%
associate-/r/24.2%
*-commutative24.2%
times-frac24.2%
+-commutative24.2%
associate--l+45.8%
metadata-eval45.8%
+-rgt-identity45.8%
times-frac45.8%
Simplified45.8%
Taylor expanded in t around 0 93.5%
unpow293.5%
Simplified93.5%
Taylor expanded in k around inf 93.3%
associate-/l*93.3%
associate-*r*91.0%
associate-/l*89.1%
associate-/l*89.1%
unpow289.1%
associate-/l*91.2%
*-commutative91.2%
times-frac93.6%
Simplified97.6%
associate-*r/97.6%
Applied egg-rr97.6%
Taylor expanded in k around 0 90.1%
unpow290.1%
Simplified90.1%
if 4.6e90 < k Initial program 44.0%
associate-*l*44.0%
associate-*l*44.0%
associate-/r*44.0%
associate-/r/44.0%
*-commutative44.0%
times-frac43.1%
+-commutative43.1%
associate--l+49.3%
metadata-eval49.3%
+-rgt-identity49.3%
times-frac49.3%
Simplified49.3%
Taylor expanded in t around 0 73.5%
unpow273.5%
Simplified73.5%
Taylor expanded in k around 0 65.8%
*-commutative65.8%
fma-def65.8%
unpow265.8%
unpow265.8%
unpow265.8%
times-frac70.0%
Simplified70.0%
Taylor expanded in k around inf 70.0%
associate-/r*70.1%
unpow270.1%
unpow270.1%
times-frac73.5%
unpow273.5%
Simplified73.5%
Final simplification80.6%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ l k) 2.0)))
(if (<= k 1.85e-94)
(* 2.0 (/ (- t_1 (* l (* l -0.3333333333333333))) (* k (* k t))))
(if (<= k 4.6e+90)
(* 2.0 (/ (* (cos k) (* (/ l t) (/ l (* k k)))) (* k k)))
(* (/ t_1 t) -0.3333333333333333)))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = pow((l / k), 2.0);
double tmp;
if (k <= 1.85e-94) {
tmp = 2.0 * ((t_1 - (l * (l * -0.3333333333333333))) / (k * (k * t)));
} else if (k <= 4.6e+90) {
tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k));
} else {
tmp = (t_1 / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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) :: t_1
real(8) :: tmp
t_1 = (l / k) ** 2.0d0
if (k <= 1.85d-94) then
tmp = 2.0d0 * ((t_1 - (l * (l * (-0.3333333333333333d0)))) / (k * (k * t)))
else if (k <= 4.6d+90) then
tmp = 2.0d0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k))
else
tmp = (t_1 / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = Math.pow((l / k), 2.0);
double tmp;
if (k <= 1.85e-94) {
tmp = 2.0 * ((t_1 - (l * (l * -0.3333333333333333))) / (k * (k * t)));
} else if (k <= 4.6e+90) {
tmp = 2.0 * ((Math.cos(k) * ((l / t) * (l / (k * k)))) / (k * k));
} else {
tmp = (t_1 / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = math.pow((l / k), 2.0) tmp = 0 if k <= 1.85e-94: tmp = 2.0 * ((t_1 - (l * (l * -0.3333333333333333))) / (k * (k * t))) elif k <= 4.6e+90: tmp = 2.0 * ((math.cos(k) * ((l / t) * (l / (k * k)))) / (k * k)) else: tmp = (t_1 / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(l / k) ^ 2.0 tmp = 0.0 if (k <= 1.85e-94) tmp = Float64(2.0 * Float64(Float64(t_1 - Float64(l * Float64(l * -0.3333333333333333))) / Float64(k * Float64(k * t)))); elseif (k <= 4.6e+90) tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / t) * Float64(l / Float64(k * k)))) / Float64(k * k))); else tmp = Float64(Float64(t_1 / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = (l / k) ^ 2.0; tmp = 0.0; if (k <= 1.85e-94) tmp = 2.0 * ((t_1 - (l * (l * -0.3333333333333333))) / (k * (k * t))); elseif (k <= 4.6e+90) tmp = 2.0 * ((cos(k) * ((l / t) * (l / (k * k)))) / (k * k)); else tmp = (t_1 / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 1.85e-94], N[(2.0 * N[(N[(t$95$1 - N[(l * N[(l * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.6e+90], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{k}\right)}^{2}\\
\mathbf{if}\;k \leq 1.85 \cdot 10^{-94}:\\
\;\;\;\;2 \cdot \frac{t_1 - \ell \cdot \left(\ell \cdot -0.3333333333333333\right)}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+90}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 1.8499999999999999e-94Initial program 35.0%
associate-*l*35.0%
associate-*l*35.0%
associate-/r*35.0%
associate-/r/35.0%
*-commutative35.0%
times-frac35.6%
+-commutative35.6%
associate--l+42.1%
metadata-eval42.1%
+-rgt-identity42.1%
times-frac47.2%
Simplified47.2%
Taylor expanded in t around 0 77.4%
unpow277.4%
times-frac77.8%
unpow277.8%
*-commutative77.8%
associate-/r*74.4%
Simplified74.4%
Taylor expanded in k around 0 68.0%
unpow268.0%
Simplified68.0%
Taylor expanded in k around 0 71.2%
unpow271.2%
unpow271.2%
associate-*r*71.3%
unpow271.3%
Simplified71.3%
Taylor expanded in t around -inf 71.0%
associate-*r/71.0%
mul-1-neg71.0%
unpow271.0%
unpow271.0%
times-frac76.7%
unpow276.7%
neg-mul-176.7%
unsub-neg76.7%
*-commutative76.7%
unpow276.7%
associate-*l*76.7%
unpow276.7%
associate-*r*78.0%
Simplified78.0%
if 1.8499999999999999e-94 < k < 4.6e90Initial program 24.2%
associate-*l*24.2%
associate-*l*24.2%
associate-/r*24.2%
associate-/r/24.2%
*-commutative24.2%
times-frac24.2%
+-commutative24.2%
associate--l+45.8%
metadata-eval45.8%
+-rgt-identity45.8%
times-frac45.8%
Simplified45.8%
Taylor expanded in t around 0 93.5%
unpow293.5%
Simplified93.5%
Taylor expanded in k around inf 93.3%
associate-/l*93.3%
associate-*r*91.0%
associate-/l*89.1%
associate-/l*89.1%
unpow289.1%
associate-/l*91.2%
*-commutative91.2%
times-frac93.6%
Simplified97.6%
associate-*r/97.6%
Applied egg-rr97.6%
Taylor expanded in k around 0 90.1%
unpow290.1%
Simplified90.1%
if 4.6e90 < k Initial program 44.0%
associate-*l*44.0%
associate-*l*44.0%
associate-/r*44.0%
associate-/r/44.0%
*-commutative44.0%
times-frac43.1%
+-commutative43.1%
associate--l+49.3%
metadata-eval49.3%
+-rgt-identity49.3%
times-frac49.3%
Simplified49.3%
Taylor expanded in t around 0 73.5%
unpow273.5%
Simplified73.5%
Taylor expanded in k around 0 65.8%
*-commutative65.8%
fma-def65.8%
unpow265.8%
unpow265.8%
unpow265.8%
times-frac70.0%
Simplified70.0%
Taylor expanded in k around inf 70.0%
associate-/r*70.1%
unpow270.1%
unpow270.1%
times-frac73.5%
unpow273.5%
Simplified73.5%
Final simplification79.4%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 1.0 (* k k))))
(if (<= k 4.2e-10)
(*
2.0
(*
t_1
(+ (* (/ l k) (/ l (* k t))) (* 0.3333333333333333 (/ (* l l) t)))))
(/ (* 2.0 (+ -0.16666666666666666 t_1)) (/ t (pow (/ l k) 2.0))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = 1.0 / (k * k);
double tmp;
if (k <= 4.2e-10) {
tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = (2.0 * (-0.16666666666666666 + t_1)) / (t / pow((l / k), 2.0));
}
return tmp;
}
NOTE: l 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (k * k)
if (k <= 4.2d-10) then
tmp = 2.0d0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333d0 * ((l * l) / t))))
else
tmp = (2.0d0 * ((-0.16666666666666666d0) + t_1)) / (t / ((l / k) ** 2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = 1.0 / (k * k);
double tmp;
if (k <= 4.2e-10) {
tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = (2.0 * (-0.16666666666666666 + t_1)) / (t / Math.pow((l / k), 2.0));
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = 1.0 / (k * k) tmp = 0 if k <= 4.2e-10: tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))) else: tmp = (2.0 * (-0.16666666666666666 + t_1)) / (t / math.pow((l / k), 2.0)) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(1.0 / Float64(k * k)) tmp = 0.0 if (k <= 4.2e-10) tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) + Float64(0.3333333333333333 * Float64(Float64(l * l) / t))))); else tmp = Float64(Float64(2.0 * Float64(-0.16666666666666666 + t_1)) / Float64(t / (Float64(l / k) ^ 2.0))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = 1.0 / (k * k); tmp = 0.0; if (k <= 4.2e-10) tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))); else tmp = (2.0 * (-0.16666666666666666 + t_1)) / (t / ((l / k) ^ 2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 4.2e-10], N[(2.0 * N[(t$95$1 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(-0.16666666666666666 + t$95$1), $MachinePrecision]), $MachinePrecision] / N[(t / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{1}{k \cdot k}\\
\mathbf{if}\;k \leq 4.2 \cdot 10^{-10}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t} + 0.3333333333333333 \cdot \frac{\ell \cdot \ell}{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(-0.16666666666666666 + t_1\right)}{\frac{t}{{\left(\frac{\ell}{k}\right)}^{2}}}\\
\end{array}
\end{array}
if k < 4.2e-10Initial program 32.8%
associate-*l*32.8%
associate-*l*32.8%
associate-/r*32.8%
associate-/r/32.8%
*-commutative32.8%
times-frac33.4%
+-commutative33.4%
associate--l+40.7%
metadata-eval40.7%
+-rgt-identity40.7%
times-frac45.1%
Simplified45.1%
Taylor expanded in t around 0 79.1%
unpow279.1%
times-frac79.5%
unpow279.5%
*-commutative79.5%
associate-/r*76.0%
Simplified76.0%
Taylor expanded in k around 0 70.4%
unpow270.4%
Simplified70.4%
Taylor expanded in k around 0 73.8%
unpow273.8%
unpow273.8%
associate-*r*73.8%
unpow273.8%
Simplified73.8%
times-frac80.8%
Applied egg-rr80.8%
if 4.2e-10 < k Initial program 39.6%
associate-*l*39.6%
associate-*l*39.6%
associate-/r*39.6%
associate-/r/39.6%
*-commutative39.6%
times-frac39.1%
+-commutative39.1%
associate--l+53.1%
metadata-eval53.1%
+-rgt-identity53.1%
times-frac53.1%
Simplified53.1%
Taylor expanded in t around 0 80.7%
unpow280.7%
Simplified80.7%
Taylor expanded in k around 0 65.0%
*-commutative65.0%
fma-def65.0%
unpow265.0%
unpow265.0%
unpow265.0%
times-frac70.6%
Simplified70.6%
Taylor expanded in l around 0 72.0%
associate-/l*72.0%
associate-*r/72.0%
sub-neg72.0%
unpow272.0%
associate-/l/72.0%
metadata-eval72.0%
+-commutative72.0%
associate-/l/72.0%
*-commutative72.0%
associate-/l*72.1%
unpow272.1%
unpow272.1%
times-frac74.3%
unpow274.3%
Simplified74.3%
Final simplification79.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 6.8e+20)
(*
2.0
(*
(/ 1.0 (* k k))
(+ (* (/ l k) (/ l (* k t))) (* 0.3333333333333333 (/ (* l l) t)))))
(* (/ (pow (/ l k) 2.0) t) -0.3333333333333333)))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e+20) {
tmp = 2.0 * ((1.0 / (k * k)) * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
NOTE: l 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.8d+20) then
tmp = 2.0d0 * ((1.0d0 / (k * k)) * (((l / k) * (l / (k * t))) + (0.3333333333333333d0 * ((l * l) / t))))
else
tmp = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e+20) {
tmp = 2.0 * ((1.0 / (k * k)) * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 6.8e+20: tmp = 2.0 * ((1.0 / (k * k)) * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))) else: tmp = (math.pow((l / k), 2.0) / t) * -0.3333333333333333 return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 6.8e+20) tmp = Float64(2.0 * Float64(Float64(1.0 / Float64(k * k)) * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) + Float64(0.3333333333333333 * Float64(Float64(l * l) / t))))); else tmp = Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.8e+20) tmp = 2.0 * ((1.0 / (k * k)) * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))); else tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.8e+20], N[(2.0 * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(\frac{1}{k \cdot k} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t} + 0.3333333333333333 \cdot \frac{\ell \cdot \ell}{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 6.8e20Initial program 33.4%
associate-*l*33.4%
associate-*l*33.4%
associate-/r*33.4%
associate-/r/33.4%
*-commutative33.4%
times-frac33.9%
+-commutative33.9%
associate--l+41.6%
metadata-eval41.6%
+-rgt-identity41.6%
times-frac46.0%
Simplified46.0%
Taylor expanded in t around 0 79.5%
unpow279.5%
times-frac79.8%
unpow279.8%
*-commutative79.8%
associate-/r*76.4%
Simplified76.4%
Taylor expanded in k around 0 70.5%
unpow270.5%
Simplified70.5%
Taylor expanded in k around 0 73.8%
unpow273.8%
unpow273.8%
associate-*r*73.8%
unpow273.8%
Simplified73.8%
times-frac80.7%
Applied egg-rr80.7%
if 6.8e20 < k Initial program 38.4%
associate-*l*38.4%
associate-*l*38.4%
associate-/r*38.4%
associate-/r/38.4%
*-commutative38.4%
times-frac37.8%
+-commutative37.8%
associate--l+51.0%
metadata-eval51.0%
+-rgt-identity51.0%
times-frac51.0%
Simplified51.0%
Taylor expanded in t around 0 79.8%
unpow279.8%
Simplified79.8%
Taylor expanded in k around 0 65.8%
*-commutative65.8%
fma-def65.8%
unpow265.8%
unpow265.8%
unpow265.8%
times-frac71.7%
Simplified71.7%
Taylor expanded in k around inf 71.7%
associate-/r*71.7%
unpow271.7%
unpow271.7%
times-frac74.1%
unpow274.1%
Simplified74.1%
Final simplification79.0%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ 1.0 (* k k))))
(if (<= k 3.5e-15)
(*
2.0
(*
t_1
(+ (* (/ l k) (/ l (* k t))) (* 0.3333333333333333 (/ (* l l) t)))))
(* 2.0 (* (/ (+ -0.16666666666666666 t_1) (* k k)) (* l (/ l t)))))))l = abs(l);
double code(double t, double l, double k) {
double t_1 = 1.0 / (k * k);
double tmp;
if (k <= 3.5e-15) {
tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = 2.0 * (((-0.16666666666666666 + t_1) / (k * k)) * (l * (l / t)));
}
return tmp;
}
NOTE: l 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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 / (k * k)
if (k <= 3.5d-15) then
tmp = 2.0d0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333d0 * ((l * l) / t))))
else
tmp = 2.0d0 * ((((-0.16666666666666666d0) + t_1) / (k * k)) * (l * (l / t)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double t_1 = 1.0 / (k * k);
double tmp;
if (k <= 3.5e-15) {
tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t))));
} else {
tmp = 2.0 * (((-0.16666666666666666 + t_1) / (k * k)) * (l * (l / t)));
}
return tmp;
}
l = abs(l) def code(t, l, k): t_1 = 1.0 / (k * k) tmp = 0 if k <= 3.5e-15: tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))) else: tmp = 2.0 * (((-0.16666666666666666 + t_1) / (k * k)) * (l * (l / t))) return tmp
l = abs(l) function code(t, l, k) t_1 = Float64(1.0 / Float64(k * k)) tmp = 0.0 if (k <= 3.5e-15) tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) + Float64(0.3333333333333333 * Float64(Float64(l * l) / t))))); else tmp = Float64(2.0 * Float64(Float64(Float64(-0.16666666666666666 + t_1) / Float64(k * k)) * Float64(l * Float64(l / t)))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) t_1 = 1.0 / (k * k); tmp = 0.0; if (k <= 3.5e-15) tmp = 2.0 * (t_1 * (((l / k) * (l / (k * t))) + (0.3333333333333333 * ((l * l) / t)))); else tmp = 2.0 * (((-0.16666666666666666 + t_1) / (k * k)) * (l * (l / t))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3.5e-15], N[(2.0 * N[(t$95$1 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 * N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(-0.16666666666666666 + t$95$1), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{1}{k \cdot k}\\
\mathbf{if}\;k \leq 3.5 \cdot 10^{-15}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t} + 0.3333333333333333 \cdot \frac{\ell \cdot \ell}{t}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{-0.16666666666666666 + t_1}{k \cdot k} \cdot \left(\ell \cdot \frac{\ell}{t}\right)\right)\\
\end{array}
\end{array}
if k < 3.5000000000000001e-15Initial program 33.0%
associate-*l*33.0%
associate-*l*33.0%
associate-/r*33.0%
associate-/r/33.0%
*-commutative33.0%
times-frac33.5%
+-commutative33.5%
associate--l+40.9%
metadata-eval40.9%
+-rgt-identity40.9%
times-frac45.4%
Simplified45.4%
Taylor expanded in t around 0 79.0%
unpow279.0%
times-frac79.4%
unpow279.4%
*-commutative79.4%
associate-/r*75.9%
Simplified75.9%
Taylor expanded in k around 0 70.2%
unpow270.2%
Simplified70.2%
Taylor expanded in k around 0 73.6%
unpow273.6%
unpow273.6%
associate-*r*73.6%
unpow273.6%
Simplified73.6%
times-frac80.7%
Applied egg-rr80.7%
if 3.5000000000000001e-15 < k Initial program 39.1%
associate-*l*39.1%
associate-*l*39.1%
associate-/r*39.1%
associate-/r/39.1%
*-commutative39.1%
times-frac38.5%
+-commutative38.5%
associate--l+52.3%
metadata-eval52.3%
+-rgt-identity52.3%
times-frac52.3%
Simplified52.3%
Taylor expanded in t around 0 81.0%
unpow281.0%
Simplified81.0%
Taylor expanded in k around 0 65.5%
*-commutative65.5%
fma-def65.5%
unpow265.5%
unpow265.5%
unpow265.5%
times-frac71.0%
Simplified71.0%
Taylor expanded in l around 0 72.4%
times-frac72.4%
sub-neg72.4%
unpow272.4%
metadata-eval72.4%
unpow272.4%
unpow272.4%
associate-*r/72.5%
Simplified72.5%
Final simplification78.4%
NOTE: l should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 5e-51)
(* (/ 2.0 (* k (* k t))) (* (/ l k) (/ l k)))
(*
2.0
(* (/ (+ -0.16666666666666666 (/ 1.0 (* k k))) (* k k)) (* l (/ l t))))))l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-51) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else {
tmp = 2.0 * (((-0.16666666666666666 + (1.0 / (k * k))) / (k * k)) * (l * (l / t)));
}
return tmp;
}
NOTE: l 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 <= 5d-51) then
tmp = (2.0d0 / (k * (k * t))) * ((l / k) * (l / k))
else
tmp = 2.0d0 * ((((-0.16666666666666666d0) + (1.0d0 / (k * k))) / (k * k)) * (l * (l / t)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e-51) {
tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k));
} else {
tmp = 2.0 * (((-0.16666666666666666 + (1.0 / (k * k))) / (k * k)) * (l * (l / t)));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 5e-51: tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)) else: tmp = 2.0 * (((-0.16666666666666666 + (1.0 / (k * k))) / (k * k)) * (l * (l / t))) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 5e-51) tmp = Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / k) * Float64(l / k))); else tmp = Float64(2.0 * Float64(Float64(Float64(-0.16666666666666666 + Float64(1.0 / Float64(k * k))) / Float64(k * k)) * Float64(l * Float64(l / t)))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-51) tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)); else tmp = 2.0 * (((-0.16666666666666666 + (1.0 / (k * k))) / (k * k)) * (l * (l / t))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 5e-51], N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(-0.16666666666666666 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-51}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{-0.16666666666666666 + \frac{1}{k \cdot k}}{k \cdot k} \cdot \left(\ell \cdot \frac{\ell}{t}\right)\right)\\
\end{array}
\end{array}
if k < 5.00000000000000004e-51Initial program 33.7%
associate-*l*33.7%
associate-*l*33.8%
associate-/r*33.7%
associate-/r/33.7%
*-commutative33.7%
times-frac34.3%
+-commutative34.3%
associate--l+41.7%
metadata-eval41.7%
+-rgt-identity41.7%
times-frac46.4%
Simplified46.4%
Taylor expanded in t around 0 84.1%
unpow284.1%
Simplified84.1%
Taylor expanded in k around 0 71.7%
unpow271.7%
unpow271.7%
times-frac79.5%
Simplified79.5%
Taylor expanded in k around 0 79.5%
unpow279.5%
associate-*r*80.5%
Simplified80.5%
if 5.00000000000000004e-51 < k Initial program 36.6%
associate-*l*36.6%
associate-*l*36.6%
associate-/r*36.6%
associate-/r/36.6%
*-commutative36.6%
times-frac36.1%
+-commutative36.1%
associate--l+49.1%
metadata-eval49.1%
+-rgt-identity49.1%
times-frac49.1%
Simplified49.1%
Taylor expanded in t around 0 82.7%
unpow282.7%
Simplified82.7%
Taylor expanded in k around 0 61.4%
*-commutative61.4%
fma-def61.4%
unpow261.4%
unpow261.4%
unpow261.4%
times-frac66.0%
Simplified66.0%
Taylor expanded in l around 0 75.5%
times-frac75.5%
sub-neg75.5%
unpow275.5%
metadata-eval75.5%
unpow275.5%
unpow275.5%
associate-*r/75.6%
Simplified75.6%
Final simplification78.9%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 6.8e+20) (* 2.0 (* 0.3333333333333333 (/ (* l l) (* k (* k t))))) (* (/ -0.3333333333333333 k) (/ (* l l) (* k t)))))
l = abs(l);
double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e+20) {
tmp = 2.0 * (0.3333333333333333 * ((l * l) / (k * (k * t))));
} else {
tmp = (-0.3333333333333333 / k) * ((l * l) / (k * t));
}
return tmp;
}
NOTE: l 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.8d+20) then
tmp = 2.0d0 * (0.3333333333333333d0 * ((l * l) / (k * (k * t))))
else
tmp = ((-0.3333333333333333d0) / k) * ((l * l) / (k * t))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 6.8e+20) {
tmp = 2.0 * (0.3333333333333333 * ((l * l) / (k * (k * t))));
} else {
tmp = (-0.3333333333333333 / k) * ((l * l) / (k * t));
}
return tmp;
}
l = abs(l) def code(t, l, k): tmp = 0 if k <= 6.8e+20: tmp = 2.0 * (0.3333333333333333 * ((l * l) / (k * (k * t)))) else: tmp = (-0.3333333333333333 / k) * ((l * l) / (k * t)) return tmp
l = abs(l) function code(t, l, k) tmp = 0.0 if (k <= 6.8e+20) tmp = Float64(2.0 * Float64(0.3333333333333333 * Float64(Float64(l * l) / Float64(k * Float64(k * t))))); else tmp = Float64(Float64(-0.3333333333333333 / k) * Float64(Float64(l * l) / Float64(k * t))); end return tmp end
l = abs(l) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 6.8e+20) tmp = 2.0 * (0.3333333333333333 * ((l * l) / (k * (k * t)))); else tmp = (-0.3333333333333333 / k) * ((l * l) / (k * t)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 6.8e+20], N[(2.0 * N[(0.3333333333333333 * N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.3333333333333333 / k), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.8 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(0.3333333333333333 \cdot \frac{\ell \cdot \ell}{k \cdot \left(k \cdot t\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{k} \cdot \frac{\ell \cdot \ell}{k \cdot t}\\
\end{array}
\end{array}
if k < 6.8e20Initial program 33.4%
associate-*l*33.4%
associate-*l*33.4%
associate-/r*33.4%
associate-/r/33.4%
*-commutative33.4%
times-frac33.9%
+-commutative33.9%
associate--l+41.6%
metadata-eval41.6%
+-rgt-identity41.6%
times-frac46.0%
Simplified46.0%
Taylor expanded in t around 0 79.5%
unpow279.5%
times-frac79.8%
unpow279.8%
*-commutative79.8%
associate-/r*76.4%
Simplified76.4%
Taylor expanded in k around 0 70.5%
unpow270.5%
Simplified70.5%
Taylor expanded in k around 0 73.8%
unpow273.8%
unpow273.8%
associate-*r*73.8%
unpow273.8%
Simplified73.8%
Taylor expanded in k around inf 62.0%
*-commutative62.0%
unpow262.0%
unpow262.0%
associate-*r*59.6%
Simplified59.6%
if 6.8e20 < k Initial program 38.4%
associate-*l*38.4%
associate-*l*38.4%
associate-/r*38.4%
associate-/r/38.4%
*-commutative38.4%
times-frac37.8%
+-commutative37.8%
associate--l+51.0%
metadata-eval51.0%
+-rgt-identity51.0%
times-frac51.0%
Simplified51.0%
Taylor expanded in t around 0 79.8%
unpow279.8%
Simplified79.8%
Taylor expanded in k around 0 65.8%
*-commutative65.8%
fma-def65.8%
unpow265.8%
unpow265.8%
unpow265.8%
times-frac71.7%
Simplified71.7%
Taylor expanded in k around inf 71.7%
*-commutative71.7%
unpow271.7%
associate-*l*71.7%
Simplified71.7%
Taylor expanded in k around 0 71.7%
associate-*r/71.7%
unpow271.7%
associate-*r*73.2%
times-frac73.4%
unpow273.4%
Simplified73.4%
Final simplification63.3%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ 2.0 (* k (* k t))) (* (/ l k) (/ l k))))
l = abs(l);
double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * ((l / k) * (l / k));
}
NOTE: l should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (2.0d0 / (k * (k * t))) * ((l / k) * (l / k))
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * ((l / k) * (l / k));
}
l = abs(l) def code(t, l, k): return (2.0 / (k * (k * t))) * ((l / k) * (l / k))
l = abs(l) function code(t, l, k) return Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / k) * Float64(l / k))) end
l = abs(l) function tmp = code(t, l, k) tmp = (2.0 / (k * (k * t))) * ((l / k) * (l / k)); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)
\end{array}
Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/34.7%
*-commutative34.7%
times-frac34.9%
+-commutative34.9%
associate--l+44.1%
metadata-eval44.1%
+-rgt-identity44.1%
times-frac47.3%
Simplified47.3%
Taylor expanded in t around 0 83.6%
unpow283.6%
Simplified83.6%
Taylor expanded in k around 0 72.0%
unpow272.0%
unpow272.0%
times-frac77.3%
Simplified77.3%
Taylor expanded in k around 0 77.3%
unpow277.3%
associate-*r*78.0%
Simplified78.0%
Final simplification78.0%
NOTE: l should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ -0.3333333333333333 k) (/ (* l l) (* k t))))
l = abs(l);
double code(double t, double l, double k) {
return (-0.3333333333333333 / k) * ((l * l) / (k * t));
}
NOTE: l 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 = ((-0.3333333333333333d0) / k) * ((l * l) / (k * t))
end function
l = Math.abs(l);
public static double code(double t, double l, double k) {
return (-0.3333333333333333 / k) * ((l * l) / (k * t));
}
l = abs(l) def code(t, l, k): return (-0.3333333333333333 / k) * ((l * l) / (k * t))
l = abs(l) function code(t, l, k) return Float64(Float64(-0.3333333333333333 / k) * Float64(Float64(l * l) / Float64(k * t))) end
l = abs(l) function tmp = code(t, l, k) tmp = (-0.3333333333333333 / k) * ((l * l) / (k * t)); end
NOTE: l should be positive before calling this function code[t_, l_, k_] := N[(N[(-0.3333333333333333 / k), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\frac{-0.3333333333333333}{k} \cdot \frac{\ell \cdot \ell}{k \cdot t}
\end{array}
Initial program 34.7%
associate-*l*34.7%
associate-*l*34.7%
associate-/r*34.7%
associate-/r/34.7%
*-commutative34.7%
times-frac34.9%
+-commutative34.9%
associate--l+44.1%
metadata-eval44.1%
+-rgt-identity44.1%
times-frac47.3%
Simplified47.3%
Taylor expanded in t around 0 83.6%
unpow283.6%
Simplified83.6%
Taylor expanded in k around 0 60.3%
*-commutative60.3%
fma-def60.3%
unpow260.3%
unpow260.3%
unpow260.3%
times-frac65.8%
Simplified65.8%
Taylor expanded in k around inf 37.0%
*-commutative37.0%
unpow237.0%
associate-*l*37.0%
Simplified37.0%
Taylor expanded in k around 0 37.0%
associate-*r/37.0%
unpow237.0%
associate-*r*38.2%
times-frac38.3%
unpow238.3%
Simplified38.3%
Final simplification38.3%
herbie shell --seed 2023227
(FPCore (t l k)
:name "Toniolo and Linder, Equation (10-)"
:precision binary64
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))