
(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 19 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 (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
4e+146)
(/
(pow (/ (cbrt (/ 2.0 (tan k))) (/ t (cbrt (/ (* l l) (sin k))))) 3.0)
(+ 2.0 t_1))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / cbrt(((l * l) / sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / l)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t / Math.cbrt(((l * l) / Math.sin(k))))), 3.0) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 4e+146) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / cbrt(Float64(Float64(l * l) / sin(k))))) ^ 3.0) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+146], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[Power[N[(N[(l * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 4 \cdot 10^{+146}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\sqrt[3]{\frac{\ell \cdot \ell}{\sin k}}}}\right)}^{3}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\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))) < 3.99999999999999973e146Initial program 76.3%
associate-/r*75.9%
associate-*l*66.4%
sqr-neg66.4%
associate-*l*75.9%
*-commutative75.9%
sqr-neg75.9%
associate-/r*76.0%
Simplified77.8%
add-cube-cbrt77.6%
pow377.6%
cbrt-div77.6%
cbrt-div77.6%
rem-cbrt-cube86.5%
Applied egg-rr86.5%
if 3.99999999999999973e146 < (/.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 14.3%
Taylor expanded in t around 0 38.7%
times-frac39.0%
unpow239.0%
unpow239.0%
times-frac60.7%
Simplified60.7%
associate-*l/60.7%
Applied egg-rr60.7%
frac-times61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 38.7%
times-frac39.0%
associate-*l/39.0%
unpow239.0%
associate-/r*55.7%
associate-*r/60.6%
associate-*r/61.5%
unpow261.5%
associate-/r*61.5%
unpow261.5%
associate-*l/61.7%
unpow261.7%
times-frac72.6%
Simplified72.6%
Final simplification80.7%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
4e+146)
(/
(* (* l l) (/ 2.0 (pow (* (* t (cbrt (sin k))) (cbrt (tan k))) 3.0)))
(+ 2.0 t_1))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = ((l * l) * (2.0 / pow(((t * cbrt(sin(k))) * cbrt(tan(k))), 3.0))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / l)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = ((l * l) * (2.0 / Math.pow(((t * Math.cbrt(Math.sin(k))) * Math.cbrt(Math.tan(k))), 3.0))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 4e+146) tmp = Float64(Float64(Float64(l * l) * Float64(2.0 / (Float64(Float64(t * cbrt(sin(k))) * cbrt(tan(k))) ^ 3.0))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+146], N[(N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[Power[N[(N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 4 \cdot 10^{+146}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \frac{2}{{\left(\left(t \cdot \sqrt[3]{\sin k}\right) \cdot \sqrt[3]{\tan k}\right)}^{3}}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\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))) < 3.99999999999999973e146Initial program 76.3%
associate-/r*75.9%
associate-*l*66.4%
sqr-neg66.4%
associate-*l*75.9%
*-commutative75.9%
sqr-neg75.9%
associate-*l/77.9%
associate-*r/75.5%
associate-/r/75.5%
Simplified75.5%
add-cube-cbrt75.5%
pow375.5%
*-commutative75.5%
cbrt-prod75.4%
cbrt-prod75.3%
rem-cbrt-cube82.7%
Applied egg-rr82.7%
if 3.99999999999999973e146 < (/.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 14.3%
Taylor expanded in t around 0 38.7%
times-frac39.0%
unpow239.0%
unpow239.0%
times-frac60.7%
Simplified60.7%
associate-*l/60.7%
Applied egg-rr60.7%
frac-times61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 38.7%
times-frac39.0%
associate-*l/39.0%
unpow239.0%
associate-/r*55.7%
associate-*r/60.6%
associate-*r/61.5%
unpow261.5%
associate-/r*61.5%
unpow261.5%
associate-*l/61.7%
unpow261.7%
times-frac72.6%
Simplified72.6%
Final simplification78.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))))
(if (<=
(/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) t_1))
4e+146)
(/ 2.0 (* t_1 (* (tan k) (pow (/ t (cbrt (/ (* l l) (sin k)))) 3.0))))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l)))))))
double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + pow((k / t), 2.0));
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * t_1)) <= 4e+146) {
tmp = 2.0 / (t_1 * (tan(k) * pow((t / cbrt(((l * l) / sin(k)))), 3.0)));
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / l)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + Math.pow((k / t), 2.0));
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * t_1)) <= 4e+146) {
tmp = 2.0 / (t_1 * (Math.tan(k) * Math.pow((t / Math.cbrt(((l * l) / Math.sin(k)))), 3.0)));
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * t_1)) <= 4e+146) tmp = Float64(2.0 / Float64(t_1 * Float64(tan(k) * (Float64(t / cbrt(Float64(Float64(l * l) / sin(k)))) ^ 3.0)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[(1.0 + N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 4e+146], N[(2.0 / N[(t$95$1 * N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t / N[Power[N[(N[(l * l), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot t_1} \leq 4 \cdot 10^{+146}:\\
\;\;\;\;\frac{2}{t_1 \cdot \left(\tan k \cdot {\left(\frac{t}{\sqrt[3]{\frac{\ell \cdot \ell}{\sin k}}}\right)}^{3}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\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))) < 3.99999999999999973e146Initial program 76.3%
associate-/r/78.1%
add-cube-cbrt77.9%
pow377.9%
cbrt-div78.0%
rem-cbrt-cube82.5%
Applied egg-rr82.5%
if 3.99999999999999973e146 < (/.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 14.3%
Taylor expanded in t around 0 38.7%
times-frac39.0%
unpow239.0%
unpow239.0%
times-frac60.7%
Simplified60.7%
associate-*l/60.7%
Applied egg-rr60.7%
frac-times61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 38.7%
times-frac39.0%
associate-*l/39.0%
unpow239.0%
associate-/r*55.7%
associate-*r/60.6%
associate-*r/61.5%
unpow261.5%
associate-/r*61.5%
unpow261.5%
associate-*l/61.7%
unpow261.7%
times-frac72.6%
Simplified72.6%
Final simplification78.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
4e+146)
(/
(/ (/ (* 2.0 (* l l)) (tan k)) (pow (* t (cbrt (sin k))) 3.0))
(+ 2.0 t_1))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = (((2.0 * (l * l)) / tan(k)) / pow((t * cbrt(sin(k))), 3.0)) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / l)));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = (((2.0 * (l * l)) / Math.tan(k)) / Math.pow((t * Math.cbrt(Math.sin(k))), 3.0)) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 4e+146) tmp = Float64(Float64(Float64(Float64(2.0 * Float64(l * l)) / tan(k)) / (Float64(t * cbrt(sin(k))) ^ 3.0)) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+146], N[(N[(N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 4 \cdot 10^{+146}:\\
\;\;\;\;\frac{\frac{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\tan k}}{{\left(t \cdot \sqrt[3]{\sin k}\right)}^{3}}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\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))) < 3.99999999999999973e146Initial program 76.3%
associate-/r*75.9%
associate-*l*66.4%
sqr-neg66.4%
associate-*l*75.9%
*-commutative75.9%
sqr-neg75.9%
associate-*l/77.9%
associate-*r/75.5%
associate-/r/75.5%
Simplified75.5%
add-cube-cbrt75.4%
pow375.4%
cbrt-prod75.4%
rem-cbrt-cube78.6%
Applied egg-rr78.6%
associate-*l/78.6%
Applied egg-rr78.6%
associate-/r*80.7%
Simplified80.7%
if 3.99999999999999973e146 < (/.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 14.3%
Taylor expanded in t around 0 38.7%
times-frac39.0%
unpow239.0%
unpow239.0%
times-frac60.7%
Simplified60.7%
associate-*l/60.7%
Applied egg-rr60.7%
frac-times61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 38.7%
times-frac39.0%
associate-*l/39.0%
unpow239.0%
associate-/r*55.7%
associate-*r/60.6%
associate-*r/61.5%
unpow261.5%
associate-/r*61.5%
unpow261.5%
associate-*l/61.7%
unpow261.7%
times-frac72.6%
Simplified72.6%
Final simplification77.4%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 t_1))))
4e+146)
(/ (/ (/ 2.0 (tan k)) (/ (pow t 3.0) (/ l (/ (sin k) l)))) (+ 2.0 t_1))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = ((2.0 / tan(k)) / (pow(t, 3.0) / (l / (sin(k) / l)))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / 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) :: t_1
real(8) :: tmp
t_1 = (k / t) ** 2.0d0
if ((2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * (1.0d0 + (1.0d0 + t_1)))) <= 4d+146) then
tmp = ((2.0d0 / tan(k)) / ((t ** 3.0d0) / (l / (sin(k) / l)))) / (2.0d0 + t_1)
else
tmp = 2.0d0 / (((k / l) * (k / cos(k))) * ((sin(k) ** 2.0d0) * (t / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if ((2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) {
tmp = ((2.0 / Math.tan(k)) / (Math.pow(t, 3.0) / (l / (Math.sin(k) / l)))) / (2.0 + t_1);
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) tmp = 0 if (2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146: tmp = ((2.0 / math.tan(k)) / (math.pow(t, 3.0) / (l / (math.sin(k) / l)))) / (2.0 + t_1) else: tmp = 2.0 / (((k / l) * (k / math.cos(k))) * (math.pow(math.sin(k), 2.0) * (t / l))) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + t_1)))) <= 4e+146) tmp = Float64(Float64(Float64(2.0 / tan(k)) / Float64((t ^ 3.0) / Float64(l / Float64(sin(k) / l)))) / Float64(2.0 + t_1)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; tmp = 0.0; if ((2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + t_1)))) <= 4e+146) tmp = ((2.0 / tan(k)) / ((t ^ 3.0) / (l / (sin(k) / l)))) / (2.0 + t_1); else tmp = 2.0 / (((k / l) * (k / cos(k))) * ((sin(k) ^ 2.0) * (t / l))); 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[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 4e+146], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] / N[(l / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + t_1\right)\right)} \leq 4 \cdot 10^{+146}:\\
\;\;\;\;\frac{\frac{\frac{2}{\tan k}}{\frac{{t}^{3}}{\frac{\ell}{\frac{\sin k}{\ell}}}}}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\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))) < 3.99999999999999973e146Initial program 76.3%
associate-/r*75.9%
associate-*l*66.4%
sqr-neg66.4%
associate-*l*75.9%
*-commutative75.9%
sqr-neg75.9%
associate-/r*76.0%
Simplified77.8%
Taylor expanded in l around 0 77.8%
unpow277.8%
associate-/l*80.6%
Simplified80.6%
if 3.99999999999999973e146 < (/.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 14.3%
Taylor expanded in t around 0 38.7%
times-frac39.0%
unpow239.0%
unpow239.0%
times-frac60.7%
Simplified60.7%
associate-*l/60.7%
Applied egg-rr60.7%
frac-times61.5%
Applied egg-rr61.5%
Taylor expanded in k around inf 38.7%
times-frac39.0%
associate-*l/39.0%
unpow239.0%
associate-/r*55.7%
associate-*r/60.6%
associate-*r/61.5%
unpow261.5%
associate-/r*61.5%
unpow261.5%
associate-*l/61.7%
unpow261.7%
times-frac72.6%
Simplified72.6%
Final simplification77.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 2.4e-68)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (or (<= k 1.6e+227) (not (<= k 9.6e+277)))
(/ 2.0 (/ (* k (* t_1 (* k (/ t l)))) (* l (cos k))))
(/ 2.0 (* (* (/ k l) (/ k (cos k))) (* t_1 (/ t l))))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if ((k <= 1.6e+227) || !(k <= 9.6e+277)) {
tmp = 2.0 / ((k * (t_1 * (k * (t / l)))) / (l * cos(k)));
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (t_1 * (t / 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) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 2.4d-68) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if ((k <= 1.6d+227) .or. (.not. (k <= 9.6d+277))) then
tmp = 2.0d0 / ((k * (t_1 * (k * (t / l)))) / (l * cos(k)))
else
tmp = 2.0d0 / (((k / l) * (k / cos(k))) * (t_1 * (t / l)))
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 <= 2.4e-68) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if ((k <= 1.6e+227) || !(k <= 9.6e+277)) {
tmp = 2.0 / ((k * (t_1 * (k * (t / l)))) / (l * Math.cos(k)));
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (t_1 * (t / l)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 2.4e-68: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif (k <= 1.6e+227) or not (k <= 9.6e+277): tmp = 2.0 / ((k * (t_1 * (k * (t / l)))) / (l * math.cos(k))) else: tmp = 2.0 / (((k / l) * (k / math.cos(k))) * (t_1 * (t / l))) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 2.4e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif ((k <= 1.6e+227) || !(k <= 9.6e+277)) tmp = Float64(2.0 / Float64(Float64(k * Float64(t_1 * Float64(k * Float64(t / l)))) / Float64(l * cos(k)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64(t_1 * Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 2.4e-68) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif ((k <= 1.6e+227) || ~((k <= 9.6e+277))) tmp = 2.0 / ((k * (t_1 * (k * (t / l)))) / (l * cos(k))); else tmp = 2.0 / (((k / l) * (k / cos(k))) * (t_1 * (t / l))); 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, 2.4e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 1.6e+227], N[Not[LessEqual[k, 9.6e+277]], $MachinePrecision]], N[(2.0 / N[(N[(k * N[(t$95$1 * N[(k * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 2.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 1.6 \cdot 10^{+227} \lor \neg \left(k \leq 9.6 \cdot 10^{+277}\right):\\
\;\;\;\;\frac{2}{\frac{k \cdot \left(t_1 \cdot \left(k \cdot \frac{t}{\ell}\right)\right)}{\ell \cdot \cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left(t_1 \cdot \frac{t}{\ell}\right)}\\
\end{array}
\end{array}
if k < 2.39999999999999991e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
add-cbrt-cube48.5%
times-frac48.3%
times-frac48.3%
times-frac52.6%
Applied egg-rr52.6%
associate-*l*52.6%
cube-unmult52.6%
*-commutative52.6%
unpow252.6%
times-frac48.5%
unpow248.5%
associate-*l*56.4%
times-frac60.7%
Simplified60.7%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*r*58.0%
times-frac66.0%
associate-/r*67.5%
Simplified67.5%
if 2.39999999999999991e-68 < k < 1.59999999999999994e227 or 9.59999999999999971e277 < k Initial program 37.0%
Taylor expanded in t around 0 50.0%
times-frac48.2%
unpow248.2%
unpow248.2%
times-frac64.6%
Simplified64.6%
associate-*l/64.6%
Applied egg-rr64.6%
frac-times68.9%
Applied egg-rr68.9%
Taylor expanded in k around inf 66.1%
associate-*r/65.1%
unpow265.1%
associate-*r/68.9%
associate-*l*75.0%
*-commutative75.0%
associate-*r*74.9%
Simplified74.9%
if 1.59999999999999994e227 < k < 9.59999999999999971e277Initial program 23.1%
Taylor expanded in t around 0 38.5%
times-frac38.5%
unpow238.5%
unpow238.5%
times-frac46.6%
Simplified46.6%
associate-*l/46.6%
Applied egg-rr46.6%
frac-times47.8%
Applied egg-rr47.8%
Taylor expanded in k around inf 38.5%
times-frac38.5%
associate-*l/38.5%
unpow238.5%
associate-/r*46.6%
associate-*r/46.6%
associate-*r/47.8%
unpow247.8%
associate-/r*47.8%
unpow247.8%
associate-*l/47.8%
unpow247.8%
times-frac84.7%
Simplified84.7%
Final simplification70.2%
(FPCore (t l k)
:precision binary64
(if (<= k 2.5e-83)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 1.8e-10)
(/ 2.0 (* (/ (* k k) (cos k)) (* (/ t l) (/ (* k k) l))))
(if (<= k 5.7e+150)
(* 2.0 (* (/ (cos k) (* k k)) (/ (* l l) (* t (pow (sin k) 2.0)))))
(* 2.0 (* l (/ l (* t (pow k 4.0)))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-83) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 1.8e-10) {
tmp = 2.0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l)));
} else if (k <= 5.7e+150) {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * pow(sin(k), 2.0))));
} else {
tmp = 2.0 * (l * (l / (t * pow(k, 4.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 <= 2.5d-83) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 1.8d-10) then
tmp = 2.0d0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l)))
else if (k <= 5.7d+150) then
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l * l) / (t * (sin(k) ** 2.0d0))))
else
tmp = 2.0d0 * (l * (l / (t * (k ** 4.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-83) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 1.8e-10) {
tmp = 2.0 / (((k * k) / Math.cos(k)) * ((t / l) * ((k * k) / l)));
} else if (k <= 5.7e+150) {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l * l) / (t * Math.pow(Math.sin(k), 2.0))));
} else {
tmp = 2.0 * (l * (l / (t * Math.pow(k, 4.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.5e-83: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 1.8e-10: tmp = 2.0 / (((k * k) / math.cos(k)) * ((t / l) * ((k * k) / l))) elif k <= 5.7e+150: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l * l) / (t * math.pow(math.sin(k), 2.0)))) else: tmp = 2.0 * (l * (l / (t * math.pow(k, 4.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.5e-83) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 1.8e-10) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / cos(k)) * Float64(Float64(t / l) * Float64(Float64(k * k) / l)))); elseif (k <= 5.7e+150) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l * l) / Float64(t * (sin(k) ^ 2.0))))); else tmp = Float64(2.0 * Float64(l * Float64(l / Float64(t * (k ^ 4.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-83) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 1.8e-10) tmp = 2.0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l))); elseif (k <= 5.7e+150) tmp = 2.0 * ((cos(k) / (k * k)) * ((l * l) / (t * (sin(k) ^ 2.0)))); else tmp = 2.0 * (l * (l / (t * (k ^ 4.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.5e-83], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e-10], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.7e+150], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(l * N[(l / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-83}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 1.8 \cdot 10^{-10}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\cos k} \cdot \left(\frac{t}{\ell} \cdot \frac{k \cdot k}{\ell}\right)}\\
\mathbf{elif}\;k \leq 5.7 \cdot 10^{+150}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{\ell \cdot \ell}{t \cdot {\sin k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot {k}^{4}}\right)\\
\end{array}
\end{array}
if k < 2.5e-83Initial program 57.5%
associate-/r*57.2%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.2%
*-commutative57.2%
sqr-neg57.2%
associate-*l/58.8%
associate-*r/56.9%
associate-/r/56.9%
Simplified56.9%
Taylor expanded in k around 0 48.4%
unpow248.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
add-cbrt-cube47.9%
times-frac47.8%
times-frac47.8%
times-frac52.1%
Applied egg-rr52.1%
associate-*l*52.1%
cube-unmult52.1%
*-commutative52.1%
unpow252.1%
times-frac47.9%
unpow247.9%
associate-*l*56.0%
times-frac60.3%
Simplified60.3%
Taylor expanded in l around 0 48.4%
unpow248.4%
unpow248.4%
associate-*r*57.5%
times-frac65.6%
associate-/r*67.1%
Simplified67.1%
if 2.5e-83 < k < 1.8e-10Initial program 33.6%
Taylor expanded in t around 0 32.9%
times-frac37.4%
unpow237.4%
unpow237.4%
times-frac65.7%
Simplified65.7%
Taylor expanded in k around 0 37.4%
unpow237.4%
times-frac65.7%
unpow265.7%
Simplified65.7%
if 1.8e-10 < k < 5.7000000000000002e150Initial program 44.0%
associate-/r*43.9%
associate-*l*43.9%
sqr-neg43.9%
associate-*l*43.9%
*-commutative43.9%
sqr-neg43.9%
associate-*l/44.0%
associate-*r/43.9%
associate-/r/43.9%
Simplified43.9%
Taylor expanded in k around inf 67.7%
times-frac61.4%
unpow261.4%
unpow261.4%
*-commutative61.4%
Simplified61.4%
if 5.7000000000000002e150 < k Initial program 28.0%
Taylor expanded in t around 0 39.5%
times-frac39.4%
unpow239.4%
unpow239.4%
times-frac56.4%
Simplified56.4%
Taylor expanded in k around 0 39.5%
unpow239.5%
Simplified39.5%
Taylor expanded in l around 0 39.5%
*-rgt-identity39.5%
*-commutative39.5%
associate-*r/39.5%
unpow239.5%
associate-*l*57.4%
associate-*r/57.4%
*-rgt-identity57.4%
*-commutative57.4%
Simplified57.4%
Final simplification65.0%
(FPCore (t l k) :precision binary64 (if (<= k 3.4e-83) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* (/ (cos k) (* k k)) (/ (* l (/ l t)) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3.4e-83) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l * (l / 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 <= 3.4d-83) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l * (l / 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 <= 3.4e-83) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l * (l / t)) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 3.4e-83: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l * (l / t)) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 3.4e-83) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l * Float64(l / t)) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.4e-83) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l * (l / t)) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 3.4e-83], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.4 \cdot 10^{-83}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \frac{\ell \cdot \frac{\ell}{t}}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 3.3999999999999998e-83Initial program 57.5%
associate-/r*57.2%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.2%
*-commutative57.2%
sqr-neg57.2%
associate-*l/58.8%
associate-*r/56.9%
associate-/r/56.9%
Simplified56.9%
Taylor expanded in k around 0 48.4%
unpow248.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
add-cbrt-cube47.9%
times-frac47.8%
times-frac47.8%
times-frac52.1%
Applied egg-rr52.1%
associate-*l*52.1%
cube-unmult52.1%
*-commutative52.1%
unpow252.1%
times-frac47.9%
unpow247.9%
associate-*l*56.0%
times-frac60.3%
Simplified60.3%
Taylor expanded in l around 0 48.4%
unpow248.4%
unpow248.4%
associate-*r*57.5%
times-frac65.6%
associate-/r*67.1%
Simplified67.1%
if 3.3999999999999998e-83 < k Initial program 35.0%
associate-/r*35.0%
associate-*l*35.0%
sqr-neg35.0%
associate-*l*35.0%
*-commutative35.0%
sqr-neg35.0%
associate-*l/35.0%
associate-*r/34.9%
associate-/r/34.9%
Simplified34.9%
Taylor expanded in k around inf 49.3%
times-frac47.5%
unpow247.5%
unpow247.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in l around 0 47.5%
unpow247.5%
times-frac62.1%
*-commutative62.1%
associate-*r/62.2%
Simplified62.2%
Final simplification65.6%
(FPCore (t l k) :precision binary64 (if (<= k 2.4e-68) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* (/ 2.0 (* (* (pow (sin k) 2.0) (/ t l)) (* k k))) (* l (cos k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = (2.0 / ((pow(sin(k), 2.0) * (t / l)) * (k * k))) * (l * cos(k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.4d-68) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = (2.0d0 / (((sin(k) ** 2.0d0) * (t / l)) * (k * k))) * (l * cos(k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = (2.0 / ((Math.pow(Math.sin(k), 2.0) * (t / l)) * (k * k))) * (l * Math.cos(k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.4e-68: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = (2.0 / ((math.pow(math.sin(k), 2.0) * (t / l)) * (k * k))) * (l * math.cos(k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.4e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) * Float64(t / l)) * Float64(k * k))) * Float64(l * cos(k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.4e-68) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = (2.0 / (((sin(k) ^ 2.0) * (t / l)) * (k * k))) * (l * cos(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.4e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left({\sin k}^{2} \cdot \frac{t}{\ell}\right) \cdot \left(k \cdot k\right)} \cdot \left(\ell \cdot \cos k\right)\\
\end{array}
\end{array}
if k < 2.39999999999999991e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
add-cbrt-cube48.5%
times-frac48.3%
times-frac48.3%
times-frac52.6%
Applied egg-rr52.6%
associate-*l*52.6%
cube-unmult52.6%
*-commutative52.6%
unpow252.6%
times-frac48.5%
unpow248.5%
associate-*l*56.4%
times-frac60.7%
Simplified60.7%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*r*58.0%
times-frac66.0%
associate-/r*67.5%
Simplified67.5%
if 2.39999999999999991e-68 < k Initial program 34.6%
Taylor expanded in t around 0 48.0%
times-frac46.5%
unpow246.5%
unpow246.5%
times-frac61.6%
Simplified61.6%
associate-*l/61.6%
Applied egg-rr61.6%
frac-times65.3%
Applied egg-rr65.3%
associate-/r/65.3%
*-commutative65.3%
Applied egg-rr65.3%
Final simplification66.8%
(FPCore (t l k) :precision binary64 (if (<= k 2.4e-68) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (* (/ k l) (/ k (cos k))) (* (pow (sin k) 2.0) (/ t l))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((k / l) * (k / cos(k))) * (pow(sin(k), 2.0) * (t / 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.4d-68) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((k / l) * (k / cos(k))) * ((sin(k) ** 2.0d0) * (t / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (((k / l) * (k / Math.cos(k))) * (Math.pow(Math.sin(k), 2.0) * (t / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.4e-68: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (((k / l) * (k / math.cos(k))) * (math.pow(math.sin(k), 2.0) * (t / l))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.4e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / cos(k))) * Float64((sin(k) ^ 2.0) * Float64(t / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.4e-68) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((k / l) * (k / cos(k))) * ((sin(k) ^ 2.0) * (t / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.4e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\cos k}\right) \cdot \left({\sin k}^{2} \cdot \frac{t}{\ell}\right)}\\
\end{array}
\end{array}
if k < 2.39999999999999991e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
add-cbrt-cube48.5%
times-frac48.3%
times-frac48.3%
times-frac52.6%
Applied egg-rr52.6%
associate-*l*52.6%
cube-unmult52.6%
*-commutative52.6%
unpow252.6%
times-frac48.5%
unpow248.5%
associate-*l*56.4%
times-frac60.7%
Simplified60.7%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*r*58.0%
times-frac66.0%
associate-/r*67.5%
Simplified67.5%
if 2.39999999999999991e-68 < k Initial program 34.6%
Taylor expanded in t around 0 48.0%
times-frac46.5%
unpow246.5%
unpow246.5%
times-frac61.6%
Simplified61.6%
associate-*l/61.6%
Applied egg-rr61.6%
frac-times65.3%
Applied egg-rr65.3%
Taylor expanded in k around inf 48.0%
times-frac46.5%
associate-*l/46.6%
unpow246.6%
associate-/r*58.5%
associate-*r/61.6%
associate-*r/65.3%
unpow265.3%
associate-/r*65.3%
unpow265.3%
associate-*l/61.6%
unpow261.6%
times-frac70.5%
Simplified70.5%
Final simplification68.4%
(FPCore (t l k)
:precision binary64
(if (<= t -7.8e-63)
(* (/ l k) (/ l (* (pow t 3.0) k)))
(if (<= t 3.4e-74)
(*
2.0
(*
(/ (cos k) (* k k))
(fma (* l (/ l t)) 0.3333333333333333 (* (/ l t) (/ l (* k k))))))
(if (<= t 1.35e+97)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(/ 2.0 (/ (* (* k k) (* (/ t l) (* k k))) (* l (cos k))))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -7.8e-63) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else if (t <= 3.4e-74) {
tmp = 2.0 * ((cos(k) / (k * k)) * fma((l * (l / t)), 0.3333333333333333, ((l / t) * (l / (k * k)))));
} else if (t <= 1.35e+97) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((k * k) * ((t / l) * (k * k))) / (l * cos(k)));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if (t <= -7.8e-63) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); elseif (t <= 3.4e-74) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * fma(Float64(l * Float64(l / t)), 0.3333333333333333, Float64(Float64(l / t) * Float64(l / Float64(k * k)))))); elseif (t <= 1.35e+97) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k * k))) / Float64(l * cos(k)))); end return tmp end
code[t_, l_, k_] := If[LessEqual[t, -7.8e-63], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-74], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * 0.3333333333333333 + N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+97], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-74}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \mathsf{fma}\left(\ell \cdot \frac{\ell}{t}, 0.3333333333333333, \frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot k\right)\right)}{\ell \cdot \cos k}}\\
\end{array}
\end{array}
if t < -7.80000000000000044e-63Initial program 66.8%
associate-/r*66.8%
associate-*l*55.4%
sqr-neg55.4%
associate-*l*66.8%
*-commutative66.8%
sqr-neg66.8%
associate-*l/66.8%
associate-*r/64.9%
associate-/r/64.9%
Simplified64.9%
Taylor expanded in k around 0 51.6%
unpow251.6%
*-commutative51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in l around 0 51.6%
unpow251.6%
unpow251.6%
associate-*l*62.0%
times-frac68.7%
Simplified68.7%
if -7.80000000000000044e-63 < t < 3.4000000000000001e-74Initial program 35.2%
associate-/r*35.1%
associate-*l*35.1%
sqr-neg35.1%
associate-*l*35.1%
*-commutative35.1%
sqr-neg35.1%
associate-*l/35.1%
associate-*r/35.1%
associate-/r/35.1%
Simplified35.1%
Taylor expanded in k around inf 61.4%
times-frac62.5%
unpow262.5%
unpow262.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in k around 0 51.7%
+-commutative51.7%
*-commutative51.7%
fma-def51.7%
unpow251.7%
associate-*l/52.0%
unpow252.0%
times-frac70.4%
unpow270.4%
Simplified70.4%
if 3.4000000000000001e-74 < t < 1.34999999999999997e97Initial program 54.6%
associate-/r*53.0%
associate-*l*46.0%
sqr-neg46.0%
associate-*l*53.0%
*-commutative53.0%
sqr-neg53.0%
associate-*l/62.5%
associate-*r/57.2%
associate-/r/57.3%
Simplified57.3%
Taylor expanded in k around 0 38.0%
unpow238.0%
*-commutative38.0%
unpow238.0%
Simplified38.0%
add-cbrt-cube34.8%
times-frac34.6%
times-frac34.6%
times-frac38.6%
Applied egg-rr38.6%
associate-*l*38.6%
cube-unmult38.6%
*-commutative38.6%
unpow238.6%
times-frac34.8%
unpow234.8%
associate-*l*44.6%
times-frac48.5%
Simplified48.5%
Taylor expanded in l around 0 38.0%
unpow238.0%
unpow238.0%
associate-*r*50.9%
times-frac67.7%
associate-/r*73.9%
Simplified73.9%
if 1.34999999999999997e97 < t Initial program 41.9%
Taylor expanded in t around 0 48.3%
times-frac47.1%
unpow247.1%
unpow247.1%
times-frac56.0%
Simplified56.0%
associate-*l/56.0%
Applied egg-rr56.0%
Taylor expanded in k around 0 59.5%
associate-/l*56.3%
unpow256.3%
Simplified56.3%
frac-times59.5%
div-inv59.5%
clear-num59.5%
*-commutative59.5%
Applied egg-rr59.5%
Final simplification68.2%
(FPCore (t l k)
:precision binary64
(if (<= t -1.5e-62)
(* (/ l k) (/ l (* (pow t 3.0) k)))
(if (<= t 1.05e-74)
(/ 2.0 (* (/ (* k k) (cos k)) (/ (* k (* k (/ t l))) l)))
(if (<= t 1.35e+97)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(/ 2.0 (/ (* (* k k) (* (/ t l) (* k k))) (* l (cos k))))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -1.5e-62) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else if (t <= 1.05e-74) {
tmp = 2.0 / (((k * k) / cos(k)) * ((k * (k * (t / l))) / l));
} else if (t <= 1.35e+97) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((k * k) * ((t / l) * (k * k))) / (l * cos(k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.5d-62)) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else if (t <= 1.05d-74) then
tmp = 2.0d0 / (((k * k) / cos(k)) * ((k * (k * (t / l))) / l))
else if (t <= 1.35d+97) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((k * k) * ((t / l) * (k * k))) / (l * cos(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -1.5e-62) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else if (t <= 1.05e-74) {
tmp = 2.0 / (((k * k) / Math.cos(k)) * ((k * (k * (t / l))) / l));
} else if (t <= 1.35e+97) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (((k * k) * ((t / l) * (k * k))) / (l * Math.cos(k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -1.5e-62: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) elif t <= 1.05e-74: tmp = 2.0 / (((k * k) / math.cos(k)) * ((k * (k * (t / l))) / l)) elif t <= 1.35e+97: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (((k * k) * ((t / l) * (k * k))) / (l * math.cos(k))) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -1.5e-62) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); elseif (t <= 1.05e-74) tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / cos(k)) * Float64(Float64(k * Float64(k * Float64(t / l))) / l))); elseif (t <= 1.35e+97) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(Float64(t / l) * Float64(k * k))) / Float64(l * cos(k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.5e-62) tmp = (l / k) * (l / ((t ^ 3.0) * k)); elseif (t <= 1.05e-74) tmp = 2.0 / (((k * k) / cos(k)) * ((k * (k * (t / l))) / l)); elseif (t <= 1.35e+97) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((k * k) * ((t / l) * (k * k))) / (l * cos(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -1.5e-62], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-74], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k * N[(k * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e+97], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-62}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-74}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\cos k} \cdot \frac{k \cdot \left(k \cdot \frac{t}{\ell}\right)}{\ell}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+97}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot k\right)\right)}{\ell \cdot \cos k}}\\
\end{array}
\end{array}
if t < -1.5000000000000001e-62Initial program 66.8%
associate-/r*66.8%
associate-*l*55.4%
sqr-neg55.4%
associate-*l*66.8%
*-commutative66.8%
sqr-neg66.8%
associate-*l/66.8%
associate-*r/64.9%
associate-/r/64.9%
Simplified64.9%
Taylor expanded in k around 0 51.6%
unpow251.6%
*-commutative51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in l around 0 51.6%
unpow251.6%
unpow251.6%
associate-*l*62.0%
times-frac68.7%
Simplified68.7%
if -1.5000000000000001e-62 < t < 1.05e-74Initial program 35.2%
Taylor expanded in t around 0 61.4%
times-frac62.8%
unpow262.8%
unpow262.8%
times-frac83.6%
Simplified83.6%
associate-*l/83.5%
Applied egg-rr83.5%
Taylor expanded in k around 0 62.2%
associate-/l*69.0%
unpow269.0%
Simplified69.0%
Taylor expanded in k around 0 62.2%
associate-*r/69.0%
unpow269.0%
associate-*l*69.0%
Simplified69.0%
if 1.05e-74 < t < 1.34999999999999997e97Initial program 54.6%
associate-/r*53.0%
associate-*l*46.0%
sqr-neg46.0%
associate-*l*53.0%
*-commutative53.0%
sqr-neg53.0%
associate-*l/62.5%
associate-*r/57.2%
associate-/r/57.3%
Simplified57.3%
Taylor expanded in k around 0 38.0%
unpow238.0%
*-commutative38.0%
unpow238.0%
Simplified38.0%
add-cbrt-cube34.8%
times-frac34.6%
times-frac34.6%
times-frac38.6%
Applied egg-rr38.6%
associate-*l*38.6%
cube-unmult38.6%
*-commutative38.6%
unpow238.6%
times-frac34.8%
unpow234.8%
associate-*l*44.6%
times-frac48.5%
Simplified48.5%
Taylor expanded in l around 0 38.0%
unpow238.0%
unpow238.0%
associate-*r*50.9%
times-frac67.7%
associate-/r*73.9%
Simplified73.9%
if 1.34999999999999997e97 < t Initial program 41.9%
Taylor expanded in t around 0 48.3%
times-frac47.1%
unpow247.1%
unpow247.1%
times-frac56.0%
Simplified56.0%
associate-*l/56.0%
Applied egg-rr56.0%
Taylor expanded in k around 0 59.5%
associate-/l*56.3%
unpow256.3%
Simplified56.3%
frac-times59.5%
div-inv59.5%
clear-num59.5%
*-commutative59.5%
Applied egg-rr59.5%
Final simplification67.7%
(FPCore (t l k) :precision binary64 (if (<= k 3.4e-83) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* (/ (cos k) (* k k)) (* (/ l t) (/ l (* k k)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3.4e-83) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (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 <= 3.4d-83) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.4e-83) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((Math.cos(k) / (k * k)) * ((l / t) * (l / (k * k))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 3.4e-83: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * ((math.cos(k) / (k * k)) * ((l / t) * (l / (k * k)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 3.4e-83) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(k * k)) * Float64(Float64(l / t) * Float64(l / Float64(k * k))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.4e-83) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * ((cos(k) / (k * k)) * ((l / t) * (l / (k * k)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 3.4e-83], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.4 \cdot 10^{-83}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\right)\\
\end{array}
\end{array}
if k < 3.3999999999999998e-83Initial program 57.5%
associate-/r*57.2%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.2%
*-commutative57.2%
sqr-neg57.2%
associate-*l/58.8%
associate-*r/56.9%
associate-/r/56.9%
Simplified56.9%
Taylor expanded in k around 0 48.4%
unpow248.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
add-cbrt-cube47.9%
times-frac47.8%
times-frac47.8%
times-frac52.1%
Applied egg-rr52.1%
associate-*l*52.1%
cube-unmult52.1%
*-commutative52.1%
unpow252.1%
times-frac47.9%
unpow247.9%
associate-*l*56.0%
times-frac60.3%
Simplified60.3%
Taylor expanded in l around 0 48.4%
unpow248.4%
unpow248.4%
associate-*r*57.5%
times-frac65.6%
associate-/r*67.1%
Simplified67.1%
if 3.3999999999999998e-83 < k Initial program 35.0%
associate-/r*35.0%
associate-*l*35.0%
sqr-neg35.0%
associate-*l*35.0%
*-commutative35.0%
sqr-neg35.0%
associate-*l/35.0%
associate-*r/34.9%
associate-/r/34.9%
Simplified34.9%
Taylor expanded in k around inf 49.3%
times-frac47.5%
unpow247.5%
unpow247.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in k around 0 39.4%
unpow239.4%
times-frac51.0%
unpow251.0%
Simplified51.0%
Final simplification62.2%
(FPCore (t l k) :precision binary64 (if (<= k 2.7e-83) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (/ (* k k) (cos k)) (* (/ t l) (/ (* k k) l))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-83) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.7d-83) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-83) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (((k * k) / Math.cos(k)) * ((t / l) * ((k * k) / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.7e-83: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (((k * k) / math.cos(k)) * ((t / l) * ((k * k) / l))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.7e-83) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / cos(k)) * Float64(Float64(t / l) * Float64(Float64(k * k) / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.7e-83) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((k * k) / cos(k)) * ((t / l) * ((k * k) / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.7e-83], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-83}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k \cdot k}{\cos k} \cdot \left(\frac{t}{\ell} \cdot \frac{k \cdot k}{\ell}\right)}\\
\end{array}
\end{array}
if k < 2.69999999999999991e-83Initial program 57.5%
associate-/r*57.2%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.2%
*-commutative57.2%
sqr-neg57.2%
associate-*l/58.8%
associate-*r/56.9%
associate-/r/56.9%
Simplified56.9%
Taylor expanded in k around 0 48.4%
unpow248.4%
*-commutative48.4%
unpow248.4%
Simplified48.4%
add-cbrt-cube47.9%
times-frac47.8%
times-frac47.8%
times-frac52.1%
Applied egg-rr52.1%
associate-*l*52.1%
cube-unmult52.1%
*-commutative52.1%
unpow252.1%
times-frac47.9%
unpow247.9%
associate-*l*56.0%
times-frac60.3%
Simplified60.3%
Taylor expanded in l around 0 48.4%
unpow248.4%
unpow248.4%
associate-*r*57.5%
times-frac65.6%
associate-/r*67.1%
Simplified67.1%
if 2.69999999999999991e-83 < k Initial program 35.0%
Taylor expanded in t around 0 49.3%
times-frac47.9%
unpow247.9%
unpow247.9%
times-frac62.5%
Simplified62.5%
Taylor expanded in k around 0 39.4%
unpow239.4%
times-frac51.0%
unpow251.0%
Simplified51.0%
Final simplification62.2%
(FPCore (t l k) :precision binary64 (if (<= k 2.4e-68) (* (/ l k) (/ l (* (pow t 3.0) k))) (* 2.0 (* (/ l t) (/ l (pow k 4.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.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 <= 2.4d-68) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.4e-68) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.4e-68: tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) else: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.4e-68) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.4e-68) tmp = (l / k) * (l / ((t ^ 3.0) * k)); else tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.4e-68], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.4 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\end{array}
\end{array}
if k < 2.39999999999999991e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*l*58.0%
times-frac66.0%
Simplified66.0%
if 2.39999999999999991e-68 < k Initial program 34.6%
associate-/r*34.6%
associate-*l*34.6%
sqr-neg34.6%
associate-*l*34.6%
*-commutative34.6%
sqr-neg34.6%
associate-*l/34.6%
associate-*r/34.5%
associate-/r/34.5%
Simplified34.5%
Taylor expanded in k around inf 48.0%
times-frac46.1%
unpow246.1%
unpow246.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in k around 0 34.2%
unpow234.2%
*-commutative34.2%
times-frac48.0%
Simplified48.0%
Final simplification60.6%
(FPCore (t l k) :precision binary64 (if (<= k 2.2e-68) (* (/ l k) (/ (/ l k) (pow t 3.0))) (* 2.0 (* (/ l t) (/ l (pow k 4.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-68) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.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 <= 2.2d-68) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.2e-68) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.2e-68: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.2e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.2e-68) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.2e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\end{array}
\end{array}
if k < 2.20000000000000002e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
add-cbrt-cube48.5%
times-frac48.3%
times-frac48.3%
times-frac52.6%
Applied egg-rr52.6%
associate-*l*52.6%
cube-unmult52.6%
*-commutative52.6%
unpow252.6%
times-frac48.5%
unpow248.5%
associate-*l*56.4%
times-frac60.7%
Simplified60.7%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*r*58.0%
times-frac66.0%
associate-/r*67.5%
Simplified67.5%
if 2.20000000000000002e-68 < k Initial program 34.6%
associate-/r*34.6%
associate-*l*34.6%
sqr-neg34.6%
associate-*l*34.6%
*-commutative34.6%
sqr-neg34.6%
associate-*l/34.6%
associate-*r/34.5%
associate-/r/34.5%
Simplified34.5%
Taylor expanded in k around inf 48.0%
times-frac46.1%
unpow246.1%
unpow246.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in k around 0 34.2%
unpow234.2%
*-commutative34.2%
times-frac48.0%
Simplified48.0%
Final simplification61.7%
(FPCore (t l k) :precision binary64 (if (<= k 1.85e-68) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.85e-68) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (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 <= 1.85d-68) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.85e-68) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.85e-68: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.85e-68) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.85e-68) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.85e-68], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.85 \cdot 10^{-68}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\end{array}
\end{array}
if k < 1.85000000000000001e-68Initial program 57.4%
associate-/r*57.1%
associate-*l*49.1%
sqr-neg49.1%
associate-*l*57.1%
*-commutative57.1%
sqr-neg57.1%
associate-*l/58.7%
associate-*r/56.8%
associate-/r/56.8%
Simplified56.8%
Taylor expanded in k around 0 49.0%
unpow249.0%
*-commutative49.0%
unpow249.0%
Simplified49.0%
add-cbrt-cube48.5%
times-frac48.3%
times-frac48.3%
times-frac52.6%
Applied egg-rr52.6%
associate-*l*52.6%
cube-unmult52.6%
*-commutative52.6%
unpow252.6%
times-frac48.5%
unpow248.5%
associate-*l*56.4%
times-frac60.7%
Simplified60.7%
Taylor expanded in l around 0 49.0%
unpow249.0%
unpow249.0%
associate-*r*58.0%
times-frac66.0%
associate-/r*67.5%
Simplified67.5%
if 1.85000000000000001e-68 < k Initial program 34.6%
Taylor expanded in t around 0 48.0%
times-frac46.5%
unpow246.5%
unpow246.5%
times-frac61.6%
Simplified61.6%
Taylor expanded in k around 0 34.2%
unpow234.2%
times-frac48.1%
Simplified48.1%
Final simplification61.7%
(FPCore (t l k) :precision binary64 (* 2.0 (* l (/ l (* t (pow k 4.0))))))
double code(double t, double l, double k) {
return 2.0 * (l * (l / (t * pow(k, 4.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 * (l * (l / (t * (k ** 4.0d0))))
end function
public static double code(double t, double l, double k) {
return 2.0 * (l * (l / (t * Math.pow(k, 4.0))));
}
def code(t, l, k): return 2.0 * (l * (l / (t * math.pow(k, 4.0))))
function code(t, l, k) return Float64(2.0 * Float64(l * Float64(l / Float64(t * (k ^ 4.0))))) end
function tmp = code(t, l, k) tmp = 2.0 * (l * (l / (t * (k ^ 4.0)))); end
code[t_, l_, k_] := N[(2.0 * N[(l * N[(l / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\ell \cdot \frac{\ell}{t \cdot {k}^{4}}\right)
\end{array}
Initial program 50.6%
Taylor expanded in t around 0 51.4%
times-frac52.9%
unpow252.9%
unpow252.9%
times-frac62.1%
Simplified62.1%
Taylor expanded in k around 0 43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in l around 0 43.9%
*-rgt-identity43.9%
*-commutative43.9%
associate-*r/43.7%
unpow243.7%
associate-*l*49.1%
associate-*r/49.3%
*-rgt-identity49.3%
*-commutative49.3%
Simplified49.3%
Final simplification49.3%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ l t) (/ l (pow k 4.0)))))
double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / pow(k, 4.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 * ((l / t) * (l / (k ** 4.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
def code(t, l, k): return 2.0 * ((l / t) * (l / math.pow(k, 4.0)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)
\end{array}
Initial program 50.6%
associate-/r*50.4%
associate-*l*44.8%
sqr-neg44.8%
associate-*l*50.4%
*-commutative50.4%
sqr-neg50.4%
associate-*l/51.6%
associate-*r/50.2%
associate-/r/50.2%
Simplified50.2%
Taylor expanded in k around inf 51.1%
times-frac51.7%
unpow251.7%
unpow251.7%
*-commutative51.7%
Simplified51.7%
Taylor expanded in k around 0 43.9%
unpow243.9%
*-commutative43.9%
times-frac51.3%
Simplified51.3%
Final simplification51.3%
herbie shell --seed 2023264
(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))))