
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ 1.0 (+ 1.0 t_1)))
INFINITY)
(* l (* l (/ 2.0 (* (tan k) (* (+ 2.0 t_1) (* (pow t 3.0) (sin k)))))))
(* 2.0 (* (/ l k) (* (/ l k) (* (cos k) (/ (pow (sin k) -2.0) t))))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1))) <= ((double) INFINITY)) {
tmp = l * (l * (2.0 / (tan(k) * ((2.0 + t_1) * (pow(t, 3.0) * sin(k))))));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * (pow(sin(k), -2.0) / t))));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if (((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1))) <= Double.POSITIVE_INFINITY) {
tmp = l * (l * (2.0 / (Math.tan(k) * ((2.0 + t_1) * (Math.pow(t, 3.0) * Math.sin(k))))));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (Math.cos(k) * (Math.pow(Math.sin(k), -2.0) / t))));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * (1.0 + (1.0 + t_1))) <= math.inf: tmp = l * (l * (2.0 / (math.tan(k) * ((2.0 + t_1) * (math.pow(t, 3.0) * math.sin(k)))))) else: tmp = 2.0 * ((l / k) * ((l / k) * (math.cos(k) * (math.pow(math.sin(k), -2.0) / t)))) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1))) <= Inf) tmp = Float64(l * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(Float64(2.0 + t_1) * Float64((t ^ 3.0) * sin(k))))))); else tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(cos(k) * Float64((sin(k) ^ -2.0) / t))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1))) <= Inf) tmp = l * (l * (2.0 / (tan(k) * ((2.0 + t_1) * ((t ^ 3.0) * sin(k)))))); else tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * ((sin(k) ^ -2.0) / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(l * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + t$95$1), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right) \leq \infty:\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\left(2 + t_1\right) \cdot \left({t}^{3} \cdot \sin k\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \left(\cos k \cdot \frac{{\sin k}^{-2}}{t}\right)\right)\right)\\
\end{array}
\end{array}
if (*.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)) < +inf.0Initial program 76.4%
associate-/l/76.4%
associate-*l/78.1%
associate-*l/76.9%
associate-/r/76.7%
*-commutative76.7%
associate-/l/76.7%
associate-*r*76.7%
*-commutative76.7%
associate-*r*76.7%
*-commutative76.7%
Simplified76.7%
expm1-log1p-u60.2%
expm1-udef55.9%
associate-*l*58.1%
Applied egg-rr58.1%
expm1-def63.7%
expm1-log1p80.9%
*-commutative80.9%
Simplified80.9%
if +inf.0 < (*.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 0.0%
associate-/l/0.0%
associate-*l/0.0%
associate-*l/0.0%
associate-/r/0.0%
*-commutative0.0%
associate-/l/0.0%
associate-*r*0.0%
*-commutative0.0%
associate-*r*0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in k around inf 41.4%
*-commutative41.4%
times-frac40.1%
unpow240.1%
unpow240.1%
times-frac71.5%
Simplified71.5%
Taylor expanded in l around 0 41.4%
associate-/r*40.2%
associate-*r/40.2%
unpow240.2%
unpow240.2%
times-frac71.5%
unpow271.5%
*-commutative71.5%
*-commutative71.5%
times-frac71.6%
Simplified71.6%
pow271.6%
frac-times71.5%
associate-*r/68.1%
*-commutative68.1%
associate-*r/68.2%
frac-times74.2%
*-commutative74.2%
*-commutative74.2%
Applied egg-rr74.2%
times-frac68.2%
associate-*l/71.5%
*-commutative71.5%
un-div-inv71.5%
associate-*l*79.0%
associate-/r*79.0%
pow-flip79.0%
metadata-eval79.0%
Applied egg-rr79.0%
Final simplification80.3%
(FPCore (t l k)
:precision binary64
(if (<= k 4.6e-25)
(/
2.0
(* (/ k l) (/ (* (tan k) (+ 2.0 (pow (/ k t) 2.0))) (/ l (pow t 3.0)))))
(* 2.0 (* (/ l k) (* (/ l k) (* (cos k) (/ (pow (sin k) -2.0) t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.6e-25) {
tmp = 2.0 / ((k / l) * ((tan(k) * (2.0 + pow((k / t), 2.0))) / (l / pow(t, 3.0))));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * (pow(sin(k), -2.0) / 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 <= 4.6d-25) then
tmp = 2.0d0 / ((k / l) * ((tan(k) * (2.0d0 + ((k / t) ** 2.0d0))) / (l / (t ** 3.0d0))))
else
tmp = 2.0d0 * ((l / k) * ((l / k) * (cos(k) * ((sin(k) ** (-2.0d0)) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.6e-25) {
tmp = 2.0 / ((k / l) * ((Math.tan(k) * (2.0 + Math.pow((k / t), 2.0))) / (l / Math.pow(t, 3.0))));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (Math.cos(k) * (Math.pow(Math.sin(k), -2.0) / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4.6e-25: tmp = 2.0 / ((k / l) * ((math.tan(k) * (2.0 + math.pow((k / t), 2.0))) / (l / math.pow(t, 3.0)))) else: tmp = 2.0 * ((l / k) * ((l / k) * (math.cos(k) * (math.pow(math.sin(k), -2.0) / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4.6e-25) tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t) ^ 2.0))) / Float64(l / (t ^ 3.0))))); else tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(cos(k) * Float64((sin(k) ^ -2.0) / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.6e-25) tmp = 2.0 / ((k / l) * ((tan(k) * (2.0 + ((k / t) ^ 2.0))) / (l / (t ^ 3.0)))); else tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * ((sin(k) ^ -2.0) / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4.6e-25], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.6 \cdot 10^{-25}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \frac{\tan k \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}{\frac{\ell}{{t}^{3}}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \left(\cos k \cdot \frac{{\sin k}^{-2}}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 4.5999999999999998e-25Initial program 52.3%
associate-*l*52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in k around 0 52.3%
associate-/l*51.1%
unpow251.1%
associate-/l*56.5%
Simplified56.5%
associate-*l/49.0%
associate-+r+49.0%
metadata-eval49.0%
div-inv49.0%
clear-num49.0%
Applied egg-rr49.0%
times-frac59.2%
Simplified59.2%
if 4.5999999999999998e-25 < k Initial program 43.4%
associate-/l/43.4%
associate-*l/43.4%
associate-*l/43.4%
associate-/r/43.5%
*-commutative43.5%
associate-/l/43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in k around inf 71.5%
*-commutative71.5%
times-frac69.9%
unpow269.9%
unpow269.9%
times-frac86.4%
Simplified86.4%
Taylor expanded in l around 0 71.5%
associate-/r*70.0%
associate-*r/70.0%
unpow270.0%
unpow270.0%
times-frac86.3%
unpow286.3%
*-commutative86.3%
*-commutative86.3%
times-frac86.4%
Simplified86.4%
pow286.4%
frac-times86.3%
associate-*r/83.7%
*-commutative83.7%
associate-*r/83.8%
frac-times87.3%
*-commutative87.3%
*-commutative87.3%
Applied egg-rr87.3%
times-frac83.8%
associate-*l/86.4%
*-commutative86.4%
un-div-inv86.4%
associate-*l*91.7%
associate-/r*91.6%
pow-flip91.6%
metadata-eval91.6%
Applied egg-rr91.6%
Final simplification68.3%
(FPCore (t l k) :precision binary64 (if (<= k 1.45e-23) (/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l)))) (* 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.45e-23) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} 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.45d-23) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
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.45e-23) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} 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.45e-23: tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) 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.45e-23) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); 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.45e-23) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); 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.45e-23], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $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.45 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\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.4500000000000001e-23Initial program 52.3%
associate-*l*52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in k around 0 46.4%
associate-/l*45.9%
unpow245.9%
unpow245.9%
associate-/l*51.3%
Simplified51.3%
expm1-log1p-u36.8%
expm1-udef35.2%
associate-/r*35.2%
metadata-eval35.2%
associate-/r/34.5%
Applied egg-rr34.5%
expm1-def37.1%
expm1-log1p51.1%
unpow251.1%
times-frac46.4%
unpow246.4%
associate-/l*45.9%
unpow245.9%
associate-*r/51.3%
unpow251.3%
associate-*r/58.9%
associate-*r/53.5%
unpow253.5%
associate-/l*54.7%
unpow254.7%
times-frac60.0%
*-commutative60.0%
Simplified60.0%
if 1.4500000000000001e-23 < k Initial program 43.4%
associate-/l/43.4%
associate-*l/43.4%
associate-*l/43.4%
associate-/r/43.5%
*-commutative43.5%
associate-/l/43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in k around inf 71.5%
*-commutative71.5%
times-frac69.9%
unpow269.9%
unpow269.9%
times-frac86.4%
Simplified86.4%
Final simplification67.5%
(FPCore (t l k) :precision binary64 (if (<= k 2.9e-24) (/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l)))) (* 2.0 (* (/ l k) (* (/ l k) (* (cos k) (/ (pow (sin k) -2.0) t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.9e-24) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * (pow(sin(k), -2.0) / 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 <= 2.9d-24) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 * ((l / k) * ((l / k) * (cos(k) * ((sin(k) ** (-2.0d0)) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.9e-24) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((l / k) * ((l / k) * (Math.cos(k) * (Math.pow(Math.sin(k), -2.0) / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.9e-24: tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 * ((l / k) * ((l / k) * (math.cos(k) * (math.pow(math.sin(k), -2.0) / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.9e-24) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(cos(k) * Float64((sin(k) ^ -2.0) / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.9e-24) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); else tmp = 2.0 * ((l / k) * ((l / k) * (cos(k) * ((sin(k) ^ -2.0) / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.9e-24], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.9 \cdot 10^{-24}:\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \left(\cos k \cdot \frac{{\sin k}^{-2}}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 2.8999999999999999e-24Initial program 52.3%
associate-*l*52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in k around 0 46.4%
associate-/l*45.9%
unpow245.9%
unpow245.9%
associate-/l*51.3%
Simplified51.3%
expm1-log1p-u36.8%
expm1-udef35.2%
associate-/r*35.2%
metadata-eval35.2%
associate-/r/34.5%
Applied egg-rr34.5%
expm1-def37.1%
expm1-log1p51.1%
unpow251.1%
times-frac46.4%
unpow246.4%
associate-/l*45.9%
unpow245.9%
associate-*r/51.3%
unpow251.3%
associate-*r/58.9%
associate-*r/53.5%
unpow253.5%
associate-/l*54.7%
unpow254.7%
times-frac60.0%
*-commutative60.0%
Simplified60.0%
if 2.8999999999999999e-24 < k Initial program 43.4%
associate-/l/43.4%
associate-*l/43.4%
associate-*l/43.4%
associate-/r/43.5%
*-commutative43.5%
associate-/l/43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in k around inf 71.5%
*-commutative71.5%
times-frac69.9%
unpow269.9%
unpow269.9%
times-frac86.4%
Simplified86.4%
Taylor expanded in l around 0 71.5%
associate-/r*70.0%
associate-*r/70.0%
unpow270.0%
unpow270.0%
times-frac86.3%
unpow286.3%
*-commutative86.3%
*-commutative86.3%
times-frac86.4%
Simplified86.4%
pow286.4%
frac-times86.3%
associate-*r/83.7%
*-commutative83.7%
associate-*r/83.8%
frac-times87.3%
*-commutative87.3%
*-commutative87.3%
Applied egg-rr87.3%
times-frac83.8%
associate-*l/86.4%
*-commutative86.4%
un-div-inv86.4%
associate-*l*91.7%
associate-/r*91.6%
pow-flip91.6%
metadata-eval91.6%
Applied egg-rr91.6%
Final simplification68.9%
(FPCore (t l k)
:precision binary64
(if (<= k 9.5e-10)
(/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l))))
(*
2.0
(/ (* (cos k) (* l (/ l k))) (* k (* t (- 0.5 (/ (cos (+ k k)) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-10) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((cos(k) * (l * (l / k))) / (k * (t * (0.5 - (cos((k + 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.5d-10) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 * ((cos(k) * (l * (l / k))) / (k * (t * (0.5d0 - (cos((k + k)) / 2.0d0)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 9.5e-10) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((Math.cos(k) * (l * (l / k))) / (k * (t * (0.5 - (Math.cos((k + k)) / 2.0)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 9.5e-10: tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 * ((math.cos(k) * (l * (l / k))) / (k * (t * (0.5 - (math.cos((k + k)) / 2.0))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 9.5e-10) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(l * Float64(l / k))) / Float64(k * Float64(t * Float64(0.5 - Float64(cos(Float64(k + k)) / 2.0)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 9.5e-10) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); else tmp = 2.0 * ((cos(k) * (l * (l / k))) / (k * (t * (0.5 - (cos((k + k)) / 2.0))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 9.5e-10], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * N[(t * N[(0.5 - N[(N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 9.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\ell \cdot \frac{\ell}{k}\right)}{k \cdot \left(t \cdot \left(0.5 - \frac{\cos \left(k + k\right)}{2}\right)\right)}\\
\end{array}
\end{array}
if k < 9.50000000000000028e-10Initial program 51.5%
associate-*l*51.5%
+-commutative51.5%
Simplified51.5%
Taylor expanded in k around 0 45.7%
associate-/l*45.2%
unpow245.2%
unpow245.2%
associate-/l*50.5%
Simplified50.5%
expm1-log1p-u36.2%
expm1-udef34.7%
associate-/r*34.7%
metadata-eval34.7%
associate-/r/34.0%
Applied egg-rr34.0%
expm1-def36.5%
expm1-log1p50.3%
unpow250.3%
times-frac45.7%
unpow245.7%
associate-/l*45.2%
unpow245.2%
associate-*r/50.5%
unpow250.5%
associate-*r/58.1%
associate-*r/52.7%
unpow252.7%
associate-/l*53.9%
unpow253.9%
times-frac59.1%
*-commutative59.1%
Simplified59.1%
if 9.50000000000000028e-10 < k Initial program 45.2%
associate-/l/45.2%
associate-*l/45.2%
associate-*l/45.2%
associate-/r/45.3%
*-commutative45.3%
associate-/l/45.3%
associate-*r*45.3%
*-commutative45.3%
associate-*r*45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in k around inf 71.7%
*-commutative71.7%
times-frac70.1%
unpow270.1%
unpow270.1%
times-frac87.3%
Simplified87.3%
Taylor expanded in l around 0 71.7%
associate-/r*70.1%
associate-*r/70.1%
unpow270.1%
unpow270.1%
times-frac87.2%
unpow287.2%
*-commutative87.2%
*-commutative87.2%
times-frac87.3%
Simplified87.3%
pow287.3%
frac-times87.2%
associate-*r/84.4%
*-commutative84.4%
associate-*r/84.5%
frac-times88.3%
*-commutative88.3%
*-commutative88.3%
Applied egg-rr88.3%
unpow288.3%
sin-mult88.1%
Applied egg-rr88.1%
div-sub88.1%
+-inverses88.1%
cos-088.1%
metadata-eval88.1%
Simplified88.1%
Final simplification66.9%
(FPCore (t l k) :precision binary64 (if (<= k 2.5e-23) (/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l)))) (* (* l l) (/ 2.0 (* (tan k) (* k (* k (* t (sin k)))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-23) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else {
tmp = (l * l) * (2.0 / (tan(k) * (k * (k * (t * sin(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 <= 2.5d-23) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else
tmp = (l * l) * (2.0d0 / (tan(k) * (k * (k * (t * sin(k))))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-23) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else {
tmp = (l * l) * (2.0 / (Math.tan(k) * (k * (k * (t * Math.sin(k))))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.5e-23: tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) else: tmp = (l * l) * (2.0 / (math.tan(k) * (k * (k * (t * math.sin(k)))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.5e-23) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); else tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(tan(k) * Float64(k * Float64(k * Float64(t * sin(k))))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-23) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); else tmp = (l * l) * (2.0 / (tan(k) * (k * (k * (t * sin(k)))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.5e-23], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\tan k \cdot \left(k \cdot \left(k \cdot \left(t \cdot \sin k\right)\right)\right)}\\
\end{array}
\end{array}
if k < 2.5000000000000001e-23Initial program 52.3%
associate-*l*52.3%
+-commutative52.3%
Simplified52.3%
Taylor expanded in k around 0 46.4%
associate-/l*45.9%
unpow245.9%
unpow245.9%
associate-/l*51.3%
Simplified51.3%
expm1-log1p-u36.8%
expm1-udef35.2%
associate-/r*35.2%
metadata-eval35.2%
associate-/r/34.5%
Applied egg-rr34.5%
expm1-def37.1%
expm1-log1p51.1%
unpow251.1%
times-frac46.4%
unpow246.4%
associate-/l*45.9%
unpow245.9%
associate-*r/51.3%
unpow251.3%
associate-*r/58.9%
associate-*r/53.5%
unpow253.5%
associate-/l*54.7%
unpow254.7%
times-frac60.0%
*-commutative60.0%
Simplified60.0%
if 2.5000000000000001e-23 < k Initial program 43.4%
associate-/l/43.4%
associate-*l/43.4%
associate-*l/43.4%
associate-/r/43.5%
*-commutative43.5%
associate-/l/43.5%
associate-*r*43.5%
*-commutative43.5%
associate-*r*43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in k around inf 71.4%
unpow271.4%
associate-*l*78.3%
Simplified78.3%
Final simplification65.2%
(FPCore (t l k)
:precision binary64
(if (<= t -2.8e-29)
(/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l))))
(if (<= t 1.5e-65)
(*
2.0
(*
(* (/ l k) (/ l k))
(* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t)))))
(/ (pow (/ l k) 2.0) (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if (t <= -2.8e-29) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else if (t <= 1.5e-65) {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
} else {
tmp = pow((l / k), 2.0) / pow(t, 3.0);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-2.8d-29)) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else if (t <= 1.5d-65) then
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
else
tmp = ((l / k) ** 2.0d0) / (t ** 3.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -2.8e-29) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else if (t <= 1.5e-65) {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
} else {
tmp = Math.pow((l / k), 2.0) / Math.pow(t, 3.0);
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -2.8e-29: tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) elif t <= 1.5e-65: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) else: tmp = math.pow((l / k), 2.0) / math.pow(t, 3.0) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -2.8e-29) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); elseif (t <= 1.5e-65) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); else tmp = Float64((Float64(l / k) ^ 2.0) / (t ^ 3.0)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -2.8e-29) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); elseif (t <= 1.5e-65) tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); else tmp = ((l / k) ^ 2.0) / (t ^ 3.0); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -2.8e-29], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-65], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-65}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t}^{3}}\\
\end{array}
\end{array}
if t < -2.8000000000000002e-29Initial program 64.3%
associate-*l*64.3%
+-commutative64.3%
Simplified64.3%
Taylor expanded in k around 0 55.5%
associate-/l*55.4%
unpow255.4%
unpow255.4%
associate-/l*59.0%
Simplified59.0%
expm1-log1p-u47.7%
expm1-udef44.7%
associate-/r*44.7%
metadata-eval44.7%
associate-/r/44.6%
Applied egg-rr44.6%
expm1-def47.6%
expm1-log1p57.5%
unpow257.5%
times-frac55.5%
unpow255.5%
associate-/l*55.4%
unpow255.4%
associate-*r/59.0%
unpow259.0%
associate-*r/67.4%
associate-*r/63.8%
unpow263.8%
associate-/l*65.8%
unpow265.8%
times-frac67.9%
*-commutative67.9%
Simplified67.9%
if -2.8000000000000002e-29 < t < 1.49999999999999999e-65Initial program 36.1%
associate-/l/36.1%
associate-*l/36.1%
associate-*l/36.0%
associate-/r/36.0%
*-commutative36.0%
associate-/l/36.0%
associate-*r*36.0%
*-commutative36.0%
associate-*r*36.0%
*-commutative36.0%
Simplified36.0%
Taylor expanded in k around inf 66.7%
*-commutative66.7%
times-frac66.6%
unpow266.6%
unpow266.6%
times-frac87.4%
Simplified87.4%
div-inv87.3%
Applied egg-rr87.3%
Taylor expanded in k around 0 68.4%
+-commutative68.4%
unpow268.4%
associate-*r/68.4%
metadata-eval68.4%
Simplified68.4%
if 1.49999999999999999e-65 < t Initial program 56.8%
associate-/l/56.8%
associate-*l/57.9%
associate-*l/57.1%
associate-/r/56.7%
*-commutative56.7%
associate-/l/56.7%
associate-*r*56.7%
*-commutative56.7%
associate-*r*56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in k around 0 45.6%
unpow245.6%
*-commutative45.6%
times-frac49.6%
unpow249.6%
Simplified49.6%
Taylor expanded in l around 0 45.6%
associate-/r*45.6%
unpow245.6%
unpow245.6%
times-frac62.5%
unpow262.5%
Simplified62.5%
Final simplification66.4%
(FPCore (t l k)
:precision binary64
(if (or (<= t -1.15e-33) (not (<= t 4.4e-64)))
(/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l))))
(*
2.0
(*
(* (/ l k) (/ l k))
(* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.15e-33) || !(t <= 4.4e-64)) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / 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 ((t <= (-1.15d-33)) .or. (.not. (t <= 4.4d-64))) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.15e-33) || !(t <= 4.4e-64)) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -1.15e-33) or not (t <= 4.4e-64): tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -1.15e-33) || !(t <= 4.4e-64)) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.15e-33) || ~((t <= 4.4e-64))) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.15e-33], N[Not[LessEqual[t, 4.4e-64]], $MachinePrecision]], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-33} \lor \neg \left(t \leq 4.4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\end{array}
\end{array}
if t < -1.14999999999999993e-33 or 4.3999999999999999e-64 < t Initial program 60.0%
associate-*l*60.0%
+-commutative60.0%
Simplified60.0%
Taylor expanded in k around 0 49.9%
associate-/l*49.2%
unpow249.2%
unpow249.2%
associate-/l*53.9%
Simplified53.9%
expm1-log1p-u48.8%
expm1-udef46.9%
associate-/r*46.9%
metadata-eval46.9%
associate-/r/46.1%
Applied egg-rr46.1%
expm1-def48.6%
expm1-log1p53.0%
unpow253.0%
times-frac49.9%
unpow249.9%
associate-/l*49.2%
unpow249.2%
associate-*r/53.9%
unpow253.9%
associate-*r/63.3%
associate-*r/58.6%
unpow258.6%
associate-/l*60.1%
unpow260.1%
times-frac64.7%
*-commutative64.7%
Simplified64.7%
if -1.14999999999999993e-33 < t < 4.3999999999999999e-64Initial program 36.1%
associate-/l/36.1%
associate-*l/36.1%
associate-*l/36.0%
associate-/r/36.0%
*-commutative36.0%
associate-/l/36.0%
associate-*r*36.0%
*-commutative36.0%
associate-*r*36.0%
*-commutative36.0%
Simplified36.0%
Taylor expanded in k around inf 66.7%
*-commutative66.7%
times-frac66.6%
unpow266.6%
unpow266.6%
times-frac87.4%
Simplified87.4%
div-inv87.3%
Applied egg-rr87.3%
Taylor expanded in k around 0 68.4%
+-commutative68.4%
unpow268.4%
associate-*r/68.4%
metadata-eval68.4%
Simplified68.4%
Final simplification66.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))) (t_2 (* (* l (pow t -3.0)) (/ l (* k k)))))
(if (<= t -1.1e-48)
t_2
(if (<= t 9e-67)
(* 2.0 (* (/ t_1 t) (+ (/ 1.0 (* k k)) -0.16666666666666666)))
(if (<= t 2.35e+107) t_2 (* 2.0 (* t_1 (/ 1.0 (* k (* t k))))))))))
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = (l * pow(t, -3.0)) * (l / (k * k));
double tmp;
if (t <= -1.1e-48) {
tmp = t_2;
} else if (t <= 9e-67) {
tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666));
} else if (t <= 2.35e+107) {
tmp = t_2;
} else {
tmp = 2.0 * (t_1 * (1.0 / (k * (t * k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) * (l / k)
t_2 = (l * (t ** (-3.0d0))) * (l / (k * k))
if (t <= (-1.1d-48)) then
tmp = t_2
else if (t <= 9d-67) then
tmp = 2.0d0 * ((t_1 / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
else if (t <= 2.35d+107) then
tmp = t_2
else
tmp = 2.0d0 * (t_1 * (1.0d0 / (k * (t * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = (l * Math.pow(t, -3.0)) * (l / (k * k));
double tmp;
if (t <= -1.1e-48) {
tmp = t_2;
} else if (t <= 9e-67) {
tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666));
} else if (t <= 2.35e+107) {
tmp = t_2;
} else {
tmp = 2.0 * (t_1 * (1.0 / (k * (t * k))));
}
return tmp;
}
def code(t, l, k): t_1 = (l / k) * (l / k) t_2 = (l * math.pow(t, -3.0)) * (l / (k * k)) tmp = 0 if t <= -1.1e-48: tmp = t_2 elif t <= 9e-67: tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666)) elif t <= 2.35e+107: tmp = t_2 else: tmp = 2.0 * (t_1 * (1.0 / (k * (t * k)))) return tmp
function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) t_2 = Float64(Float64(l * (t ^ -3.0)) * Float64(l / Float64(k * k))) tmp = 0.0 if (t <= -1.1e-48) tmp = t_2; elseif (t <= 9e-67) tmp = Float64(2.0 * Float64(Float64(t_1 / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); elseif (t <= 2.35e+107) tmp = t_2; else tmp = Float64(2.0 * Float64(t_1 * Float64(1.0 / Float64(k * Float64(t * k))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); t_2 = (l * (t ^ -3.0)) * (l / (k * k)); tmp = 0.0; if (t <= -1.1e-48) tmp = t_2; elseif (t <= 9e-67) tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666)); elseif (t <= 2.35e+107) tmp = t_2; else tmp = 2.0 * (t_1 * (1.0 / (k * (t * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e-48], t$95$2, If[LessEqual[t, 9e-67], N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e+107], t$95$2, N[(2.0 * N[(t$95$1 * N[(1.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
t_2 := \left(\ell \cdot {t}^{-3}\right) \cdot \frac{\ell}{k \cdot k}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-67}:\\
\;\;\;\;2 \cdot \left(\frac{t_1}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+107}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \frac{1}{k \cdot \left(t \cdot k\right)}\right)\\
\end{array}
\end{array}
if t < -1.10000000000000006e-48 or 9.00000000000000031e-67 < t < 2.35e107Initial program 67.9%
associate-/l/67.9%
associate-*l/70.6%
associate-*l/68.7%
associate-/r/68.4%
*-commutative68.4%
associate-/l/68.4%
associate-*r*68.4%
*-commutative68.4%
associate-*r*68.4%
*-commutative68.4%
Simplified68.4%
Taylor expanded in k around 0 58.0%
unpow258.0%
*-commutative58.0%
times-frac61.2%
unpow261.2%
Simplified61.2%
expm1-log1p-u56.2%
expm1-udef48.6%
div-inv48.6%
pow-flip48.6%
metadata-eval48.6%
Applied egg-rr48.6%
expm1-def56.3%
expm1-log1p61.2%
Simplified61.2%
if -1.10000000000000006e-48 < t < 9.00000000000000031e-67Initial program 34.8%
associate-/l/34.8%
associate-*l/34.8%
associate-*l/34.8%
associate-/r/34.9%
*-commutative34.9%
associate-/l/34.9%
associate-*r*34.9%
*-commutative34.9%
associate-*r*34.9%
*-commutative34.9%
Simplified34.9%
Taylor expanded in k around inf 67.0%
*-commutative67.0%
times-frac66.8%
unpow266.8%
unpow266.8%
times-frac87.7%
Simplified87.7%
Taylor expanded in l around 0 67.0%
associate-/r*67.1%
associate-*r/67.1%
unpow267.1%
unpow267.1%
times-frac88.0%
unpow288.0%
*-commutative88.0%
*-commutative88.0%
times-frac88.7%
Simplified88.7%
Taylor expanded in k around 0 64.6%
sub-neg64.6%
unpow264.6%
metadata-eval64.6%
Simplified64.6%
pow264.6%
Applied egg-rr64.6%
if 2.35e107 < t Initial program 41.6%
associate-/l/41.6%
associate-*l/41.6%
associate-*l/41.6%
associate-/r/41.6%
*-commutative41.6%
associate-/l/41.6%
associate-*r*41.6%
*-commutative41.6%
associate-*r*41.6%
*-commutative41.6%
Simplified41.6%
Taylor expanded in k around inf 43.6%
*-commutative43.6%
times-frac41.6%
unpow241.6%
unpow241.6%
times-frac44.0%
Simplified44.0%
Taylor expanded in k around 0 45.9%
unpow245.9%
associate-*l*45.9%
Simplified45.9%
Final simplification59.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))) (t_2 (/ l (* k k))))
(if (<= t -4.6e-50)
(* (* l (pow t -3.0)) t_2)
(if (<= t 1.6e-64)
(* 2.0 (* (/ t_1 t) (+ (/ 1.0 (* k k)) -0.16666666666666666)))
(if (<= t 6.5e+102)
(* (/ l (pow t 3.0)) t_2)
(* 2.0 (* t_1 (/ 1.0 (* k (* t k))))))))))
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = l / (k * k);
double tmp;
if (t <= -4.6e-50) {
tmp = (l * pow(t, -3.0)) * t_2;
} else if (t <= 1.6e-64) {
tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666));
} else if (t <= 6.5e+102) {
tmp = (l / pow(t, 3.0)) * t_2;
} else {
tmp = 2.0 * (t_1 * (1.0 / (k * (t * k))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) * (l / k)
t_2 = l / (k * k)
if (t <= (-4.6d-50)) then
tmp = (l * (t ** (-3.0d0))) * t_2
else if (t <= 1.6d-64) then
tmp = 2.0d0 * ((t_1 / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
else if (t <= 6.5d+102) then
tmp = (l / (t ** 3.0d0)) * t_2
else
tmp = 2.0d0 * (t_1 * (1.0d0 / (k * (t * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = l / (k * k);
double tmp;
if (t <= -4.6e-50) {
tmp = (l * Math.pow(t, -3.0)) * t_2;
} else if (t <= 1.6e-64) {
tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666));
} else if (t <= 6.5e+102) {
tmp = (l / Math.pow(t, 3.0)) * t_2;
} else {
tmp = 2.0 * (t_1 * (1.0 / (k * (t * k))));
}
return tmp;
}
def code(t, l, k): t_1 = (l / k) * (l / k) t_2 = l / (k * k) tmp = 0 if t <= -4.6e-50: tmp = (l * math.pow(t, -3.0)) * t_2 elif t <= 1.6e-64: tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666)) elif t <= 6.5e+102: tmp = (l / math.pow(t, 3.0)) * t_2 else: tmp = 2.0 * (t_1 * (1.0 / (k * (t * k)))) return tmp
function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) t_2 = Float64(l / Float64(k * k)) tmp = 0.0 if (t <= -4.6e-50) tmp = Float64(Float64(l * (t ^ -3.0)) * t_2); elseif (t <= 1.6e-64) tmp = Float64(2.0 * Float64(Float64(t_1 / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); elseif (t <= 6.5e+102) tmp = Float64(Float64(l / (t ^ 3.0)) * t_2); else tmp = Float64(2.0 * Float64(t_1 * Float64(1.0 / Float64(k * Float64(t * k))))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); t_2 = l / (k * k); tmp = 0.0; if (t <= -4.6e-50) tmp = (l * (t ^ -3.0)) * t_2; elseif (t <= 1.6e-64) tmp = 2.0 * ((t_1 / t) * ((1.0 / (k * k)) + -0.16666666666666666)); elseif (t <= 6.5e+102) tmp = (l / (t ^ 3.0)) * t_2; else tmp = 2.0 * (t_1 * (1.0 / (k * (t * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.6e-50], N[(N[(l * N[Power[t, -3.0], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[t, 1.6e-64], N[(2.0 * N[(N[(t$95$1 / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+102], N[(N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(1.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
t_2 := \frac{\ell}{k \cdot k}\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{-50}:\\
\;\;\;\;\left(\ell \cdot {t}^{-3}\right) \cdot t_2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-64}:\\
\;\;\;\;2 \cdot \left(\frac{t_1}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{{t}^{3}} \cdot t_2\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \frac{1}{k \cdot \left(t \cdot k\right)}\right)\\
\end{array}
\end{array}
if t < -4.60000000000000039e-50Initial program 64.1%
associate-/l/64.1%
associate-*l/67.0%
associate-*l/65.0%
associate-/r/65.0%
*-commutative65.0%
associate-/l/65.0%
associate-*r*65.0%
*-commutative65.0%
associate-*r*65.0%
*-commutative65.0%
Simplified65.0%
Taylor expanded in k around 0 55.9%
unpow255.9%
*-commutative55.9%
times-frac59.1%
unpow259.1%
Simplified59.1%
expm1-log1p-u54.5%
expm1-udef45.9%
div-inv45.9%
pow-flip45.9%
metadata-eval45.9%
Applied egg-rr45.9%
expm1-def54.6%
expm1-log1p59.2%
Simplified59.2%
if -4.60000000000000039e-50 < t < 1.59999999999999988e-64Initial program 34.8%
associate-/l/34.8%
associate-*l/34.8%
associate-*l/34.8%
associate-/r/34.9%
*-commutative34.9%
associate-/l/34.9%
associate-*r*34.9%
*-commutative34.9%
associate-*r*34.9%
*-commutative34.9%
Simplified34.9%
Taylor expanded in k around inf 67.0%
*-commutative67.0%
times-frac66.8%
unpow266.8%
unpow266.8%
times-frac87.7%
Simplified87.7%
Taylor expanded in l around 0 67.0%
associate-/r*67.1%
associate-*r/67.1%
unpow267.1%
unpow267.1%
times-frac88.0%
unpow288.0%
*-commutative88.0%
*-commutative88.0%
times-frac88.7%
Simplified88.7%
Taylor expanded in k around 0 64.6%
sub-neg64.6%
unpow264.6%
metadata-eval64.6%
Simplified64.6%
pow264.6%
Applied egg-rr64.6%
if 1.59999999999999988e-64 < t < 6.5000000000000004e102Initial program 74.8%
associate-/l/74.8%
associate-*l/77.3%
associate-*l/75.5%
associate-/r/74.6%
*-commutative74.6%
associate-/l/74.6%
associate-*r*74.6%
*-commutative74.6%
associate-*r*74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in k around 0 61.9%
unpow261.9%
*-commutative61.9%
times-frac64.9%
unpow264.9%
Simplified64.9%
if 6.5000000000000004e102 < t Initial program 41.6%
associate-/l/41.6%
associate-*l/41.6%
associate-*l/41.6%
associate-/r/41.6%
*-commutative41.6%
associate-/l/41.6%
associate-*r*41.6%
*-commutative41.6%
associate-*r*41.6%
*-commutative41.6%
Simplified41.6%
Taylor expanded in k around inf 43.6%
*-commutative43.6%
times-frac41.6%
unpow241.6%
unpow241.6%
times-frac44.0%
Simplified44.0%
Taylor expanded in k around 0 45.9%
unpow245.9%
associate-*l*45.9%
Simplified45.9%
Final simplification59.9%
(FPCore (t l k)
:precision binary64
(if (or (<= t -3.6e-45) (not (<= t 2.25e-98)))
(/ 1.0 (* k (* (/ k l) (/ (pow t 3.0) l))))
(*
2.0
(* (/ (* (/ l k) (/ l k)) t) (+ (/ 1.0 (* k k)) -0.16666666666666666)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -3.6e-45) || !(t <= 2.25e-98)) {
tmp = 1.0 / (k * ((k / l) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-3.6d-45)) .or. (.not. (t <= 2.25d-98))) then
tmp = 1.0d0 / (k * ((k / l) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -3.6e-45) || !(t <= 2.25e-98)) {
tmp = 1.0 / (k * ((k / l) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -3.6e-45) or not (t <= 2.25e-98): tmp = 1.0 / (k * ((k / l) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -3.6e-45) || !(t <= 2.25e-98)) tmp = Float64(1.0 / Float64(k * Float64(Float64(k / l) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -3.6e-45) || ~((t <= 2.25e-98))) tmp = 1.0 / (k * ((k / l) * ((t ^ 3.0) / l))); else tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -3.6e-45], N[Not[LessEqual[t, 2.25e-98]], $MachinePrecision]], N[(1.0 / N[(k * N[(N[(k / l), $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{-45} \lor \neg \left(t \leq 2.25 \cdot 10^{-98}\right):\\
\;\;\;\;\frac{1}{k \cdot \left(\frac{k}{\ell} \cdot \frac{{t}^{3}}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if t < -3.60000000000000001e-45 or 2.24999999999999998e-98 < t Initial program 60.8%
associate-*l*60.8%
+-commutative60.8%
Simplified60.8%
Taylor expanded in k around 0 51.2%
associate-/l*50.6%
unpow250.6%
unpow250.6%
associate-/l*55.0%
Simplified55.0%
expm1-log1p-u48.9%
expm1-udef47.1%
associate-/r*47.1%
metadata-eval47.1%
associate-/r/46.3%
Applied egg-rr46.3%
expm1-def48.7%
expm1-log1p54.1%
unpow254.1%
times-frac51.2%
unpow251.2%
associate-/l*50.6%
unpow250.6%
associate-*r/55.0%
unpow255.0%
associate-*r/63.9%
associate-*r/59.5%
unpow259.5%
associate-/l*60.9%
unpow260.9%
times-frac65.3%
*-commutative65.3%
Simplified65.3%
if -3.60000000000000001e-45 < t < 2.24999999999999998e-98Initial program 33.0%
associate-/l/33.0%
associate-*l/33.0%
associate-*l/32.9%
associate-/r/32.9%
*-commutative32.9%
associate-/l/32.9%
associate-*r*32.9%
*-commutative32.9%
associate-*r*32.9%
*-commutative32.9%
Simplified32.9%
Taylor expanded in k around inf 66.0%
*-commutative66.0%
times-frac65.9%
unpow265.9%
unpow265.9%
times-frac86.4%
Simplified86.4%
Taylor expanded in l around 0 66.0%
associate-/r*66.2%
associate-*r/66.2%
unpow266.2%
unpow266.2%
times-frac86.7%
unpow286.7%
*-commutative86.7%
*-commutative86.7%
times-frac87.4%
Simplified87.4%
Taylor expanded in k around 0 63.6%
sub-neg63.6%
unpow263.6%
metadata-eval63.6%
Simplified63.6%
pow263.6%
Applied egg-rr63.6%
Final simplification64.6%
(FPCore (t l k)
:precision binary64
(if (or (<= t -5.4e-45) (not (<= t 1.9e-62)))
(/ (* l l) (* k (* (pow t 3.0) k)))
(*
2.0
(* (/ (* (/ l k) (/ l k)) t) (+ (/ 1.0 (* k k)) -0.16666666666666666)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -5.4e-45) || !(t <= 1.9e-62)) {
tmp = (l * l) / (k * (pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5.4d-45)) .or. (.not. (t <= 1.9d-62))) then
tmp = (l * l) / (k * ((t ** 3.0d0) * k))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -5.4e-45) || !(t <= 1.9e-62)) {
tmp = (l * l) / (k * (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -5.4e-45) or not (t <= 1.9e-62): tmp = (l * l) / (k * (math.pow(t, 3.0) * k)) else: tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -5.4e-45) || !(t <= 1.9e-62)) tmp = Float64(Float64(l * l) / Float64(k * Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -5.4e-45) || ~((t <= 1.9e-62))) tmp = (l * l) / (k * ((t ^ 3.0) * k)); else tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -5.4e-45], N[Not[LessEqual[t, 1.9e-62]], $MachinePrecision]], N[(N[(l * l), $MachinePrecision] / N[(k * N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-45} \lor \neg \left(t \leq 1.9 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left({t}^{3} \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if t < -5.3999999999999997e-45 or 1.90000000000000003e-62 < t Initial program 60.8%
associate-/l/60.8%
associate-*l/62.8%
associate-*l/61.5%
associate-/r/61.3%
*-commutative61.3%
associate-/l/61.3%
associate-*r*61.3%
*-commutative61.3%
associate-*r*61.3%
*-commutative61.3%
Simplified61.3%
Taylor expanded in k around 0 50.9%
unpow250.9%
*-commutative50.9%
unpow250.9%
Simplified50.9%
Taylor expanded in t around 0 50.9%
unpow250.9%
associate-*l*59.6%
Simplified59.6%
if -5.3999999999999997e-45 < t < 1.90000000000000003e-62Initial program 34.3%
associate-/l/34.3%
associate-*l/34.3%
associate-*l/34.2%
associate-/r/34.2%
*-commutative34.2%
associate-/l/34.2%
associate-*r*34.2%
*-commutative34.2%
associate-*r*34.2%
*-commutative34.2%
Simplified34.2%
Taylor expanded in k around inf 65.7%
*-commutative65.7%
times-frac65.6%
unpow265.6%
unpow265.6%
times-frac87.0%
Simplified87.0%
Taylor expanded in l around 0 65.7%
associate-/r*66.0%
associate-*r/65.9%
unpow265.9%
unpow265.9%
times-frac87.3%
unpow287.3%
*-commutative87.3%
*-commutative87.3%
times-frac88.0%
Simplified88.0%
Taylor expanded in k around 0 64.4%
sub-neg64.4%
unpow264.4%
metadata-eval64.4%
Simplified64.4%
pow264.4%
Applied egg-rr64.4%
Final simplification61.6%
(FPCore (t l k)
:precision binary64
(if (<= l 1.92e-236)
(* 2.0 (* (/ (* l l) t) -0.058333333333333334))
(if (<= l 3.7e+227)
(* 2.0 (* (/ l t) (/ l (pow k 4.0))))
(*
2.0
(*
(/ (* (/ l k) (/ l k)) t)
(+ (/ 1.0 (* k k)) -0.16666666666666666))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.92e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else if (l <= 3.7e+227) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
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 (l <= 1.92d-236) then
tmp = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
else if (l <= 3.7d+227) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.92e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else if (l <= 3.7e+227) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.92e-236: tmp = 2.0 * (((l * l) / t) * -0.058333333333333334) elif l <= 3.7e+227: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) else: tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.92e-236) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)); elseif (l <= 3.7e+227) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.92e-236) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); elseif (l <= 3.7e+227) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); else tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.92e-236], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.7e+227], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.92 \cdot 10^{-236}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)\\
\mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+227}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if l < 1.92e-236Initial program 49.7%
associate-/l/49.7%
associate-*l/51.1%
associate-*l/50.3%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.2%
*-commutative54.2%
times-frac55.0%
unpow255.0%
unpow255.0%
times-frac62.6%
Simplified62.6%
Taylor expanded in k around 0 34.5%
fma-def34.5%
unpow234.5%
unpow234.5%
associate-*r/34.5%
metadata-eval34.5%
Simplified34.5%
Taylor expanded in k around inf 33.3%
*-commutative33.3%
unpow233.3%
Simplified33.3%
if 1.92e-236 < l < 3.6999999999999999e227Initial program 53.7%
associate-/l/53.7%
associate-*l/54.7%
associate-*l/53.7%
associate-/r/53.7%
*-commutative53.7%
associate-/l/53.7%
associate-*r*53.7%
*-commutative53.7%
associate-*r*53.7%
*-commutative53.7%
Simplified53.7%
Taylor expanded in k around inf 55.7%
*-commutative55.7%
times-frac55.5%
unpow255.5%
unpow255.5%
times-frac68.5%
Simplified68.5%
Taylor expanded in k around 0 47.7%
unpow247.7%
*-commutative47.7%
times-frac54.2%
Simplified54.2%
if 3.6999999999999999e227 < l Initial program 27.1%
associate-/l/27.1%
associate-*l/27.1%
associate-*l/27.1%
associate-/r/27.1%
*-commutative27.1%
associate-/l/27.1%
associate-*r*27.1%
*-commutative27.1%
associate-*r*27.1%
*-commutative27.1%
Simplified27.1%
Taylor expanded in k around inf 47.7%
*-commutative47.7%
times-frac47.7%
unpow247.7%
unpow247.7%
times-frac80.1%
Simplified80.1%
Taylor expanded in l around 0 47.7%
associate-/r*47.7%
associate-*r/47.7%
unpow247.7%
unpow247.7%
times-frac80.1%
unpow280.1%
*-commutative80.1%
*-commutative80.1%
times-frac80.4%
Simplified80.4%
Taylor expanded in k around 0 41.8%
sub-neg41.8%
unpow241.8%
metadata-eval41.8%
Simplified41.8%
pow241.8%
Applied egg-rr41.8%
Final simplification41.3%
(FPCore (t l k)
:precision binary64
(if (<= l 4.4e-234)
(* 2.0 (* (/ (* l l) t) -0.058333333333333334))
(if (<= l 9.6e+228)
(* 2.0 (/ (/ l (/ t l)) (pow k 4.0)))
(*
2.0
(*
(/ (* (/ l k) (/ l k)) t)
(+ (/ 1.0 (* k k)) -0.16666666666666666))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 4.4e-234) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else if (l <= 9.6e+228) {
tmp = 2.0 * ((l / (t / l)) / pow(k, 4.0));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
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 (l <= 4.4d-234) then
tmp = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
else if (l <= 9.6d+228) then
tmp = 2.0d0 * ((l / (t / l)) / (k ** 4.0d0))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 4.4e-234) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else if (l <= 9.6e+228) {
tmp = 2.0 * ((l / (t / l)) / Math.pow(k, 4.0));
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 4.4e-234: tmp = 2.0 * (((l * l) / t) * -0.058333333333333334) elif l <= 9.6e+228: tmp = 2.0 * ((l / (t / l)) / math.pow(k, 4.0)) else: tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 4.4e-234) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)); elseif (l <= 9.6e+228) tmp = Float64(2.0 * Float64(Float64(l / Float64(t / l)) / (k ^ 4.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 4.4e-234) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); elseif (l <= 9.6e+228) tmp = 2.0 * ((l / (t / l)) / (k ^ 4.0)); else tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 4.4e-234], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 9.6e+228], N[(2.0 * N[(N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.4 \cdot 10^{-234}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)\\
\mathbf{elif}\;\ell \leq 9.6 \cdot 10^{+228}:\\
\;\;\;\;2 \cdot \frac{\frac{\ell}{\frac{t}{\ell}}}{{k}^{4}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if l < 4.3999999999999998e-234Initial program 49.8%
associate-/l/49.8%
associate-*l/51.1%
associate-*l/50.3%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.2%
*-commutative54.2%
times-frac55.0%
unpow255.0%
unpow255.0%
times-frac62.4%
Simplified62.4%
Taylor expanded in k around 0 34.1%
fma-def34.1%
unpow234.1%
unpow234.1%
associate-*r/34.1%
metadata-eval34.1%
Simplified34.1%
Taylor expanded in k around inf 33.5%
*-commutative33.5%
unpow233.5%
Simplified33.5%
if 4.3999999999999998e-234 < l < 9.59999999999999954e228Initial program 53.8%
associate-/l/53.8%
associate-*l/54.8%
associate-*l/53.8%
associate-/r/53.8%
*-commutative53.8%
associate-/l/53.8%
associate-*r*53.8%
*-commutative53.8%
associate-*r*53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in k around inf 55.8%
*-commutative55.8%
times-frac55.6%
unpow255.6%
unpow255.6%
times-frac68.9%
Simplified68.9%
Taylor expanded in l around 0 55.8%
associate-/r*55.6%
associate-*r/55.6%
unpow255.6%
unpow255.6%
times-frac68.8%
unpow268.8%
*-commutative68.8%
*-commutative68.8%
times-frac68.9%
Simplified68.9%
Taylor expanded in k around 0 47.7%
*-commutative47.7%
associate-/r*49.7%
unpow249.7%
associate-/l*55.2%
Simplified55.2%
if 9.59999999999999954e228 < l Initial program 27.1%
associate-/l/27.1%
associate-*l/27.1%
associate-*l/27.1%
associate-/r/27.1%
*-commutative27.1%
associate-/l/27.1%
associate-*r*27.1%
*-commutative27.1%
associate-*r*27.1%
*-commutative27.1%
Simplified27.1%
Taylor expanded in k around inf 47.7%
*-commutative47.7%
times-frac47.7%
unpow247.7%
unpow247.7%
times-frac80.1%
Simplified80.1%
Taylor expanded in l around 0 47.7%
associate-/r*47.7%
associate-*r/47.7%
unpow247.7%
unpow247.7%
times-frac80.1%
unpow280.1%
*-commutative80.1%
*-commutative80.1%
times-frac80.4%
Simplified80.4%
Taylor expanded in k around 0 41.8%
sub-neg41.8%
unpow241.8%
metadata-eval41.8%
Simplified41.8%
pow241.8%
Applied egg-rr41.8%
Final simplification41.6%
(FPCore (t l k)
:precision binary64
(if (<= l 1.55e-236)
(* 2.0 (* (/ (* l l) t) -0.058333333333333334))
(*
2.0
(* (/ (* (/ l k) (/ l k)) t) (+ (/ 1.0 (* k k)) -0.16666666666666666)))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.55e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
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 (l <= 1.55d-236) then
tmp = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
else
tmp = 2.0d0 * ((((l / k) * (l / k)) / t) * ((1.0d0 / (k * k)) + (-0.16666666666666666d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.55e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.55e-236: tmp = 2.0 * (((l * l) / t) * -0.058333333333333334) else: tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.55e-236) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)); else tmp = Float64(2.0 * Float64(Float64(Float64(Float64(l / k) * Float64(l / k)) / t) * Float64(Float64(1.0 / Float64(k * k)) + -0.16666666666666666))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.55e-236) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); else tmp = 2.0 * ((((l / k) * (l / k)) / t) * ((1.0 / (k * k)) + -0.16666666666666666)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.55e-236], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(N[(1.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.55 \cdot 10^{-236}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{t} \cdot \left(\frac{1}{k \cdot k} + -0.16666666666666666\right)\right)\\
\end{array}
\end{array}
if l < 1.5499999999999999e-236Initial program 49.7%
associate-/l/49.7%
associate-*l/51.1%
associate-*l/50.3%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.2%
*-commutative54.2%
times-frac55.0%
unpow255.0%
unpow255.0%
times-frac62.6%
Simplified62.6%
Taylor expanded in k around 0 34.5%
fma-def34.5%
unpow234.5%
unpow234.5%
associate-*r/34.5%
metadata-eval34.5%
Simplified34.5%
Taylor expanded in k around inf 33.3%
*-commutative33.3%
unpow233.3%
Simplified33.3%
if 1.5499999999999999e-236 < l Initial program 50.0%
associate-/l/50.0%
associate-*l/50.9%
associate-*l/50.0%
associate-/r/50.0%
*-commutative50.0%
associate-/l/50.0%
associate-*r*50.0%
*-commutative50.0%
associate-*r*50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in k around inf 54.6%
*-commutative54.6%
times-frac54.4%
unpow254.4%
unpow254.4%
times-frac70.1%
Simplified70.1%
Taylor expanded in l around 0 54.6%
associate-/r*54.4%
associate-*r/54.4%
unpow254.4%
unpow254.4%
times-frac70.1%
unpow270.1%
*-commutative70.1%
*-commutative70.1%
times-frac70.2%
Simplified70.2%
Taylor expanded in k around 0 49.4%
sub-neg49.4%
unpow249.4%
metadata-eval49.4%
Simplified49.4%
pow249.4%
Applied egg-rr49.4%
Final simplification40.0%
(FPCore (t l k) :precision binary64 (if (<= l 2.1e-236) (* 2.0 (* (/ (* l l) t) -0.058333333333333334)) (* 2.0 (* (* (/ l k) (/ l k)) (/ 1.0 (* k (* t k)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 2.1e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (k * (t * 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 (l <= 2.1d-236) then
tmp = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (1.0d0 / (k * (t * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 2.1e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (k * (t * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 2.1e-236: tmp = 2.0 * (((l * l) / t) * -0.058333333333333334) else: tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (k * (t * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 2.1e-236) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(1.0 / Float64(k * Float64(t * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 2.1e-236) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); else tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (k * (t * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 2.1e-236], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{-236}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{1}{k \cdot \left(t \cdot k\right)}\right)\\
\end{array}
\end{array}
if l < 2.09999999999999979e-236Initial program 49.7%
associate-/l/49.7%
associate-*l/51.1%
associate-*l/50.3%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.2%
*-commutative54.2%
times-frac55.0%
unpow255.0%
unpow255.0%
times-frac62.6%
Simplified62.6%
Taylor expanded in k around 0 34.5%
fma-def34.5%
unpow234.5%
unpow234.5%
associate-*r/34.5%
metadata-eval34.5%
Simplified34.5%
Taylor expanded in k around inf 33.3%
*-commutative33.3%
unpow233.3%
Simplified33.3%
if 2.09999999999999979e-236 < l Initial program 50.0%
associate-/l/50.0%
associate-*l/50.9%
associate-*l/50.0%
associate-/r/50.0%
*-commutative50.0%
associate-/l/50.0%
associate-*r*50.0%
*-commutative50.0%
associate-*r*50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in k around inf 54.6%
*-commutative54.6%
times-frac54.4%
unpow254.4%
unpow254.4%
times-frac70.1%
Simplified70.1%
Taylor expanded in k around 0 51.7%
unpow251.7%
associate-*l*51.7%
Simplified51.7%
Final simplification41.0%
(FPCore (t l k) :precision binary64 (if (<= l 1.32e-236) (* 2.0 (* (/ (* l l) t) -0.058333333333333334)) (* 2.0 (* (* (/ l k) (/ l k)) (/ 1.0 (* t (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 1.32e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (t * (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 (l <= 1.32d-236) then
tmp = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (1.0d0 / (t * (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 1.32e-236) {
tmp = 2.0 * (((l * l) / t) * -0.058333333333333334);
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (t * (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 1.32e-236: tmp = 2.0 * (((l * l) / t) * -0.058333333333333334) else: tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (t * (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 1.32e-236) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(1.0 / Float64(t * Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 1.32e-236) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); else tmp = 2.0 * (((l / k) * (l / k)) * (1.0 / (t * (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 1.32e-236], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.32 \cdot 10^{-236}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{1}{t \cdot \left(k \cdot k\right)}\right)\\
\end{array}
\end{array}
if l < 1.32e-236Initial program 49.7%
associate-/l/49.7%
associate-*l/51.1%
associate-*l/50.3%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.2%
*-commutative54.2%
times-frac55.0%
unpow255.0%
unpow255.0%
times-frac62.6%
Simplified62.6%
Taylor expanded in k around 0 34.5%
fma-def34.5%
unpow234.5%
unpow234.5%
associate-*r/34.5%
metadata-eval34.5%
Simplified34.5%
Taylor expanded in k around inf 33.3%
*-commutative33.3%
unpow233.3%
Simplified33.3%
if 1.32e-236 < l Initial program 50.0%
associate-/l/50.0%
associate-*l/50.9%
associate-*l/50.0%
associate-/r/50.0%
*-commutative50.0%
associate-/l/50.0%
associate-*r*50.0%
*-commutative50.0%
associate-*r*50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in k around inf 54.6%
*-commutative54.6%
times-frac54.4%
unpow254.4%
unpow254.4%
times-frac70.1%
Simplified70.1%
Taylor expanded in k around 0 51.7%
unpow251.7%
Simplified51.7%
Final simplification41.0%
(FPCore (t l k) :precision binary64 (if (<= k 10000.0) (* -0.11666666666666667 (* l (/ l t))) (* 2.0 (* -0.16666666666666666 (/ (* l l) (* t (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 10000.0) {
tmp = -0.11666666666666667 * (l * (l / t));
} else {
tmp = 2.0 * (-0.16666666666666666 * ((l * l) / (t * (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 <= 10000.0d0) then
tmp = (-0.11666666666666667d0) * (l * (l / t))
else
tmp = 2.0d0 * ((-0.16666666666666666d0) * ((l * l) / (t * (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 10000.0) {
tmp = -0.11666666666666667 * (l * (l / t));
} else {
tmp = 2.0 * (-0.16666666666666666 * ((l * l) / (t * (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 10000.0: tmp = -0.11666666666666667 * (l * (l / t)) else: tmp = 2.0 * (-0.16666666666666666 * ((l * l) / (t * (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 10000.0) tmp = Float64(-0.11666666666666667 * Float64(l * Float64(l / t))); else tmp = Float64(2.0 * Float64(-0.16666666666666666 * Float64(Float64(l * l) / Float64(t * Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 10000.0) tmp = -0.11666666666666667 * (l * (l / t)); else tmp = 2.0 * (-0.16666666666666666 * ((l * l) / (t * (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 10000.0], N[(-0.11666666666666667 * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(-0.16666666666666666 * N[(N[(l * l), $MachinePrecision] / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 10000:\\
\;\;\;\;-0.11666666666666667 \cdot \left(\ell \cdot \frac{\ell}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(-0.16666666666666666 \cdot \frac{\ell \cdot \ell}{t \cdot \left(k \cdot k\right)}\right)\\
\end{array}
\end{array}
if k < 1e4Initial program 51.3%
associate-/l/51.3%
associate-*l/52.8%
associate-*l/51.7%
associate-/r/51.6%
*-commutative51.6%
associate-/l/51.6%
associate-*r*51.6%
*-commutative51.6%
associate-*r*51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in k around inf 48.2%
*-commutative48.2%
times-frac49.4%
unpow249.4%
unpow249.4%
times-frac58.0%
Simplified58.0%
Taylor expanded in k around 0 40.0%
fma-def40.0%
unpow240.0%
unpow240.0%
associate-*r/40.0%
metadata-eval40.0%
Simplified40.0%
Taylor expanded in k around inf 21.4%
*-commutative21.4%
unpow221.4%
associate-/l*20.6%
Simplified20.6%
Taylor expanded in l around 0 21.4%
unpow221.4%
associate-*r/20.6%
Simplified20.6%
if 1e4 < k Initial program 45.9%
associate-/l/45.9%
associate-*l/45.9%
associate-*l/45.9%
associate-/r/45.9%
*-commutative45.9%
associate-/l/45.9%
associate-*r*45.9%
*-commutative45.9%
associate-*r*45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in k around inf 71.3%
*-commutative71.3%
times-frac69.6%
unpow269.6%
unpow269.6%
times-frac87.1%
Simplified87.1%
Taylor expanded in l around 0 71.3%
associate-/r*69.6%
associate-*r/69.6%
unpow269.6%
unpow269.6%
times-frac87.0%
unpow287.0%
*-commutative87.0%
*-commutative87.0%
times-frac87.1%
Simplified87.1%
Taylor expanded in k around 0 57.1%
sub-neg57.1%
unpow257.1%
metadata-eval57.1%
Simplified57.1%
Taylor expanded in k around inf 56.5%
*-commutative56.5%
unpow256.5%
unpow256.5%
Simplified56.5%
Final simplification30.1%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ (* l l) t) -0.058333333333333334)))
double code(double t, double l, double k) {
return 2.0 * (((l * l) / t) * -0.058333333333333334);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
end function
public static double code(double t, double l, double k) {
return 2.0 * (((l * l) / t) * -0.058333333333333334);
}
def code(t, l, k): return 2.0 * (((l * l) / t) * -0.058333333333333334)
function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)) end
function tmp = code(t, l, k) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)
\end{array}
Initial program 49.8%
associate-/l/49.8%
associate-*l/51.0%
associate-*l/50.2%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.4%
*-commutative54.4%
times-frac54.8%
unpow254.8%
unpow254.8%
times-frac65.7%
Simplified65.7%
Taylor expanded in k around 0 33.3%
fma-def33.3%
unpow233.3%
unpow233.3%
associate-*r/33.3%
metadata-eval33.3%
Simplified33.3%
Taylor expanded in k around inf 26.7%
*-commutative26.7%
unpow226.7%
Simplified26.7%
Final simplification26.7%
(FPCore (t l k) :precision binary64 (* -0.11666666666666667 (* l (/ l t))))
double code(double t, double l, double k) {
return -0.11666666666666667 * (l * (l / t));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (-0.11666666666666667d0) * (l * (l / t))
end function
public static double code(double t, double l, double k) {
return -0.11666666666666667 * (l * (l / t));
}
def code(t, l, k): return -0.11666666666666667 * (l * (l / t))
function code(t, l, k) return Float64(-0.11666666666666667 * Float64(l * Float64(l / t))) end
function tmp = code(t, l, k) tmp = -0.11666666666666667 * (l * (l / t)); end
code[t_, l_, k_] := N[(-0.11666666666666667 * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.11666666666666667 \cdot \left(\ell \cdot \frac{\ell}{t}\right)
\end{array}
Initial program 49.8%
associate-/l/49.8%
associate-*l/51.0%
associate-*l/50.2%
associate-/r/50.1%
*-commutative50.1%
associate-/l/50.1%
associate-*r*50.1%
*-commutative50.1%
associate-*r*50.1%
*-commutative50.1%
Simplified50.1%
Taylor expanded in k around inf 54.4%
*-commutative54.4%
times-frac54.8%
unpow254.8%
unpow254.8%
times-frac65.7%
Simplified65.7%
Taylor expanded in k around 0 33.3%
fma-def33.3%
unpow233.3%
unpow233.3%
associate-*r/33.3%
metadata-eval33.3%
Simplified33.3%
Taylor expanded in k around inf 26.7%
*-commutative26.7%
unpow226.7%
associate-/l*24.0%
Simplified24.0%
Taylor expanded in l around 0 26.7%
unpow226.7%
associate-*r/24.0%
Simplified24.0%
Final simplification24.0%
herbie shell --seed 2023207
(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))))