
(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 18 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
(if (or (<= t -102000.0) (not (<= t 8.2e-86)))
(/
(pow
(* (/ (cbrt (/ 2.0 (tan k))) t) (* (cbrt l) (/ (cbrt l) (cbrt (sin k)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* (/ l (sin k)) (* 2.0 (/ (* (/ l k) (/ (cos k) k)) (* t (sin k)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -102000.0) || !(t <= 8.2e-86)) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * (cbrt(l) * (cbrt(l) / cbrt(sin(k))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = (l / sin(k)) * (2.0 * (((l / k) * (cos(k) / k)) / (t * sin(k))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -102000.0) || !(t <= 8.2e-86)) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * (Math.cbrt(l) * (Math.cbrt(l) / Math.cbrt(Math.sin(k))))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = (l / Math.sin(k)) * (2.0 * (((l / k) * (Math.cos(k) / k)) / (t * Math.sin(k))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -102000.0) || !(t <= 8.2e-86)) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * Float64(cbrt(l) * Float64(cbrt(l) / cbrt(sin(k))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(Float64(l / sin(k)) * Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(cos(k) / k)) / Float64(t * sin(k))))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -102000.0], N[Not[LessEqual[t, 8.2e-86]], $MachinePrecision]], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -102000 \lor \neg \left(t \leq 8.2 \cdot 10^{-86}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \left(\sqrt[3]{\ell} \cdot \frac{\sqrt[3]{\ell}}{\sqrt[3]{\sin k}}\right)\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{\sin k} \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k}}{t \cdot \sin k}\right)\\
\end{array}
\end{array}
if t < -102000 or 8.19999999999999959e-86 < t Initial program 69.6%
associate-/r*69.6%
associate-*l*58.3%
sqr-neg58.3%
associate-*l*69.6%
*-commutative69.6%
sqr-neg69.6%
associate-/r*69.6%
Simplified70.1%
associate-/l/70.1%
associate-/r/69.6%
add-cube-cbrt69.5%
Applied egg-rr77.9%
pow-plus77.9%
metadata-eval77.9%
associate-/r/78.0%
associate-/r/77.9%
Simplified77.9%
cbrt-prod91.2%
Applied egg-rr91.2%
cbrt-div94.9%
Applied egg-rr94.9%
if -102000 < t < 8.19999999999999959e-86Initial program 40.3%
associate-/r*40.3%
associate-*l*40.3%
sqr-neg40.3%
associate-*l*40.3%
*-commutative40.3%
sqr-neg40.3%
associate-*l/40.3%
associate-*r/40.3%
associate-/r/40.3%
Simplified40.3%
expm1-log1p-u20.9%
expm1-udef20.1%
associate-*l/20.1%
associate-*r*20.1%
Applied egg-rr20.1%
expm1-def20.9%
expm1-log1p40.3%
associate-*r*40.3%
times-frac43.5%
*-commutative43.5%
Simplified43.5%
div-inv43.4%
*-commutative43.4%
times-frac44.7%
Applied egg-rr44.7%
associate-*l*45.5%
associate-*r/45.5%
*-rgt-identity45.5%
associate-*r/45.5%
associate-*l/46.2%
*-commutative46.2%
associate-/r*44.3%
Simplified44.3%
Taylor expanded in t around 0 87.0%
associate-/r*85.6%
unpow285.6%
times-frac90.6%
Simplified90.6%
Final simplification93.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (/ l (sin k))) (t_2 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))
(+ 1.0 (+ t_2 1.0))))
2e+305)
(/
(pow (* (/ (cbrt (/ 2.0 (tan k))) t) (* (cbrt l) (cbrt t_1))) 3.0)
(+ 2.0 t_2))
(* t_1 (* 2.0 (/ (* (/ l k) (/ (cos k) k)) (* t (sin k))))))))
double code(double t, double l, double k) {
double t_1 = l / sin(k);
double t_2 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+305) {
tmp = pow(((cbrt((2.0 / tan(k))) / t) * (cbrt(l) * cbrt(t_1))), 3.0) / (2.0 + t_2);
} else {
tmp = t_1 * (2.0 * (((l / k) * (cos(k) / k)) / (t * sin(k))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = l / Math.sin(k);
double t_2 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+305) {
tmp = Math.pow(((Math.cbrt((2.0 / Math.tan(k))) / t) * (Math.cbrt(l) * Math.cbrt(t_1))), 3.0) / (2.0 + t_2);
} else {
tmp = t_1 * (2.0 * (((l / k) * (Math.cos(k) / k)) / (t * Math.sin(k))));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(l / sin(k)) t_2 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_2 + 1.0)))) <= 2e+305) tmp = Float64((Float64(Float64(cbrt(Float64(2.0 / tan(k))) / t) * Float64(cbrt(l) * cbrt(t_1))) ^ 3.0) / Float64(2.0 + t_2)); else tmp = Float64(t_1 * Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(cos(k) / k)) / Float64(t * sin(k))))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+305], N[(N[Power[N[(N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision] * N[(N[Power[l, 1/3], $MachinePrecision] * N[Power[t$95$1, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{\sin k}\\
t_2 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t_2 + 1\right)\right)} \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t} \cdot \left(\sqrt[3]{\ell} \cdot \sqrt[3]{t_1}\right)\right)}^{3}}{2 + t_2}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k}}{t \cdot \sin k}\right)\\
\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))) < 1.9999999999999999e305Initial program 82.7%
associate-/r*82.7%
associate-*l*71.7%
sqr-neg71.7%
associate-*l*82.7%
*-commutative82.7%
sqr-neg82.7%
associate-/r*82.7%
Simplified83.2%
associate-/l/83.2%
associate-/r/82.7%
add-cube-cbrt82.6%
Applied egg-rr91.0%
pow-plus91.0%
metadata-eval91.0%
associate-/r/91.2%
associate-/r/91.0%
Simplified91.0%
cbrt-prod94.7%
Applied egg-rr94.7%
if 1.9999999999999999e305 < (/.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 22.7%
associate-/r*22.7%
associate-*l*22.7%
sqr-neg22.7%
associate-*l*22.7%
*-commutative22.7%
sqr-neg22.7%
associate-*l/22.7%
associate-*r/22.7%
associate-/r/22.7%
Simplified22.7%
expm1-log1p-u22.7%
expm1-udef22.7%
associate-*l/22.7%
associate-*r*22.7%
Applied egg-rr22.7%
expm1-def22.7%
expm1-log1p22.7%
associate-*r*22.7%
times-frac32.4%
*-commutative32.4%
Simplified32.4%
div-inv32.4%
*-commutative32.4%
times-frac32.4%
Applied egg-rr32.4%
associate-*l*34.1%
associate-*r/34.1%
*-rgt-identity34.1%
associate-*r/34.1%
associate-*l/34.1%
*-commutative34.1%
associate-/r*34.1%
Simplified34.1%
Taylor expanded in t around 0 78.7%
associate-/r*75.7%
unpow275.7%
times-frac83.5%
Simplified83.5%
Final simplification89.8%
(FPCore (t l k)
:precision binary64
(if (<= k 7e-38)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 7.4e+148)
(* (/ l (sin k)) (* 2.0 (/ (* l (cos k)) (* (* t (sin k)) (pow k 2.0)))))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 7e-38) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 7.4e+148) {
tmp = (l / sin(k)) * (2.0 * ((l * cos(k)) / ((t * sin(k)) * pow(k, 2.0))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 7d-38) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 7.4d+148) then
tmp = (l / sin(k)) * (2.0d0 * ((l * cos(k)) / ((t * sin(k)) * (k ** 2.0d0))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 7e-38) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 7.4e+148) {
tmp = (l / Math.sin(k)) * (2.0 * ((l * Math.cos(k)) / ((t * Math.sin(k)) * Math.pow(k, 2.0))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 7e-38: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 7.4e+148: tmp = (l / math.sin(k)) * (2.0 * ((l * math.cos(k)) / ((t * math.sin(k)) * math.pow(k, 2.0)))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 7e-38) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 7.4e+148) tmp = Float64(Float64(l / sin(k)) * Float64(2.0 * Float64(Float64(l * cos(k)) / Float64(Float64(t * sin(k)) * (k ^ 2.0))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 7e-38) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 7.4e+148) tmp = (l / sin(k)) * (2.0 * ((l * cos(k)) / ((t * sin(k)) * (k ^ 2.0)))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 7e-38], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.4e+148], N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 7 \cdot 10^{-38}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 7.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{\ell}{\sin k} \cdot \left(2 \cdot \frac{\ell \cdot \cos k}{\left(t \cdot \sin k\right) \cdot {k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 7.0000000000000003e-38Initial program 61.9%
associate-/r*61.9%
associate-*l*53.2%
sqr-neg53.2%
associate-*l*61.9%
*-commutative61.9%
sqr-neg61.9%
associate-/r*61.9%
Simplified62.2%
associate-/l/62.2%
associate-/r/61.9%
add-cube-cbrt61.8%
Applied egg-rr74.8%
pow-plus74.8%
metadata-eval74.8%
associate-/r/74.9%
associate-/r/74.8%
Simplified74.8%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/57.6%
unpow257.6%
times-frac69.8%
associate-/r*67.9%
associate-/l/70.7%
Simplified70.7%
if 7.0000000000000003e-38 < k < 7.4000000000000005e148Initial program 49.4%
associate-/r*49.5%
associate-*l*49.5%
sqr-neg49.5%
associate-*l*49.5%
*-commutative49.5%
sqr-neg49.5%
associate-*l/49.5%
associate-*r/49.5%
associate-/r/49.5%
Simplified49.5%
expm1-log1p-u38.9%
expm1-udef36.5%
associate-*l/36.5%
associate-*r*36.5%
Applied egg-rr36.5%
expm1-def38.9%
expm1-log1p49.5%
associate-*r*49.5%
times-frac56.7%
*-commutative56.7%
Simplified56.7%
div-inv56.7%
*-commutative56.7%
times-frac56.7%
Applied egg-rr56.7%
associate-*l*61.1%
associate-*r/61.1%
*-rgt-identity61.1%
associate-*r/61.2%
associate-*l/61.2%
*-commutative61.2%
associate-/r*61.2%
Simplified61.2%
Taylor expanded in t around 0 88.0%
if 7.4000000000000005e148 < k Initial program 34.4%
associate-/r*34.4%
associate-*l*34.4%
sqr-neg34.4%
associate-*l*34.4%
*-commutative34.4%
sqr-neg34.4%
associate-/r*34.4%
Simplified34.4%
associate-/l/34.4%
associate-/r/34.4%
add-cube-cbrt34.4%
Applied egg-rr47.3%
pow-plus47.3%
metadata-eval47.3%
associate-/r/47.3%
associate-/r/47.3%
Simplified47.3%
cbrt-prod62.2%
Applied egg-rr62.2%
Taylor expanded in k around inf 50.4%
times-frac50.5%
unpow250.5%
unpow250.5%
times-frac95.1%
Simplified95.1%
Final simplification76.5%
(FPCore (t l k)
:precision binary64
(if (<= k 1.25e-37)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 7e+139)
(* (/ l (sin k)) (* 2.0 (/ (* (/ l k) (/ (cos k) k)) (* t (sin k)))))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.25e-37) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 7e+139) {
tmp = (l / sin(k)) * (2.0 * (((l / k) * (cos(k) / k)) / (t * sin(k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.25d-37) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 7d+139) then
tmp = (l / sin(k)) * (2.0d0 * (((l / k) * (cos(k) / k)) / (t * sin(k))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.25e-37) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 7e+139) {
tmp = (l / Math.sin(k)) * (2.0 * (((l / k) * (Math.cos(k) / k)) / (t * Math.sin(k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.25e-37: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 7e+139: tmp = (l / math.sin(k)) * (2.0 * (((l / k) * (math.cos(k) / k)) / (t * math.sin(k)))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.25e-37) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 7e+139) tmp = Float64(Float64(l / sin(k)) * Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(cos(k) / k)) / Float64(t * sin(k))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.25e-37) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 7e+139) tmp = (l / sin(k)) * (2.0 * (((l / k) * (cos(k) / k)) / (t * sin(k)))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.25e-37], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e+139], N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.25 \cdot 10^{-37}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 7 \cdot 10^{+139}:\\
\;\;\;\;\frac{\ell}{\sin k} \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k}}{t \cdot \sin k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.2499999999999999e-37Initial program 61.9%
associate-/r*61.9%
associate-*l*53.2%
sqr-neg53.2%
associate-*l*61.9%
*-commutative61.9%
sqr-neg61.9%
associate-/r*61.9%
Simplified62.2%
associate-/l/62.2%
associate-/r/61.9%
add-cube-cbrt61.8%
Applied egg-rr74.8%
pow-plus74.8%
metadata-eval74.8%
associate-/r/74.9%
associate-/r/74.8%
Simplified74.8%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/57.6%
unpow257.6%
times-frac69.8%
associate-/r*67.9%
associate-/l/70.7%
Simplified70.7%
if 1.2499999999999999e-37 < k < 6.99999999999999957e139Initial program 49.3%
associate-/r*49.4%
associate-*l*49.4%
sqr-neg49.4%
associate-*l*49.4%
*-commutative49.4%
sqr-neg49.4%
associate-*l/49.3%
associate-*r/49.4%
associate-/r/49.4%
Simplified49.4%
expm1-log1p-u38.2%
expm1-udef35.7%
associate-*l/35.7%
associate-*r*35.7%
Applied egg-rr35.7%
expm1-def38.2%
expm1-log1p49.4%
associate-*r*49.4%
times-frac54.6%
*-commutative54.6%
Simplified54.6%
div-inv54.5%
*-commutative54.5%
times-frac54.5%
Applied egg-rr54.5%
associate-*l*59.2%
associate-*r/59.2%
*-rgt-identity59.2%
associate-*r/59.2%
associate-*l/59.3%
*-commutative59.3%
associate-/r*59.3%
Simplified59.3%
Taylor expanded in t around 0 87.4%
associate-/r*79.6%
unpow279.6%
times-frac79.6%
Simplified79.6%
if 6.99999999999999957e139 < k Initial program 35.4%
associate-/r*35.4%
associate-*l*35.4%
sqr-neg35.4%
associate-*l*35.4%
*-commutative35.4%
sqr-neg35.4%
associate-/r*35.4%
Simplified35.4%
associate-/l/35.4%
associate-/r/35.4%
add-cube-cbrt35.4%
Applied egg-rr47.6%
pow-plus47.6%
metadata-eval47.6%
associate-/r/47.6%
associate-/r/47.6%
Simplified47.6%
cbrt-prod64.3%
Applied egg-rr64.3%
Taylor expanded in k around inf 50.5%
times-frac50.6%
unpow250.6%
unpow250.6%
times-frac95.4%
Simplified95.4%
Final simplification75.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 1.25e-17)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 8.5e+150)
(* (* (/ l (* k k)) (/ (* l (cos k)) t)) (/ 2.0 t_1))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t t_1))))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 1.25e-17) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 8.5e+150) {
tmp = ((l / (k * k)) * ((l * cos(k)) / t)) * (2.0 / t_1);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * 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 = sin(k) ** 2.0d0
if (k <= 1.25d-17) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 8.5d+150) then
tmp = ((l / (k * k)) * ((l * cos(k)) / t)) * (2.0d0 / t_1)
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 1.25e-17) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 8.5e+150) {
tmp = ((l / (k * k)) * ((l * Math.cos(k)) / t)) * (2.0 / t_1);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * t_1)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 1.25e-17: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 8.5e+150: tmp = ((l / (k * k)) * ((l * math.cos(k)) / t)) * (2.0 / t_1) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * t_1))) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 1.25e-17) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 8.5e+150) tmp = Float64(Float64(Float64(l / Float64(k * k)) * Float64(Float64(l * cos(k)) / t)) * Float64(2.0 / t_1)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * t_1)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 1.25e-17) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 8.5e+150) tmp = ((l / (k * k)) * ((l * cos(k)) / t)) * (2.0 / t_1); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 1.25e-17], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.5e+150], N[(N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * N[(2.0 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 1.25 \cdot 10^{-17}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 8.5 \cdot 10^{+150}:\\
\;\;\;\;\left(\frac{\ell}{k \cdot k} \cdot \frac{\ell \cdot \cos k}{t}\right) \cdot \frac{2}{t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\end{array}
\end{array}
if k < 1.25e-17Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 1.25e-17 < k < 8.4999999999999999e150Initial program 48.2%
associate-/r*48.3%
associate-*l*48.2%
sqr-neg48.2%
associate-*l*48.3%
*-commutative48.3%
sqr-neg48.3%
associate-/r*48.3%
Simplified48.3%
associate-/l/48.3%
associate-/r/48.3%
add-cube-cbrt48.1%
Applied egg-rr57.9%
pow-plus57.9%
metadata-eval57.9%
associate-/r/58.0%
associate-/r/58.0%
Simplified58.0%
cbrt-prod66.6%
Applied egg-rr66.6%
Taylor expanded in k around inf 74.7%
associate-*r/74.7%
unpow274.7%
*-commutative74.7%
unpow274.7%
associate-*r*74.6%
times-frac74.7%
unpow274.7%
associate-*l*74.6%
times-frac83.2%
unpow283.2%
Simplified83.2%
if 8.4999999999999999e150 < k Initial program 34.5%
associate-/r*34.5%
associate-*l*34.5%
sqr-neg34.5%
associate-*l*34.5%
*-commutative34.5%
sqr-neg34.5%
associate-/r*34.5%
Simplified34.5%
associate-/l/34.5%
associate-/r/34.5%
add-cube-cbrt34.5%
Applied egg-rr45.2%
pow-plus45.2%
metadata-eval45.2%
associate-/r/45.2%
associate-/r/45.2%
Simplified45.2%
cbrt-prod58.4%
Applied egg-rr58.4%
Taylor expanded in k around inf 48.8%
times-frac48.8%
unpow248.8%
unpow248.8%
times-frac94.6%
Simplified94.6%
Final simplification75.7%
(FPCore (t l k) :precision binary64 (if (<= k 9.6e-14) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* (* l (/ l (* k k))) (/ (/ (cos k) t) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 9.6e-14) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * ((cos(k) / t) / pow(sin(k), 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 9.6d-14) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * ((l * (l / (k * k))) * ((cos(k) / t) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9.6e-14) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * ((Math.cos(k) / t) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 9.6e-14: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * ((l * (l / (k * k))) * ((math.cos(k) / t) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 9.6e-14) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / Float64(k * k))) * Float64(Float64(cos(k) / t) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.6e-14) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * ((l * (l / (k * k))) * ((cos(k) / t) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 9.6e-14], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.6 \cdot 10^{-14}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\ell \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\frac{\cos k}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 9.599999999999999e-14Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 9.599999999999999e-14 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
*-commutative64.1%
associate-*r*64.1%
times-frac64.1%
unpow264.1%
associate-*l*68.2%
unpow268.2%
Simplified68.2%
Taylor expanded in k around inf 64.1%
times-frac58.7%
unpow258.7%
associate-*r/71.3%
unpow271.3%
associate-/r*71.3%
Simplified71.3%
Final simplification71.1%
(FPCore (t l k) :precision binary64 (if (<= k 4e-15) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4e-15) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4d-15) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4e-15) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4e-15: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4e-15) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4e-15) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4e-15], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{-15}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 4.0000000000000003e-15Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 4.0000000000000003e-15 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-/r*42.6%
Simplified42.6%
associate-/l/42.6%
associate-/r/42.6%
add-cube-cbrt42.5%
Applied egg-rr52.7%
pow-plus52.7%
metadata-eval52.7%
associate-/r/52.8%
associate-/r/52.8%
Simplified52.8%
cbrt-prod63.3%
Applied egg-rr63.3%
Taylor expanded in k around inf 64.1%
times-frac58.7%
unpow258.7%
unpow258.7%
times-frac84.0%
Simplified84.0%
Final simplification74.6%
(FPCore (t l k)
:precision binary64
(if (or (<= t -1.4e-74) (not (<= t 3e-86)))
(/ (* 2.0 (* (/ l k) (/ (/ l k) (pow t 3.0)))) (+ 2.0 (pow (/ k t) 2.0)))
(*
2.0
(*
(/ (cos k) (* k (* t k)))
(fma 0.3333333333333333 (* l l) (* l (/ l (* k k))))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.4e-74) || !(t <= 3e-86)) {
tmp = (2.0 * ((l / k) * ((l / k) / pow(t, 3.0)))) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * ((cos(k) / (k * (t * k))) * fma(0.3333333333333333, (l * l), (l * (l / (k * k)))));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -1.4e-74) || !(t <= 3e-86)) tmp = Float64(Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0)))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * Float64(t * k))) * fma(0.3333333333333333, Float64(l * l), Float64(l * Float64(l / Float64(k * k)))))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.4e-74], N[Not[LessEqual[t, 3e-86]], $MachinePrecision]], N[(N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.3333333333333333 * N[(l * l), $MachinePrecision] + N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-74} \lor \neg \left(t \leq 3 \cdot 10^{-86}\right):\\
\;\;\;\;\frac{2 \cdot \left(\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot \left(t \cdot k\right)} \cdot \mathsf{fma}\left(0.3333333333333333, \ell \cdot \ell, \ell \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if t < -1.39999999999999994e-74 or 3.0000000000000001e-86 < t Initial program 70.3%
associate-/r*70.4%
associate-*l*60.3%
sqr-neg60.3%
associate-*l*70.4%
*-commutative70.4%
sqr-neg70.4%
associate-*l/70.8%
associate-*r/69.8%
associate-/r/69.8%
Simplified69.8%
expm1-log1p-u59.8%
expm1-udef57.4%
associate-*l/57.4%
associate-*r*57.4%
Applied egg-rr57.4%
expm1-def59.8%
expm1-log1p69.8%
associate-*r*69.8%
times-frac79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in k around 0 55.9%
associate-/l/56.0%
unpow256.0%
associate-*l/62.8%
unpow262.8%
times-frac76.6%
associate-/r*74.9%
associate-/l/77.6%
Simplified77.6%
if -1.39999999999999994e-74 < t < 3.0000000000000001e-86Initial program 34.0%
associate-/r*34.0%
associate-*l*34.0%
sqr-neg34.0%
associate-*l*34.0%
*-commutative34.0%
sqr-neg34.0%
associate-*l/34.0%
associate-*r/34.0%
associate-/r/34.0%
Simplified34.0%
Taylor expanded in k around inf 79.9%
*-commutative79.9%
associate-*r*79.9%
times-frac80.8%
unpow280.8%
associate-*l*85.6%
unpow285.6%
Simplified85.6%
Taylor expanded in k around 0 71.2%
fma-def71.2%
unpow271.2%
unpow271.2%
associate-*r/75.4%
unpow275.4%
Simplified75.4%
Final simplification76.8%
(FPCore (t l k)
:precision binary64
(if (<= k 1.1e-37)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(*
2.0
(*
l
(*
(/ l (* k k))
(/ (cos k) (/ t (+ 0.3333333333333333 (/ 1.0 (* k k))))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.1e-37) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (l * ((l / (k * k)) * (cos(k) / (t / (0.3333333333333333 + (1.0 / (k * 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.1d-37) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (l * ((l / (k * k)) * (cos(k) / (t / (0.3333333333333333d0 + (1.0d0 / (k * k)))))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.1e-37) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (l * ((l / (k * k)) * (Math.cos(k) / (t / (0.3333333333333333 + (1.0 / (k * k)))))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.1e-37: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (l * ((l / (k * k)) * (math.cos(k) / (t / (0.3333333333333333 + (1.0 / (k * k))))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.1e-37) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(l * Float64(Float64(l / Float64(k * k)) * Float64(cos(k) / Float64(t / Float64(0.3333333333333333 + Float64(1.0 / Float64(k * k)))))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.1e-37) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (l * ((l / (k * k)) * (cos(k) / (t / (0.3333333333333333 + (1.0 / (k * k))))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.1e-37], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(l * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t / N[(0.3333333333333333 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.1 \cdot 10^{-37}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\ell \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\cos k}{\frac{t}{0.3333333333333333 + \frac{1}{k \cdot k}}}\right)\right)\\
\end{array}
\end{array}
if k < 1.10000000000000001e-37Initial program 61.9%
associate-/r*61.9%
associate-*l*53.2%
sqr-neg53.2%
associate-*l*61.9%
*-commutative61.9%
sqr-neg61.9%
associate-/r*61.9%
Simplified62.2%
associate-/l/62.2%
associate-/r/61.9%
add-cube-cbrt61.8%
Applied egg-rr74.8%
pow-plus74.8%
metadata-eval74.8%
associate-/r/74.9%
associate-/r/74.8%
Simplified74.8%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/57.6%
unpow257.6%
times-frac69.8%
associate-/r*67.9%
associate-/l/70.7%
Simplified70.7%
if 1.10000000000000001e-37 < k Initial program 42.8%
associate-/r*42.9%
associate-*l*42.9%
sqr-neg42.9%
associate-*l*42.9%
*-commutative42.9%
sqr-neg42.9%
associate-*l/42.8%
associate-*r/42.9%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 62.6%
*-commutative62.6%
associate-*r*62.5%
times-frac62.5%
unpow262.5%
associate-*l*66.5%
unpow266.5%
Simplified66.5%
Taylor expanded in k around 0 53.7%
fma-def53.7%
unpow253.7%
unpow253.7%
associate-*r/55.2%
unpow255.2%
Simplified55.2%
Taylor expanded in l around 0 53.4%
times-frac50.8%
unpow250.8%
associate-*r/57.4%
unpow257.4%
associate-*l*59.0%
associate-/l*59.0%
unpow259.0%
Simplified59.0%
Final simplification67.4%
(FPCore (t l k)
:precision binary64
(if (<= k 7e-16)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 8e+85)
(/ (* 2.0 (* l (* l (cos k)))) (* k (* (* k k) (* t k))))
(* 2.0 (* 0.3333333333333333 (* (* (/ l k) (/ l k)) (/ (cos k) t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 7e-16) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 8e+85) {
tmp = (2.0 * (l * (l * cos(k)))) / (k * ((k * k) * (t * k)));
} else {
tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (cos(k) / t)));
}
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 <= 7d-16) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 8d+85) then
tmp = (2.0d0 * (l * (l * cos(k)))) / (k * ((k * k) * (t * k)))
else
tmp = 2.0d0 * (0.3333333333333333d0 * (((l / k) * (l / k)) * (cos(k) / t)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 7e-16) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 8e+85) {
tmp = (2.0 * (l * (l * Math.cos(k)))) / (k * ((k * k) * (t * k)));
} else {
tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (Math.cos(k) / t)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 7e-16: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 8e+85: tmp = (2.0 * (l * (l * math.cos(k)))) / (k * ((k * k) * (t * k))) else: tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (math.cos(k) / t))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 7e-16) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 8e+85) tmp = Float64(Float64(2.0 * Float64(l * Float64(l * cos(k)))) / Float64(k * Float64(Float64(k * k) * Float64(t * k)))); else tmp = Float64(2.0 * Float64(0.3333333333333333 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / t)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 7e-16) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 8e+85) tmp = (2.0 * (l * (l * cos(k)))) / (k * ((k * k) * (t * k))); else tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (cos(k) / t))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 7e-16], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8e+85], N[(N[(2.0 * N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[(k * k), $MachinePrecision] * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.3333333333333333 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 7 \cdot 10^{-16}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 8 \cdot 10^{+85}:\\
\;\;\;\;\frac{2 \cdot \left(\ell \cdot \left(\ell \cdot \cos k\right)\right)}{k \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.3333333333333333 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t}\right)\right)\\
\end{array}
\end{array}
if k < 7.00000000000000035e-16Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 7.00000000000000035e-16 < k < 8.0000000000000001e85Initial program 53.8%
associate-/r*53.9%
associate-*l*53.9%
sqr-neg53.9%
associate-*l*53.9%
*-commutative53.9%
sqr-neg53.9%
associate-/r*53.9%
Simplified53.9%
associate-/l/53.9%
associate-/r/53.9%
add-cube-cbrt53.7%
Applied egg-rr57.6%
pow-plus57.6%
metadata-eval57.6%
associate-/r/57.7%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in k around inf 72.5%
associate-*r/72.5%
*-commutative72.5%
unpow272.5%
associate-*r*72.5%
*-commutative72.5%
*-commutative72.5%
associate-*r*72.4%
unpow272.4%
associate-*r*72.4%
associate-*l*72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in k around 0 55.9%
unpow255.9%
Simplified55.9%
if 8.0000000000000001e85 < k Initial program 35.3%
associate-/r*35.3%
associate-*l*35.3%
sqr-neg35.3%
associate-*l*35.3%
*-commutative35.3%
sqr-neg35.3%
associate-*l/35.3%
associate-*r/35.3%
associate-/r/35.3%
Simplified35.3%
Taylor expanded in k around inf 58.7%
*-commutative58.7%
associate-*r*58.6%
times-frac58.6%
unpow258.6%
associate-*l*65.4%
unpow265.4%
Simplified65.4%
Taylor expanded in k around 0 55.4%
fma-def55.4%
unpow255.4%
unpow255.4%
associate-*r/57.8%
unpow257.8%
Simplified57.8%
Taylor expanded in k around inf 54.8%
times-frac52.5%
unpow252.5%
unpow252.5%
times-frac68.3%
Simplified68.3%
Final simplification68.9%
(FPCore (t l k) :precision binary64 (if (<= k 1.1e-11) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* 0.3333333333333333 (* (* l (/ l t)) (/ (cos k) (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.1e-11) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (0.3333333333333333 * ((l * (l / t)) * (cos(k) / (k * 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.1d-11) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (0.3333333333333333d0 * ((l * (l / t)) * (cos(k) / (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.1e-11) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (0.3333333333333333 * ((l * (l / t)) * (Math.cos(k) / (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.1e-11: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (0.3333333333333333 * ((l * (l / t)) * (math.cos(k) / (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.1e-11) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(0.3333333333333333 * Float64(Float64(l * Float64(l / t)) * Float64(cos(k) / Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.1e-11) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (0.3333333333333333 * ((l * (l / t)) * (cos(k) / (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.1e-11], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.3333333333333333 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.1 \cdot 10^{-11}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.3333333333333333 \cdot \left(\left(\ell \cdot \frac{\ell}{t}\right) \cdot \frac{\cos k}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if k < 1.1000000000000001e-11Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 1.1000000000000001e-11 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
*-commutative64.1%
associate-*r*64.1%
times-frac64.1%
unpow264.1%
associate-*l*68.2%
unpow268.2%
Simplified68.2%
Taylor expanded in k around 0 55.0%
fma-def55.0%
unpow255.0%
unpow255.0%
associate-*r/56.5%
unpow256.5%
Simplified56.5%
Taylor expanded in l around 0 54.7%
associate-*r*54.7%
unpow254.7%
associate-*l*54.7%
unpow254.7%
unpow254.7%
associate-*l*56.5%
Simplified56.5%
Taylor expanded in k around inf 53.5%
*-commutative53.5%
times-frac50.7%
unpow250.7%
associate-*r/56.9%
unpow256.9%
Simplified56.9%
Final simplification67.1%
(FPCore (t l k) :precision binary64 (if (<= k 5e-11) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* 0.3333333333333333 (* (* (/ l k) (/ l k)) (/ (cos k) t))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5e-11) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (cos(k) / t)));
}
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 <= 5d-11) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (0.3333333333333333d0 * (((l / k) * (l / k)) * (cos(k) / t)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5e-11) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (Math.cos(k) / t)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5e-11: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (math.cos(k) / t))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5e-11) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(0.3333333333333333 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / t)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5e-11) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (0.3333333333333333 * (((l / k) * (l / k)) * (cos(k) / t))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5e-11], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.3333333333333333 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.3333333333333333 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t}\right)\right)\\
\end{array}
\end{array}
if k < 5.00000000000000018e-11Initial program 61.7%
associate-/r*61.7%
associate-*l*53.1%
sqr-neg53.1%
associate-*l*61.7%
*-commutative61.7%
sqr-neg61.7%
associate-/r*61.7%
Simplified62.1%
associate-/l/62.1%
associate-/r/61.7%
add-cube-cbrt61.7%
Applied egg-rr74.5%
pow-plus74.5%
metadata-eval74.5%
associate-/r/74.6%
associate-/r/74.5%
Simplified74.5%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/58.1%
unpow258.1%
times-frac70.1%
associate-/r*68.3%
associate-/l/71.0%
Simplified71.0%
if 5.00000000000000018e-11 < k Initial program 42.6%
associate-/r*42.6%
associate-*l*42.6%
sqr-neg42.6%
associate-*l*42.6%
*-commutative42.6%
sqr-neg42.6%
associate-*l/42.6%
associate-*r/42.6%
associate-/r/42.6%
Simplified42.6%
Taylor expanded in k around inf 64.1%
*-commutative64.1%
associate-*r*64.1%
times-frac64.1%
unpow264.1%
associate-*l*68.2%
unpow268.2%
Simplified68.2%
Taylor expanded in k around 0 55.0%
fma-def55.0%
unpow255.0%
unpow255.0%
associate-*r/56.5%
unpow256.5%
Simplified56.5%
Taylor expanded in k around inf 53.5%
times-frac50.7%
unpow250.7%
unpow250.7%
times-frac60.6%
Simplified60.6%
Final simplification68.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* t k))) (t_2 (/ (* l l) t_1)))
(if (<= l 3.2e-203)
(* 2.0 (+ (* -0.5 t_2) (* 0.3333333333333333 t_2)))
(if (<= l 2.1e+213)
(* 2.0 (/ l (* (pow k 4.0) (/ t l))))
(*
2.0
(/
(*
(+ 0.3333333333333333 (/ 1.0 (* k k)))
(* l (+ l (* -0.5 (* l (* k k))))))
t_1))))))
double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 3.2e-203) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else if (l <= 2.1e+213) {
tmp = 2.0 * (l / (pow(k, 4.0) * (t / l)));
} else {
tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / 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) :: t_2
real(8) :: tmp
t_1 = k * (t * k)
t_2 = (l * l) / t_1
if (l <= 3.2d-203) then
tmp = 2.0d0 * (((-0.5d0) * t_2) + (0.3333333333333333d0 * t_2))
else if (l <= 2.1d+213) then
tmp = 2.0d0 * (l / ((k ** 4.0d0) * (t / l)))
else
tmp = 2.0d0 * (((0.3333333333333333d0 + (1.0d0 / (k * k))) * (l * (l + ((-0.5d0) * (l * (k * k)))))) / t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 3.2e-203) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else if (l <= 2.1e+213) {
tmp = 2.0 * (l / (Math.pow(k, 4.0) * (t / l)));
} else {
tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1);
}
return tmp;
}
def code(t, l, k): t_1 = k * (t * k) t_2 = (l * l) / t_1 tmp = 0 if l <= 3.2e-203: tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)) elif l <= 2.1e+213: tmp = 2.0 * (l / (math.pow(k, 4.0) * (t / l))) else: tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1) return tmp
function code(t, l, k) t_1 = Float64(k * Float64(t * k)) t_2 = Float64(Float64(l * l) / t_1) tmp = 0.0 if (l <= 3.2e-203) tmp = Float64(2.0 * Float64(Float64(-0.5 * t_2) + Float64(0.3333333333333333 * t_2))); elseif (l <= 2.1e+213) tmp = Float64(2.0 * Float64(l / Float64((k ^ 4.0) * Float64(t / l)))); else tmp = Float64(2.0 * Float64(Float64(Float64(0.3333333333333333 + Float64(1.0 / Float64(k * k))) * Float64(l * Float64(l + Float64(-0.5 * Float64(l * Float64(k * k)))))) / t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k * (t * k); t_2 = (l * l) / t_1; tmp = 0.0; if (l <= 3.2e-203) tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)); elseif (l <= 2.1e+213) tmp = 2.0 * (l / ((k ^ 4.0) * (t / l))); else tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[l, 3.2e-203], N[(2.0 * N[(N[(-0.5 * t$95$2), $MachinePrecision] + N[(0.3333333333333333 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.1e+213], N[(2.0 * N[(l / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(0.3333333333333333 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l + N[(-0.5 * N[(l * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(t \cdot k\right)\\
t_2 := \frac{\ell \cdot \ell}{t_1}\\
\mathbf{if}\;\ell \leq 3.2 \cdot 10^{-203}:\\
\;\;\;\;2 \cdot \left(-0.5 \cdot t_2 + 0.3333333333333333 \cdot t_2\right)\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{+213}:\\
\;\;\;\;2 \cdot \frac{\ell}{{k}^{4} \cdot \frac{t}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\left(0.3333333333333333 + \frac{1}{k \cdot k}\right) \cdot \left(\ell \cdot \left(\ell + -0.5 \cdot \left(\ell \cdot \left(k \cdot k\right)\right)\right)\right)}{t_1}\\
\end{array}
\end{array}
if l < 3.2e-203Initial program 59.0%
associate-/r*59.0%
associate-*l*49.5%
sqr-neg49.5%
associate-*l*59.0%
*-commutative59.0%
sqr-neg59.0%
associate-*l/59.3%
associate-*r/57.8%
associate-/r/57.8%
Simplified57.8%
Taylor expanded in k around inf 61.8%
*-commutative61.8%
associate-*r*61.8%
times-frac63.1%
unpow263.1%
associate-*l*63.7%
unpow263.7%
Simplified63.7%
Taylor expanded in k around 0 34.7%
cancel-sign-sub-inv34.7%
fma-def34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
unpow234.7%
*-commutative34.7%
metadata-eval34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
Simplified34.7%
Taylor expanded in k around inf 35.9%
unpow235.9%
unpow235.9%
associate-*r*39.8%
Simplified39.8%
if 3.2e-203 < l < 2.1000000000000001e213Initial program 52.9%
associate-/r*53.0%
associate-*l*51.6%
sqr-neg51.6%
associate-*l*53.0%
*-commutative53.0%
sqr-neg53.0%
associate-*l/53.2%
associate-*r/54.1%
associate-/r/54.1%
Simplified54.1%
Taylor expanded in k around inf 63.0%
*-commutative63.0%
associate-*r*62.9%
times-frac64.1%
unpow264.1%
associate-*l*68.5%
unpow268.5%
Simplified68.5%
Taylor expanded in k around 0 48.9%
unpow248.9%
associate-/l*52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in t around 0 52.7%
*-commutative52.7%
associate-*l/54.7%
Simplified54.7%
if 2.1000000000000001e213 < l Initial program 50.0%
associate-/r*50.0%
associate-*l*50.0%
sqr-neg50.0%
associate-*l*50.0%
*-commutative50.0%
sqr-neg50.0%
associate-*l/50.0%
associate-*r/50.0%
associate-/r/50.0%
Simplified50.0%
Taylor expanded in k around inf 69.4%
*-commutative69.4%
associate-*r*69.4%
times-frac69.4%
unpow269.4%
associate-*l*69.4%
unpow269.4%
Simplified69.4%
Taylor expanded in k around 0 69.4%
fma-def69.4%
unpow269.4%
unpow269.4%
associate-*r/69.4%
unpow269.4%
Simplified69.4%
Taylor expanded in l around 0 69.4%
associate-*r*69.4%
unpow269.4%
associate-*l*69.4%
unpow269.4%
unpow269.4%
associate-*l*69.4%
Simplified69.4%
Taylor expanded in k around 0 69.3%
*-commutative69.3%
unpow269.3%
Simplified69.3%
Final simplification46.5%
(FPCore (t l k) :precision binary64 (if (<= k 2.6e-37) (* (/ l (* k k)) (/ l (pow t 3.0))) (* 2.0 (/ l (/ (* t (pow k 4.0)) l)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e-37) {
tmp = (l / (k * k)) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * (l / ((t * pow(k, 4.0)) / 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 <= 2.6d-37) then
tmp = (l / (k * k)) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * (l / ((t * (k ** 4.0d0)) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e-37) {
tmp = (l / (k * k)) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (l / ((t * Math.pow(k, 4.0)) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.6e-37: tmp = (l / (k * k)) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * (l / ((t * math.pow(k, 4.0)) / l)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.6e-37) tmp = Float64(Float64(l / Float64(k * k)) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(l / Float64(Float64(t * (k ^ 4.0)) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.6e-37) tmp = (l / (k * k)) * (l / (t ^ 3.0)); else tmp = 2.0 * (l / ((t * (k ^ 4.0)) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.6e-37], N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(l / N[(N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{-37}:\\
\;\;\;\;\frac{\ell}{k \cdot k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell}{\frac{t \cdot {k}^{4}}{\ell}}\\
\end{array}
\end{array}
if k < 2.5999999999999998e-37Initial program 61.9%
associate-/r*61.9%
associate-*l*53.2%
sqr-neg53.2%
associate-*l*61.9%
*-commutative61.9%
sqr-neg61.9%
associate-*l/62.2%
associate-*r/61.3%
associate-/r/61.3%
Simplified61.3%
Taylor expanded in k around 0 53.9%
unpow253.9%
*-commutative53.9%
times-frac57.6%
unpow257.6%
Simplified57.6%
if 2.5999999999999998e-37 < k Initial program 42.8%
associate-/r*42.9%
associate-*l*42.9%
sqr-neg42.9%
associate-*l*42.9%
*-commutative42.9%
sqr-neg42.9%
associate-*l/42.8%
associate-*r/42.9%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 62.6%
*-commutative62.6%
associate-*r*62.5%
times-frac62.5%
unpow262.5%
associate-*l*66.5%
unpow266.5%
Simplified66.5%
Taylor expanded in k around 0 48.0%
unpow248.0%
associate-/l*54.0%
*-commutative54.0%
Simplified54.0%
Final simplification56.6%
(FPCore (t l k) :precision binary64 (if (<= k 2.1e-37) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (/ l (/ (* t (pow k 4.0)) l)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-37) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (l / ((t * pow(k, 4.0)) / 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 <= 2.1d-37) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (l / ((t * (k ** 4.0d0)) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.1e-37) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (l / ((t * Math.pow(k, 4.0)) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.1e-37: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (l / ((t * math.pow(k, 4.0)) / l)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.1e-37) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(l / Float64(Float64(t * (k ^ 4.0)) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.1e-37) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (l / ((t * (k ^ 4.0)) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.1e-37], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(l / N[(N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.1 \cdot 10^{-37}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\ell}{\frac{t \cdot {k}^{4}}{\ell}}\\
\end{array}
\end{array}
if k < 2.1000000000000001e-37Initial program 61.9%
associate-/r*61.9%
associate-*l*53.2%
sqr-neg53.2%
associate-*l*61.9%
*-commutative61.9%
sqr-neg61.9%
associate-/r*61.9%
Simplified62.2%
associate-/l/62.2%
associate-/r/61.9%
add-cube-cbrt61.8%
Applied egg-rr74.8%
pow-plus74.8%
metadata-eval74.8%
associate-/r/74.9%
associate-/r/74.8%
Simplified74.8%
Taylor expanded in k around 0 53.9%
associate-/l/53.9%
unpow253.9%
associate-*l/57.6%
unpow257.6%
times-frac69.8%
associate-/r*67.9%
associate-/l/70.7%
Simplified70.7%
if 2.1000000000000001e-37 < k Initial program 42.8%
associate-/r*42.9%
associate-*l*42.9%
sqr-neg42.9%
associate-*l*42.9%
*-commutative42.9%
sqr-neg42.9%
associate-*l/42.8%
associate-*r/42.9%
associate-/r/42.9%
Simplified42.9%
Taylor expanded in k around inf 62.6%
*-commutative62.6%
associate-*r*62.5%
times-frac62.5%
unpow262.5%
associate-*l*66.5%
unpow266.5%
Simplified66.5%
Taylor expanded in k around 0 48.0%
unpow248.0%
associate-/l*54.0%
*-commutative54.0%
Simplified54.0%
Final simplification66.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* t k))) (t_2 (/ (* l l) t_1)))
(if (<= l 4.9e-203)
(* 2.0 (+ (* -0.5 t_2) (* 0.3333333333333333 t_2)))
(if (<= l 2.7e+213)
(* 2.0 (/ (* (/ l k) (/ l k)) t_1))
(*
2.0
(/
(*
(+ 0.3333333333333333 (/ 1.0 (* k k)))
(* l (+ l (* -0.5 (* l (* k k))))))
t_1))))))
double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 4.9e-203) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else if (l <= 2.7e+213) {
tmp = 2.0 * (((l / k) * (l / k)) / t_1);
} else {
tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / 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) :: t_2
real(8) :: tmp
t_1 = k * (t * k)
t_2 = (l * l) / t_1
if (l <= 4.9d-203) then
tmp = 2.0d0 * (((-0.5d0) * t_2) + (0.3333333333333333d0 * t_2))
else if (l <= 2.7d+213) then
tmp = 2.0d0 * (((l / k) * (l / k)) / t_1)
else
tmp = 2.0d0 * (((0.3333333333333333d0 + (1.0d0 / (k * k))) * (l * (l + ((-0.5d0) * (l * (k * k)))))) / t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 4.9e-203) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else if (l <= 2.7e+213) {
tmp = 2.0 * (((l / k) * (l / k)) / t_1);
} else {
tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1);
}
return tmp;
}
def code(t, l, k): t_1 = k * (t * k) t_2 = (l * l) / t_1 tmp = 0 if l <= 4.9e-203: tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)) elif l <= 2.7e+213: tmp = 2.0 * (((l / k) * (l / k)) / t_1) else: tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1) return tmp
function code(t, l, k) t_1 = Float64(k * Float64(t * k)) t_2 = Float64(Float64(l * l) / t_1) tmp = 0.0 if (l <= 4.9e-203) tmp = Float64(2.0 * Float64(Float64(-0.5 * t_2) + Float64(0.3333333333333333 * t_2))); elseif (l <= 2.7e+213) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) / t_1)); else tmp = Float64(2.0 * Float64(Float64(Float64(0.3333333333333333 + Float64(1.0 / Float64(k * k))) * Float64(l * Float64(l + Float64(-0.5 * Float64(l * Float64(k * k)))))) / t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k * (t * k); t_2 = (l * l) / t_1; tmp = 0.0; if (l <= 4.9e-203) tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)); elseif (l <= 2.7e+213) tmp = 2.0 * (((l / k) * (l / k)) / t_1); else tmp = 2.0 * (((0.3333333333333333 + (1.0 / (k * k))) * (l * (l + (-0.5 * (l * (k * k)))))) / t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[l, 4.9e-203], N[(2.0 * N[(N[(-0.5 * t$95$2), $MachinePrecision] + N[(0.3333333333333333 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.7e+213], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(0.3333333333333333 + N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l + N[(-0.5 * N[(l * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(t \cdot k\right)\\
t_2 := \frac{\ell \cdot \ell}{t_1}\\
\mathbf{if}\;\ell \leq 4.9 \cdot 10^{-203}:\\
\;\;\;\;2 \cdot \left(-0.5 \cdot t_2 + 0.3333333333333333 \cdot t_2\right)\\
\mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+213}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\left(0.3333333333333333 + \frac{1}{k \cdot k}\right) \cdot \left(\ell \cdot \left(\ell + -0.5 \cdot \left(\ell \cdot \left(k \cdot k\right)\right)\right)\right)}{t_1}\\
\end{array}
\end{array}
if l < 4.9e-203Initial program 59.0%
associate-/r*59.0%
associate-*l*49.5%
sqr-neg49.5%
associate-*l*59.0%
*-commutative59.0%
sqr-neg59.0%
associate-*l/59.3%
associate-*r/57.8%
associate-/r/57.8%
Simplified57.8%
Taylor expanded in k around inf 61.8%
*-commutative61.8%
associate-*r*61.8%
times-frac63.1%
unpow263.1%
associate-*l*63.7%
unpow263.7%
Simplified63.7%
Taylor expanded in k around 0 34.7%
cancel-sign-sub-inv34.7%
fma-def34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
unpow234.7%
*-commutative34.7%
metadata-eval34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
Simplified34.7%
Taylor expanded in k around inf 35.9%
unpow235.9%
unpow235.9%
associate-*r*39.8%
Simplified39.8%
if 4.9e-203 < l < 2.7000000000000001e213Initial program 52.9%
associate-/r*53.0%
associate-*l*51.6%
sqr-neg51.6%
associate-*l*53.0%
*-commutative53.0%
sqr-neg53.0%
associate-*l/53.2%
associate-*r/54.1%
associate-/r/54.1%
Simplified54.1%
Taylor expanded in k around inf 63.0%
*-commutative63.0%
associate-*r*62.9%
times-frac64.1%
unpow264.1%
associate-*l*68.5%
unpow268.5%
Simplified68.5%
Taylor expanded in k around 0 54.7%
fma-def54.7%
unpow254.7%
unpow254.7%
associate-*r/54.8%
unpow254.8%
Simplified54.8%
Taylor expanded in l around 0 54.2%
associate-*r*54.2%
unpow254.2%
associate-*l*54.2%
unpow254.2%
unpow254.2%
associate-*l*54.8%
Simplified54.8%
Taylor expanded in k around 0 50.1%
unpow250.1%
unpow250.1%
times-frac53.9%
Simplified53.9%
if 2.7000000000000001e213 < l Initial program 50.0%
associate-/r*50.0%
associate-*l*50.0%
sqr-neg50.0%
associate-*l*50.0%
*-commutative50.0%
sqr-neg50.0%
associate-*l/50.0%
associate-*r/50.0%
associate-/r/50.0%
Simplified50.0%
Taylor expanded in k around inf 69.4%
*-commutative69.4%
associate-*r*69.4%
times-frac69.4%
unpow269.4%
associate-*l*69.4%
unpow269.4%
Simplified69.4%
Taylor expanded in k around 0 69.4%
fma-def69.4%
unpow269.4%
unpow269.4%
associate-*r/69.4%
unpow269.4%
Simplified69.4%
Taylor expanded in l around 0 69.4%
associate-*r*69.4%
unpow269.4%
associate-*l*69.4%
unpow269.4%
unpow269.4%
associate-*l*69.4%
Simplified69.4%
Taylor expanded in k around 0 69.3%
*-commutative69.3%
unpow269.3%
Simplified69.3%
Final simplification46.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* t k))) (t_2 (/ (* l l) t_1)))
(if (<= l 1.7e-205)
(* 2.0 (+ (* -0.5 t_2) (* 0.3333333333333333 t_2)))
(* 2.0 (/ (* (/ l k) (/ l k)) t_1)))))
double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 1.7e-205) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else {
tmp = 2.0 * (((l / k) * (l / k)) / 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) :: t_2
real(8) :: tmp
t_1 = k * (t * k)
t_2 = (l * l) / t_1
if (l <= 1.7d-205) then
tmp = 2.0d0 * (((-0.5d0) * t_2) + (0.3333333333333333d0 * t_2))
else
tmp = 2.0d0 * (((l / k) * (l / k)) / t_1)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = k * (t * k);
double t_2 = (l * l) / t_1;
double tmp;
if (l <= 1.7e-205) {
tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2));
} else {
tmp = 2.0 * (((l / k) * (l / k)) / t_1);
}
return tmp;
}
def code(t, l, k): t_1 = k * (t * k) t_2 = (l * l) / t_1 tmp = 0 if l <= 1.7e-205: tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)) else: tmp = 2.0 * (((l / k) * (l / k)) / t_1) return tmp
function code(t, l, k) t_1 = Float64(k * Float64(t * k)) t_2 = Float64(Float64(l * l) / t_1) tmp = 0.0 if (l <= 1.7e-205) tmp = Float64(2.0 * Float64(Float64(-0.5 * t_2) + Float64(0.3333333333333333 * t_2))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) / t_1)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = k * (t * k); t_2 = (l * l) / t_1; tmp = 0.0; if (l <= 1.7e-205) tmp = 2.0 * ((-0.5 * t_2) + (0.3333333333333333 * t_2)); else tmp = 2.0 * (((l / k) * (l / k)) / t_1); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * l), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[l, 1.7e-205], N[(2.0 * N[(N[(-0.5 * t$95$2), $MachinePrecision] + N[(0.3333333333333333 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(t \cdot k\right)\\
t_2 := \frac{\ell \cdot \ell}{t_1}\\
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-205}:\\
\;\;\;\;2 \cdot \left(-0.5 \cdot t_2 + 0.3333333333333333 \cdot t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t_1}\\
\end{array}
\end{array}
if l < 1.7000000000000001e-205Initial program 59.0%
associate-/r*59.0%
associate-*l*49.5%
sqr-neg49.5%
associate-*l*59.0%
*-commutative59.0%
sqr-neg59.0%
associate-*l/59.3%
associate-*r/57.8%
associate-/r/57.8%
Simplified57.8%
Taylor expanded in k around inf 61.8%
*-commutative61.8%
associate-*r*61.8%
times-frac63.1%
unpow263.1%
associate-*l*63.7%
unpow263.7%
Simplified63.7%
Taylor expanded in k around 0 34.7%
cancel-sign-sub-inv34.7%
fma-def34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
unpow234.7%
*-commutative34.7%
metadata-eval34.7%
unpow234.7%
unpow234.7%
associate-*r*34.7%
Simplified34.7%
Taylor expanded in k around inf 35.9%
unpow235.9%
unpow235.9%
associate-*r*39.8%
Simplified39.8%
if 1.7000000000000001e-205 < l Initial program 52.5%
associate-/r*52.5%
associate-*l*51.3%
sqr-neg51.3%
associate-*l*52.5%
*-commutative52.5%
sqr-neg52.5%
associate-*l/52.7%
associate-*r/53.4%
associate-/r/53.4%
Simplified53.4%
Taylor expanded in k around inf 64.0%
*-commutative64.0%
associate-*r*63.9%
times-frac64.9%
unpow264.9%
associate-*l*68.7%
unpow268.7%
Simplified68.7%
Taylor expanded in k around 0 57.1%
fma-def57.1%
unpow257.1%
unpow257.1%
associate-*r/57.1%
unpow257.1%
Simplified57.1%
Taylor expanded in l around 0 56.6%
associate-*r*56.6%
unpow256.6%
associate-*l*56.6%
unpow256.6%
unpow256.6%
associate-*l*57.1%
Simplified57.1%
Taylor expanded in k around 0 51.2%
unpow251.2%
unpow251.2%
times-frac55.4%
Simplified55.4%
Final simplification45.9%
(FPCore (t l k) :precision binary64 (* 2.0 (/ (* (/ l k) (/ l k)) (* k (* t k)))))
double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / k)) / (k * (t * 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) * (l / k)) / (k * (t * k)))
end function
public static double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / k)) / (k * (t * k)));
}
def code(t, l, k): return 2.0 * (((l / k) * (l / k)) / (k * (t * k)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) / Float64(k * Float64(t * k)))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l / k) * (l / k)) / (k * (t * k))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{k \cdot \left(t \cdot k\right)}
\end{array}
Initial program 56.4%
associate-/r*56.4%
associate-*l*50.2%
sqr-neg50.2%
associate-*l*56.4%
*-commutative56.4%
sqr-neg56.4%
associate-*l/56.7%
associate-*r/56.1%
associate-/r/56.1%
Simplified56.1%
Taylor expanded in k around inf 62.6%
*-commutative62.6%
associate-*r*62.6%
times-frac63.8%
unpow263.8%
associate-*l*65.7%
unpow265.7%
Simplified65.7%
Taylor expanded in k around 0 58.5%
fma-def58.5%
unpow258.5%
unpow258.5%
associate-*r/58.8%
unpow258.8%
Simplified58.8%
Taylor expanded in l around 0 57.5%
associate-*r*57.5%
unpow257.5%
associate-*l*57.5%
unpow257.5%
unpow257.5%
associate-*l*58.1%
Simplified58.1%
Taylor expanded in k around 0 54.3%
unpow254.3%
unpow254.3%
times-frac56.3%
Simplified56.3%
Final simplification56.3%
herbie shell --seed 2023275
(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))))