
(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 17 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))))
2e-19)
(* (/ 2.0 (* (tan k) (+ 2.0 t_1))) (/ (* l l) (* (pow t 3.0) (sin k))))
(/ 2.0 (* (* t (/ k l)) (* k (/ (pow (sin k) 2.0) (* l (cos k)))))))))
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)))) <= 2e-19) {
tmp = (2.0 / (tan(k) * (2.0 + t_1))) * ((l * l) / (pow(t, 3.0) * sin(k)));
} else {
tmp = 2.0 / ((t * (k / l)) * (k * (pow(sin(k), 2.0) / (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) :: 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)))) <= 2d-19) then
tmp = (2.0d0 / (tan(k) * (2.0d0 + t_1))) * ((l * l) / ((t ** 3.0d0) * sin(k)))
else
tmp = 2.0d0 / ((t * (k / l)) * (k * ((sin(k) ** 2.0d0) / (l * cos(k)))))
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)))) <= 2e-19) {
tmp = (2.0 / (Math.tan(k) * (2.0 + t_1))) * ((l * l) / (Math.pow(t, 3.0) * Math.sin(k)));
} else {
tmp = 2.0 / ((t * (k / l)) * (k * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k)))));
}
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)))) <= 2e-19: tmp = (2.0 / (math.tan(k) * (2.0 + t_1))) * ((l * l) / (math.pow(t, 3.0) * math.sin(k))) else: tmp = 2.0 / ((t * (k / l)) * (k * (math.pow(math.sin(k), 2.0) / (l * math.cos(k))))) 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)))) <= 2e-19) tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(2.0 + t_1))) * Float64(Float64(l * l) / Float64((t ^ 3.0) * sin(k)))); else tmp = Float64(2.0 / Float64(Float64(t * Float64(k / l)) * Float64(k * Float64((sin(k) ^ 2.0) / Float64(l * cos(k)))))); 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)))) <= 2e-19) tmp = (2.0 / (tan(k) * (2.0 + t_1))) * ((l * l) / ((t ^ 3.0) * sin(k))); else tmp = 2.0 / ((t * (k / l)) * (k * ((sin(k) ^ 2.0) / (l * cos(k))))); 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], 2e-19], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{-19}:\\
\;\;\;\;\frac{2}{\tan k \cdot \left(2 + t_1\right)} \cdot \frac{\ell \cdot \ell}{{t}^{3} \cdot \sin k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 2e-19Initial program 79.8%
associate-/l/79.8%
associate-*l/80.5%
associate-*l/79.6%
associate-/r/79.6%
*-commutative79.6%
associate-/l/79.7%
associate-*r*79.8%
*-commutative79.8%
associate-*r*79.7%
*-commutative79.7%
Simplified79.7%
expm1-log1p-u62.1%
expm1-udef55.3%
*-commutative55.3%
Applied egg-rr55.3%
expm1-def62.1%
expm1-log1p79.7%
unpow279.7%
*-commutative79.7%
associate-*l/79.7%
associate-*r*79.7%
*-commutative79.7%
times-frac80.5%
unpow280.5%
*-commutative80.5%
Simplified80.5%
if 2e-19 < (/.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 20.2%
*-commutative20.2%
associate-*l*19.4%
associate-*r*19.4%
+-commutative19.4%
associate-+r+19.4%
metadata-eval19.4%
Simplified19.4%
Taylor expanded in k around inf 47.5%
*-commutative47.5%
unpow247.5%
times-frac57.0%
unpow257.0%
Simplified57.0%
Taylor expanded in t around 0 47.5%
times-frac46.6%
*-commutative46.6%
*-commutative46.6%
associate-/l*46.7%
times-frac47.5%
*-commutative47.5%
associate-/r/47.5%
unpow247.5%
associate-/l*50.9%
associate-/r/59.1%
associate-*r/57.8%
unpow257.8%
associate-*l*66.9%
associate-/l/66.9%
Simplified66.9%
Taylor expanded in k around 0 75.9%
associate-*r/75.9%
associate-/l*67.0%
Applied egg-rr67.0%
associate-*r/67.0%
*-commutative67.0%
associate-*l*73.2%
associate-/r/81.9%
*-commutative81.9%
Simplified81.9%
Final simplification81.1%
(FPCore (t l k) :precision binary64 (if (<= k 2.7e-33) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (/ (pow (sin k) 2.0) (* l (cos k))) (* k (* t (/ k l)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-33) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((pow(sin(k), 2.0) / (l * cos(k))) * (k * (t * (k / l))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.7d-33) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((sin(k) ** 2.0d0) / (l * cos(k))) * (k * (t * (k / l))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.7e-33) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))) * (k * (t * (k / l))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.7e-33: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) / (l * math.cos(k))) * (k * (t * (k / l)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.7e-33) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) / Float64(l * cos(k))) * Float64(k * Float64(t * Float64(k / l))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.7e-33) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((sin(k) ^ 2.0) / (l * cos(k))) * (k * (t * (k / l)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.7e-33], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.7 \cdot 10^{-33}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\ell \cdot \cos k} \cdot \left(k \cdot \left(t \cdot \frac{k}{\ell}\right)\right)}\\
\end{array}
\end{array}
if k < 2.7000000000000001e-33Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/50.9%
associate-/r/50.9%
*-commutative50.9%
associate-/l/50.9%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in k around 0 48.5%
Taylor expanded in k around 0 45.3%
unpow245.3%
associate-*l*48.5%
Simplified48.5%
Taylor expanded in l around 0 45.3%
unpow245.3%
unpow245.3%
associate-*r*48.5%
times-frac55.1%
associate-/r*56.1%
Simplified56.1%
if 2.7000000000000001e-33 < k Initial program 52.3%
*-commutative52.3%
associate-*l*52.3%
associate-*r*52.3%
+-commutative52.3%
associate-+r+52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in k around inf 65.3%
*-commutative65.3%
unpow265.3%
times-frac65.6%
unpow265.6%
Simplified65.6%
Taylor expanded in t around 0 65.3%
times-frac62.8%
*-commutative62.8%
*-commutative62.8%
associate-/l*62.8%
times-frac65.3%
*-commutative65.3%
associate-/r/65.2%
unpow265.2%
associate-/l*65.3%
associate-/r/70.9%
associate-*r/68.0%
unpow268.0%
associate-*l*75.8%
associate-/l/75.8%
Simplified75.8%
Taylor expanded in k around 0 81.1%
Taylor expanded in k around 0 70.9%
associate-/l*68.0%
unpow268.0%
associate-*r/75.8%
associate-/r/80.8%
Simplified80.8%
Final simplification63.4%
(FPCore (t l k) :precision binary64 (if (<= k 2.5e-33) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (/ (pow (sin k) 2.0) (* l (cos k))) (* k (/ (* t k) l))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-33) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((pow(sin(k), 2.0) / (l * cos(k))) * (k * ((t * k) / l)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.5d-33) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((sin(k) ** 2.0d0) / (l * cos(k))) * (k * ((t * k) / l)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-33) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k))) * (k * ((t * k) / l)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.5e-33: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) / (l * math.cos(k))) * (k * ((t * k) / l))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.5e-33) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) / Float64(l * cos(k))) * Float64(k * Float64(Float64(t * k) / l)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-33) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((sin(k) ^ 2.0) / (l * cos(k))) * (k * ((t * k) / l))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.5e-33], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(t * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-33}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{\sin k}^{2}}{\ell \cdot \cos k} \cdot \left(k \cdot \frac{t \cdot k}{\ell}\right)}\\
\end{array}
\end{array}
if k < 2.50000000000000014e-33Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/50.9%
associate-/r/50.9%
*-commutative50.9%
associate-/l/50.9%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in k around 0 48.5%
Taylor expanded in k around 0 45.3%
unpow245.3%
associate-*l*48.5%
Simplified48.5%
Taylor expanded in l around 0 45.3%
unpow245.3%
unpow245.3%
associate-*r*48.5%
times-frac55.1%
associate-/r*56.1%
Simplified56.1%
if 2.50000000000000014e-33 < k Initial program 52.3%
*-commutative52.3%
associate-*l*52.3%
associate-*r*52.3%
+-commutative52.3%
associate-+r+52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in k around inf 65.3%
*-commutative65.3%
unpow265.3%
times-frac65.6%
unpow265.6%
Simplified65.6%
Taylor expanded in t around 0 65.3%
times-frac62.8%
*-commutative62.8%
*-commutative62.8%
associate-/l*62.8%
times-frac65.3%
*-commutative65.3%
associate-/r/65.2%
unpow265.2%
associate-/l*65.3%
associate-/r/70.9%
associate-*r/68.0%
unpow268.0%
associate-*l*75.8%
associate-/l/75.8%
Simplified75.8%
Taylor expanded in k around 0 81.1%
Final simplification63.4%
(FPCore (t l k) :precision binary64 (if (<= k 2.5e-33) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (* t (/ k l)) (* k (/ (pow (sin k) 2.0) (* l (cos k))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-33) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((t * (k / l)) * (k * (pow(sin(k), 2.0) / (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.5d-33) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / ((t * (k / l)) * (k * ((sin(k) ** 2.0d0) / (l * cos(k)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.5e-33) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((t * (k / l)) * (k * (Math.pow(Math.sin(k), 2.0) / (l * Math.cos(k)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.5e-33: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((t * (k / l)) * (k * (math.pow(math.sin(k), 2.0) / (l * math.cos(k))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.5e-33) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(t * Float64(k / l)) * Float64(k * Float64((sin(k) ^ 2.0) / Float64(l * cos(k)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.5e-33) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / ((t * (k / l)) * (k * ((sin(k) ^ 2.0) / (l * cos(k))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.5e-33], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-33}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(t \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \frac{{\sin k}^{2}}{\ell \cdot \cos k}\right)}\\
\end{array}
\end{array}
if k < 2.50000000000000014e-33Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/50.9%
associate-/r/50.9%
*-commutative50.9%
associate-/l/50.9%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in k around 0 48.5%
Taylor expanded in k around 0 45.3%
unpow245.3%
associate-*l*48.5%
Simplified48.5%
Taylor expanded in l around 0 45.3%
unpow245.3%
unpow245.3%
associate-*r*48.5%
times-frac55.1%
associate-/r*56.1%
Simplified56.1%
if 2.50000000000000014e-33 < k Initial program 52.3%
*-commutative52.3%
associate-*l*52.3%
associate-*r*52.3%
+-commutative52.3%
associate-+r+52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in k around inf 65.3%
*-commutative65.3%
unpow265.3%
times-frac65.6%
unpow265.6%
Simplified65.6%
Taylor expanded in t around 0 65.3%
times-frac62.8%
*-commutative62.8%
*-commutative62.8%
associate-/l*62.8%
times-frac65.3%
*-commutative65.3%
associate-/r/65.2%
unpow265.2%
associate-/l*65.3%
associate-/r/70.9%
associate-*r/68.0%
unpow268.0%
associate-*l*75.8%
associate-/l/75.8%
Simplified75.8%
Taylor expanded in k around 0 81.1%
associate-*r/81.2%
associate-/l*75.8%
Applied egg-rr75.8%
associate-*r/75.8%
*-commutative75.8%
associate-*l*80.7%
associate-/r/85.7%
*-commutative85.7%
Simplified85.7%
Final simplification64.8%
(FPCore (t l k)
:precision binary64
(if (<= k 0.042)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(if (<= k 9.5e+131)
(* (* l l) (/ 2.0 (* (tan k) (* t (* (sin k) (* k k))))))
(*
2.0
(*
(* (/ l k) (/ l k))
(+ (/ 1.0 (* t (* k k))) (+ (/ 0.3333333333333333 t) (/ -0.5 t))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 0.042) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else if (k <= 9.5e+131) {
tmp = (l * l) * (2.0 / (tan(k) * (t * (sin(k) * (k * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / 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 <= 0.042d0) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else if (k <= 9.5d+131) then
tmp = (l * l) * (2.0d0 / (tan(k) * (t * (sin(k) * (k * k)))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / (t * (k * k))) + ((0.3333333333333333d0 / t) + ((-0.5d0) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.042) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else if (k <= 9.5e+131) {
tmp = (l * l) * (2.0 / (Math.tan(k) * (t * (Math.sin(k) * (k * k)))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 0.042: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) elif k <= 9.5e+131: tmp = (l * l) * (2.0 / (math.tan(k) * (t * (math.sin(k) * (k * k))))) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 0.042) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); elseif (k <= 9.5e+131) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(tan(k) * Float64(t * Float64(sin(k) * Float64(k * k)))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(Float64(0.3333333333333333 / t) + Float64(-0.5 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 0.042) tmp = (l / k) * ((l / k) / (t ^ 3.0)); elseif (k <= 9.5e+131) tmp = (l * l) * (2.0 / (tan(k) * (t * (sin(k) * (k * k))))); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 0.042], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+131], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(t * N[(N[Sin[k], $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 / t), $MachinePrecision] + N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.042:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+131}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\tan k \cdot \left(t \cdot \left(\sin k \cdot \left(k \cdot k\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \left(\frac{0.3333333333333333}{t} + \frac{-0.5}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 0.0420000000000000026Initial program 53.5%
associate-/l/53.5%
associate-*l/53.5%
associate-*l/52.4%
associate-/r/52.4%
*-commutative52.4%
associate-/l/52.4%
associate-*r*53.0%
*-commutative53.0%
associate-*r*53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in k around 0 50.2%
Taylor expanded in k around 0 47.2%
unpow247.2%
associate-*l*50.2%
Simplified50.2%
Taylor expanded in l around 0 47.2%
unpow247.2%
unpow247.2%
associate-*r*50.2%
times-frac56.4%
associate-/r*57.4%
Simplified57.4%
if 0.0420000000000000026 < k < 9.50000000000000015e131Initial program 32.1%
associate-/l/32.1%
associate-*l/32.1%
associate-*l/32.1%
associate-/r/32.1%
*-commutative32.1%
associate-/l/32.1%
associate-*r*32.1%
*-commutative32.1%
associate-*r*32.1%
*-commutative32.1%
Simplified32.1%
Taylor expanded in k around inf 64.4%
associate-*r*64.4%
unpow264.4%
Simplified64.4%
if 9.50000000000000015e131 < k Initial program 54.5%
associate-*l*54.5%
associate-/l/54.5%
*-commutative54.5%
associate-*r/54.5%
associate-/l*54.3%
associate-/r/54.3%
Simplified55.1%
Taylor expanded in k around inf 68.4%
associate-*r/68.4%
times-frac68.2%
unpow268.2%
associate-/r*68.2%
*-commutative68.2%
unpow268.2%
Simplified68.2%
Taylor expanded in k around 0 68.1%
cancel-sign-sub-inv68.1%
fma-def68.1%
unpow268.1%
associate-/r*68.1%
unpow268.1%
associate-*r/68.1%
unpow268.1%
associate-/r*68.1%
metadata-eval68.1%
unpow268.1%
Simplified68.1%
Taylor expanded in l around 0 68.2%
associate-/l*68.4%
associate-/r/68.5%
unpow268.5%
unpow268.5%
times-frac71.7%
sub-neg71.7%
+-commutative71.7%
associate-+l+71.7%
*-commutative71.7%
unpow271.7%
associate-*r/71.7%
metadata-eval71.7%
associate-*r/71.7%
metadata-eval71.7%
distribute-neg-frac71.7%
metadata-eval71.7%
Simplified71.7%
Final simplification60.5%
(FPCore (t l k) :precision binary64 (if (<= k 0.041) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (* (/ t l) (* k (/ k l))) (* (sin k) (tan k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 0.041) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((t / l) * (k * (k / l))) * (sin(k) * tan(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 <= 0.041d0) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((t / l) * (k * (k / l))) * (sin(k) * tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 0.041) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (((t / l) * (k * (k / l))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 0.041: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (((t / l) * (k * (k / l))) * (math.sin(k) * math.tan(k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 0.041) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(t / l) * Float64(k * Float64(k / l))) * Float64(sin(k) * tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 0.041) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((t / l) * (k * (k / l))) * (sin(k) * tan(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 0.041], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t / l), $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 0.041:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right)\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 0.0410000000000000017Initial program 53.5%
associate-/l/53.5%
associate-*l/53.5%
associate-*l/52.4%
associate-/r/52.4%
*-commutative52.4%
associate-/l/52.4%
associate-*r*53.0%
*-commutative53.0%
associate-*r*53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in k around 0 50.2%
Taylor expanded in k around 0 47.2%
unpow247.2%
associate-*l*50.2%
Simplified50.2%
Taylor expanded in l around 0 47.2%
unpow247.2%
unpow247.2%
associate-*r*50.2%
times-frac56.4%
associate-/r*57.4%
Simplified57.4%
if 0.0410000000000000017 < k Initial program 48.0%
*-commutative48.0%
associate-*l*47.9%
associate-*r*47.9%
+-commutative47.9%
associate-+r+47.9%
metadata-eval47.9%
Simplified47.9%
Taylor expanded in k around inf 67.2%
*-commutative67.2%
unpow267.2%
times-frac67.5%
unpow267.5%
Simplified67.5%
Taylor expanded in k around 0 67.5%
unpow267.5%
associate-/l*75.1%
associate-/r/75.1%
Simplified75.1%
Final simplification61.9%
(FPCore (t l k) :precision binary64 (if (<= k 2.6e-33) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (/ t l) (* (sin k) (* (tan k) (* k (/ k l))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e-33) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (sin(k) * (tan(k) * (k * (k / l)))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.6d-33) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / ((t / l) * (sin(k) * (tan(k) * (k * (k / l)))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.6e-33) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((t / l) * (Math.sin(k) * (Math.tan(k) * (k * (k / l)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.6e-33: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((t / l) * (math.sin(k) * (math.tan(k) * (k * (k / l))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.6e-33) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(t / l) * Float64(sin(k) * Float64(tan(k) * Float64(k * Float64(k / l)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.6e-33) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / ((t / l) * (sin(k) * (tan(k) * (k * (k / l))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.6e-33], 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[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{-33}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(k \cdot \frac{k}{\ell}\right)\right)\right)}\\
\end{array}
\end{array}
if k < 2.59999999999999994e-33Initial program 52.0%
associate-/l/52.0%
associate-*l/52.0%
associate-*l/50.9%
associate-/r/50.9%
*-commutative50.9%
associate-/l/50.9%
associate-*r*51.4%
*-commutative51.4%
associate-*r*51.4%
*-commutative51.4%
Simplified51.4%
Taylor expanded in k around 0 48.5%
Taylor expanded in k around 0 45.3%
unpow245.3%
associate-*l*48.5%
Simplified48.5%
Taylor expanded in l around 0 45.3%
unpow245.3%
unpow245.3%
associate-*r*48.5%
times-frac55.1%
associate-/r*56.1%
Simplified56.1%
if 2.59999999999999994e-33 < k Initial program 52.3%
*-commutative52.3%
associate-*l*52.3%
associate-*r*52.3%
+-commutative52.3%
associate-+r+52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in k around inf 65.3%
*-commutative65.3%
unpow265.3%
times-frac65.6%
unpow265.6%
Simplified65.6%
pow165.6%
associate-*l*66.8%
Applied egg-rr66.8%
unpow166.8%
*-commutative66.8%
associate-*l*66.7%
associate-/l*73.4%
associate-/r/73.4%
Simplified73.4%
Final simplification61.2%
(FPCore (t l k)
:precision binary64
(if (or (<= t -6.5e-52) (not (<= t 1.66e-13)))
(* l (/ (/ l k) (* (pow t 3.0) k)))
(*
2.0
(*
(* (/ l k) (/ l k))
(+ (/ 1.0 (* t (* k k))) (+ (/ 0.3333333333333333 t) (/ -0.5 t)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -6.5e-52) || !(t <= 1.66e-13)) {
tmp = l * ((l / k) / (pow(t, 3.0) * k));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / 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 <= (-6.5d-52)) .or. (.not. (t <= 1.66d-13))) then
tmp = l * ((l / k) / ((t ** 3.0d0) * k))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / (t * (k * k))) + ((0.3333333333333333d0 / t) + ((-0.5d0) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -6.5e-52) || !(t <= 1.66e-13)) {
tmp = l * ((l / k) / (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -6.5e-52) or not (t <= 1.66e-13): tmp = l * ((l / k) / (math.pow(t, 3.0) * k)) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -6.5e-52) || !(t <= 1.66e-13)) tmp = Float64(l * Float64(Float64(l / k) / Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(Float64(0.3333333333333333 / t) + Float64(-0.5 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -6.5e-52) || ~((t <= 1.66e-13))) tmp = l * ((l / k) / ((t ^ 3.0) * k)); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -6.5e-52], N[Not[LessEqual[t, 1.66e-13]], $MachinePrecision]], N[(l * N[(N[(l / k), $MachinePrecision] / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 / t), $MachinePrecision] + N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-52} \lor \neg \left(t \leq 1.66 \cdot 10^{-13}\right):\\
\;\;\;\;\ell \cdot \frac{\frac{\ell}{k}}{{t}^{3} \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \left(\frac{0.3333333333333333}{t} + \frac{-0.5}{t}\right)\right)\right)\\
\end{array}
\end{array}
if t < -6.5e-52 or 1.66e-13 < t Initial program 58.5%
associate-*l*58.5%
associate-/l/58.5%
*-commutative58.5%
associate-*r/59.1%
associate-/l*58.5%
associate-/r/53.4%
Simplified58.8%
Taylor expanded in k around 0 50.8%
unpow250.8%
*-commutative50.8%
times-frac53.5%
unpow253.5%
Simplified53.5%
Taylor expanded in l around 0 50.8%
unpow250.8%
associate-/l*54.4%
associate-/l*54.4%
associate-/r/54.0%
unpow254.0%
associate-/l*58.1%
associate-/r/58.1%
Simplified58.1%
Taylor expanded in l around 0 50.8%
unpow250.8%
unpow250.8%
associate-*r*55.1%
associate-/l*58.9%
associate-*l/60.0%
*-rgt-identity60.0%
associate-*r/60.0%
associate-/r*60.0%
associate-/r/60.0%
*-commutative60.0%
associate-*r/60.0%
*-rgt-identity60.0%
Simplified60.0%
if -6.5e-52 < t < 1.66e-13Initial program 43.2%
associate-*l*43.2%
associate-/l/43.3%
*-commutative43.3%
associate-*r/42.4%
associate-/l*43.2%
associate-/r/42.3%
Simplified47.0%
Taylor expanded in k around inf 68.2%
associate-*r/68.2%
times-frac68.0%
unpow268.0%
associate-/r*68.1%
*-commutative68.1%
unpow268.1%
Simplified68.1%
Taylor expanded in k around 0 37.9%
cancel-sign-sub-inv37.9%
fma-def37.9%
unpow237.9%
associate-/r*38.0%
unpow238.0%
associate-*r/42.7%
unpow242.7%
associate-/r*42.7%
metadata-eval42.7%
unpow242.7%
Simplified42.7%
Taylor expanded in l around 0 63.2%
associate-/l*62.7%
associate-/r/63.4%
unpow263.4%
unpow263.4%
times-frac70.1%
sub-neg70.1%
+-commutative70.1%
associate-+l+70.1%
*-commutative70.1%
unpow270.1%
associate-*r/70.1%
metadata-eval70.1%
associate-*r/70.1%
metadata-eval70.1%
distribute-neg-frac70.1%
metadata-eval70.1%
Simplified70.1%
Final simplification64.2%
(FPCore (t l k)
:precision binary64
(if (or (<= t -1.46e-52) (not (<= t 2.4e-13)))
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(*
2.0
(*
(* (/ l k) (/ l k))
(+ (/ 1.0 (* t (* k k))) (+ (/ 0.3333333333333333 t) (/ -0.5 t)))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.46e-52) || !(t <= 2.4e-13)) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / 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.46d-52)) .or. (.not. (t <= 2.4d-13))) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / (t * (k * k))) + ((0.3333333333333333d0 / t) + ((-0.5d0) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.46e-52) || !(t <= 2.4e-13)) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -1.46e-52) or not (t <= 2.4e-13): tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -1.46e-52) || !(t <= 2.4e-13)) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(Float64(0.3333333333333333 / t) + Float64(-0.5 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.46e-52) || ~((t <= 2.4e-13))) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.46e-52], N[Not[LessEqual[t, 2.4e-13]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 / t), $MachinePrecision] + N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.46 \cdot 10^{-52} \lor \neg \left(t \leq 2.4 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \left(\frac{0.3333333333333333}{t} + \frac{-0.5}{t}\right)\right)\right)\\
\end{array}
\end{array}
if t < -1.46000000000000003e-52 or 2.3999999999999999e-13 < t Initial program 58.5%
associate-/l/58.5%
associate-*l/59.1%
associate-*l/58.4%
associate-/r/58.4%
*-commutative58.4%
associate-/l/58.4%
associate-*r*58.4%
*-commutative58.4%
associate-*r*58.4%
*-commutative58.4%
Simplified58.4%
Taylor expanded in k around 0 53.8%
Taylor expanded in k around 0 50.8%
unpow250.8%
associate-*l*55.1%
Simplified55.1%
Taylor expanded in l around 0 50.8%
unpow250.8%
unpow250.8%
associate-*r*55.1%
times-frac60.6%
associate-/r*61.3%
Simplified61.3%
if -1.46000000000000003e-52 < t < 2.3999999999999999e-13Initial program 43.2%
associate-*l*43.2%
associate-/l/43.3%
*-commutative43.3%
associate-*r/42.4%
associate-/l*43.2%
associate-/r/42.3%
Simplified47.0%
Taylor expanded in k around inf 68.2%
associate-*r/68.2%
times-frac68.0%
unpow268.0%
associate-/r*68.1%
*-commutative68.1%
unpow268.1%
Simplified68.1%
Taylor expanded in k around 0 37.9%
cancel-sign-sub-inv37.9%
fma-def37.9%
unpow237.9%
associate-/r*38.0%
unpow238.0%
associate-*r/42.7%
unpow242.7%
associate-/r*42.7%
metadata-eval42.7%
unpow242.7%
Simplified42.7%
Taylor expanded in l around 0 63.2%
associate-/l*62.7%
associate-/r/63.4%
unpow263.4%
unpow263.4%
times-frac70.1%
sub-neg70.1%
+-commutative70.1%
associate-+l+70.1%
*-commutative70.1%
unpow270.1%
associate-*r/70.1%
metadata-eval70.1%
associate-*r/70.1%
metadata-eval70.1%
distribute-neg-frac70.1%
metadata-eval70.1%
Simplified70.1%
Final simplification65.0%
(FPCore (t l k)
:precision binary64
(if (<= k 4e+15)
(/ 2.0 (* (* k (/ k l)) (* k (* k (/ t l)))))
(*
2.0
(*
(* (/ l k) (/ l k))
(+ (/ 1.0 (* t (* k k))) (+ (/ 0.3333333333333333 t) (/ -0.5 t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / 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 <= 4d+15) then
tmp = 2.0d0 / ((k * (k / l)) * (k * (k * (t / l))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / (t * (k * k))) + ((0.3333333333333333d0 / t) + ((-0.5d0) / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4e+15: tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l)))) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4e+15) tmp = Float64(2.0 / Float64(Float64(k * Float64(k / l)) * Float64(k * Float64(k * Float64(t / l))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(Float64(0.3333333333333333 / t) + Float64(-0.5 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4e+15) tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l)))); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / (t * (k * k))) + ((0.3333333333333333 / t) + (-0.5 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4e+15], N[(2.0 / N[(N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 / t), $MachinePrecision] + N[(-0.5 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{2}{\left(k \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \left(k \cdot \frac{t}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \left(\frac{0.3333333333333333}{t} + \frac{-0.5}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 4e15Initial program 53.5%
*-commutative53.5%
associate-*l*49.6%
associate-*r*49.6%
+-commutative49.6%
associate-+r+49.6%
metadata-eval49.6%
Simplified49.6%
Taylor expanded in k around inf 51.0%
*-commutative51.0%
unpow251.0%
times-frac56.9%
unpow256.9%
Simplified56.9%
Taylor expanded in t around 0 49.0%
times-frac51.0%
*-commutative51.0%
*-commutative51.0%
associate-/l*51.0%
times-frac51.0%
*-commutative51.0%
associate-/r/51.0%
unpow251.0%
associate-/l*52.3%
associate-/r/55.1%
associate-*r/57.4%
unpow257.4%
associate-*l*60.5%
associate-/l/60.5%
Simplified60.5%
Taylor expanded in k around 0 53.5%
unpow253.5%
associate-*r/55.6%
Simplified55.6%
if 4e15 < k Initial program 48.0%
associate-*l*48.0%
associate-/l/48.0%
*-commutative48.0%
associate-*r/48.0%
associate-/l*47.9%
associate-/r/47.9%
Simplified50.1%
Taylor expanded in k around inf 67.2%
associate-*r/67.2%
times-frac64.2%
unpow264.2%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
Simplified64.3%
Taylor expanded in k around 0 54.0%
cancel-sign-sub-inv54.0%
fma-def54.0%
unpow254.0%
associate-/r*54.0%
unpow254.0%
associate-*r/54.0%
unpow254.0%
associate-/r*54.0%
metadata-eval54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in l around 0 58.9%
associate-/l*60.6%
associate-/r/59.1%
unpow259.1%
unpow259.1%
times-frac61.4%
sub-neg61.4%
+-commutative61.4%
associate-+l+61.4%
*-commutative61.4%
unpow261.4%
associate-*r/61.4%
metadata-eval61.4%
associate-*r/61.4%
metadata-eval61.4%
distribute-neg-frac61.4%
metadata-eval61.4%
Simplified61.4%
Final simplification57.1%
(FPCore (t l k) :precision binary64 (if (<= k 4e+15) (* (/ 2.0 (* k k)) (* (/ l t) (/ (/ l k) k))) (* 2.0 (* (/ (* l (/ l t)) k) (/ -0.16666666666666666 k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = (2.0 / (k * k)) * ((l / t) * ((l / k) / k));
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / 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 <= 4d+15) then
tmp = (2.0d0 / (k * k)) * ((l / t) * ((l / k) / k))
else
tmp = 2.0d0 * (((l * (l / t)) / k) * ((-0.16666666666666666d0) / k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = (2.0 / (k * k)) * ((l / t) * ((l / k) / k));
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4e+15: tmp = (2.0 / (k * k)) * ((l / t) * ((l / k) / k)) else: tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4e+15) tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64(l / t) * Float64(Float64(l / k) / k))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(l / t)) / k) * Float64(-0.16666666666666666 / k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4e+15) tmp = (2.0 / (k * k)) * ((l / t) * ((l / k) / k)); else tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4e+15], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(-0.16666666666666666 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \left(\frac{\ell}{t} \cdot \frac{\frac{\ell}{k}}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \frac{\ell}{t}}{k} \cdot \frac{-0.16666666666666666}{k}\right)\\
\end{array}
\end{array}
if k < 4e15Initial program 53.5%
associate-*l*53.5%
associate-/l/53.5%
*-commutative53.5%
associate-*r/53.6%
associate-/l*53.5%
associate-/r/49.1%
Simplified55.1%
Taylor expanded in k around inf 49.0%
associate-*r/49.0%
times-frac51.0%
unpow251.0%
associate-/r*51.0%
*-commutative51.0%
unpow251.0%
Simplified51.0%
Taylor expanded in k around 0 48.1%
unpow248.1%
times-frac53.5%
unpow253.5%
associate-/r*53.5%
Simplified53.5%
if 4e15 < k Initial program 48.0%
associate-*l*48.0%
associate-/l/48.0%
*-commutative48.0%
associate-*r/48.0%
associate-/l*47.9%
associate-/r/47.9%
Simplified50.1%
Taylor expanded in k around inf 67.2%
associate-*r/67.2%
times-frac64.2%
unpow264.2%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
Simplified64.3%
Taylor expanded in k around 0 54.0%
cancel-sign-sub-inv54.0%
fma-def54.0%
unpow254.0%
associate-/r*54.0%
unpow254.0%
associate-*r/54.0%
unpow254.0%
associate-/r*54.0%
metadata-eval54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in k around inf 54.0%
distribute-rgt-out58.9%
unpow258.9%
associate-/l*59.0%
metadata-eval59.0%
unpow259.0%
Simplified59.0%
times-frac60.9%
associate-/r/60.9%
Applied egg-rr60.9%
Final simplification55.4%
(FPCore (t l k) :precision binary64 (if (<= k 4e+15) (* (/ 2.0 (* k k)) (/ (* (/ l k) (/ l t)) k)) (* 2.0 (* (/ (* l (/ l t)) k) (/ -0.16666666666666666 k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = (2.0 / (k * k)) * (((l / k) * (l / t)) / k);
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / 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 <= 4d+15) then
tmp = (2.0d0 / (k * k)) * (((l / k) * (l / t)) / k)
else
tmp = 2.0d0 * (((l * (l / t)) / k) * ((-0.16666666666666666d0) / k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4e+15) {
tmp = (2.0 / (k * k)) * (((l / k) * (l / t)) / k);
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4e+15: tmp = (2.0 / (k * k)) * (((l / k) * (l / t)) / k) else: tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4e+15) tmp = Float64(Float64(2.0 / Float64(k * k)) * Float64(Float64(Float64(l / k) * Float64(l / t)) / k)); else tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(l / t)) / k) * Float64(-0.16666666666666666 / k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4e+15) tmp = (2.0 / (k * k)) * (((l / k) * (l / t)) / k); else tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4e+15], N[(N[(2.0 / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(-0.16666666666666666 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\frac{2}{k \cdot k} \cdot \frac{\frac{\ell}{k} \cdot \frac{\ell}{t}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \frac{\ell}{t}}{k} \cdot \frac{-0.16666666666666666}{k}\right)\\
\end{array}
\end{array}
if k < 4e15Initial program 53.5%
associate-*l*53.5%
associate-/l/53.5%
*-commutative53.5%
associate-*r/53.6%
associate-/l*53.5%
associate-/r/49.1%
Simplified55.1%
Taylor expanded in k around inf 49.0%
associate-*r/49.0%
times-frac51.0%
unpow251.0%
associate-/r*51.0%
*-commutative51.0%
unpow251.0%
Simplified51.0%
Taylor expanded in k around 0 48.1%
unpow248.1%
times-frac53.5%
unpow253.5%
associate-/r*53.5%
Simplified53.5%
associate-*l/54.0%
Applied egg-rr54.0%
if 4e15 < k Initial program 48.0%
associate-*l*48.0%
associate-/l/48.0%
*-commutative48.0%
associate-*r/48.0%
associate-/l*47.9%
associate-/r/47.9%
Simplified50.1%
Taylor expanded in k around inf 67.2%
associate-*r/67.2%
times-frac64.2%
unpow264.2%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
Simplified64.3%
Taylor expanded in k around 0 54.0%
cancel-sign-sub-inv54.0%
fma-def54.0%
unpow254.0%
associate-/r*54.0%
unpow254.0%
associate-*r/54.0%
unpow254.0%
associate-/r*54.0%
metadata-eval54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in k around inf 54.0%
distribute-rgt-out58.9%
unpow258.9%
associate-/l*59.0%
metadata-eval59.0%
unpow259.0%
Simplified59.0%
times-frac60.9%
associate-/r/60.9%
Applied egg-rr60.9%
Final simplification55.8%
(FPCore (t l k) :precision binary64 (if (<= k 4.9e+15) (/ 2.0 (* (* k (/ k l)) (* k (* k (/ t l))))) (* 2.0 (* (/ (* l (/ l t)) k) (/ -0.16666666666666666 k)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 4.9e+15) {
tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l))));
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / 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 <= 4.9d+15) then
tmp = 2.0d0 / ((k * (k / l)) * (k * (k * (t / l))))
else
tmp = 2.0d0 * (((l * (l / t)) / k) * ((-0.16666666666666666d0) / k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 4.9e+15) {
tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l))));
} else {
tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 4.9e+15: tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l)))) else: tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 4.9e+15) tmp = Float64(2.0 / Float64(Float64(k * Float64(k / l)) * Float64(k * Float64(k * Float64(t / l))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * Float64(l / t)) / k) * Float64(-0.16666666666666666 / k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 4.9e+15) tmp = 2.0 / ((k * (k / l)) * (k * (k * (t / l)))); else tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 4.9e+15], N[(2.0 / N[(N[(k * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(-0.16666666666666666 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 4.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{2}{\left(k \cdot \frac{k}{\ell}\right) \cdot \left(k \cdot \left(k \cdot \frac{t}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \frac{\ell}{t}}{k} \cdot \frac{-0.16666666666666666}{k}\right)\\
\end{array}
\end{array}
if k < 4.9e15Initial program 53.5%
*-commutative53.5%
associate-*l*49.6%
associate-*r*49.6%
+-commutative49.6%
associate-+r+49.6%
metadata-eval49.6%
Simplified49.6%
Taylor expanded in k around inf 51.0%
*-commutative51.0%
unpow251.0%
times-frac56.9%
unpow256.9%
Simplified56.9%
Taylor expanded in t around 0 49.0%
times-frac51.0%
*-commutative51.0%
*-commutative51.0%
associate-/l*51.0%
times-frac51.0%
*-commutative51.0%
associate-/r/51.0%
unpow251.0%
associate-/l*52.3%
associate-/r/55.1%
associate-*r/57.4%
unpow257.4%
associate-*l*60.5%
associate-/l/60.5%
Simplified60.5%
Taylor expanded in k around 0 53.5%
unpow253.5%
associate-*r/55.6%
Simplified55.6%
if 4.9e15 < k Initial program 48.0%
associate-*l*48.0%
associate-/l/48.0%
*-commutative48.0%
associate-*r/48.0%
associate-/l*47.9%
associate-/r/47.9%
Simplified50.1%
Taylor expanded in k around inf 67.2%
associate-*r/67.2%
times-frac64.2%
unpow264.2%
associate-/r*64.3%
*-commutative64.3%
unpow264.3%
Simplified64.3%
Taylor expanded in k around 0 54.0%
cancel-sign-sub-inv54.0%
fma-def54.0%
unpow254.0%
associate-/r*54.0%
unpow254.0%
associate-*r/54.0%
unpow254.0%
associate-/r*54.0%
metadata-eval54.0%
unpow254.0%
Simplified54.0%
Taylor expanded in k around inf 54.0%
distribute-rgt-out58.9%
unpow258.9%
associate-/l*59.0%
metadata-eval59.0%
unpow259.0%
Simplified59.0%
times-frac60.9%
associate-/r/60.9%
Applied egg-rr60.9%
Final simplification57.0%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ (* l (/ l t)) k) (/ -0.16666666666666666 k))))
double code(double t, double l, double k) {
return 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * (((l * (l / t)) / k) * ((-0.16666666666666666d0) / k))
end function
public static double code(double t, double l, double k) {
return 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k));
}
def code(t, l, k): return 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k))
function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l * Float64(l / t)) / k) * Float64(-0.16666666666666666 / k))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l * (l / t)) / k) * (-0.16666666666666666 / k)); end
code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[(-0.16666666666666666 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell \cdot \frac{\ell}{t}}{k} \cdot \frac{-0.16666666666666666}{k}\right)
\end{array}
Initial program 52.1%
associate-*l*52.1%
associate-/l/52.1%
*-commutative52.1%
associate-*r/52.1%
associate-/l*52.1%
associate-/r/48.8%
Simplified53.9%
Taylor expanded in k around inf 53.6%
associate-*r/53.6%
times-frac54.3%
unpow254.3%
associate-/r*54.4%
*-commutative54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in k around 0 36.5%
cancel-sign-sub-inv36.5%
fma-def36.5%
unpow236.5%
associate-/r*36.6%
unpow236.6%
associate-*r/38.2%
unpow238.2%
associate-/r*38.2%
metadata-eval38.2%
unpow238.2%
Simplified38.2%
Taylor expanded in k around inf 31.2%
distribute-rgt-out32.9%
unpow232.9%
associate-/l*34.2%
metadata-eval34.2%
unpow234.2%
Simplified34.2%
times-frac37.3%
associate-/r/37.3%
Applied egg-rr37.3%
Final simplification37.3%
(FPCore (t l k) :precision binary64 (* -0.3333333333333333 (/ (/ (* l l) (* k k)) t)))
double code(double t, double l, double k) {
return -0.3333333333333333 * (((l * l) / (k * k)) / 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.3333333333333333d0) * (((l * l) / (k * k)) / t)
end function
public static double code(double t, double l, double k) {
return -0.3333333333333333 * (((l * l) / (k * k)) / t);
}
def code(t, l, k): return -0.3333333333333333 * (((l * l) / (k * k)) / t)
function code(t, l, k) return Float64(-0.3333333333333333 * Float64(Float64(Float64(l * l) / Float64(k * k)) / t)) end
function tmp = code(t, l, k) tmp = -0.3333333333333333 * (((l * l) / (k * k)) / t); end
code[t_, l_, k_] := N[(-0.3333333333333333 * N[(N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.3333333333333333 \cdot \frac{\frac{\ell \cdot \ell}{k \cdot k}}{t}
\end{array}
Initial program 52.1%
associate-*l*52.1%
associate-/l/52.1%
*-commutative52.1%
associate-*r/52.1%
associate-/l*52.1%
associate-/r/48.8%
Simplified53.9%
Taylor expanded in k around inf 53.6%
associate-*r/53.6%
times-frac54.3%
unpow254.3%
associate-/r*54.4%
*-commutative54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in k around 0 36.5%
cancel-sign-sub-inv36.5%
fma-def36.5%
unpow236.5%
associate-/r*36.6%
unpow236.6%
associate-*r/38.2%
unpow238.2%
associate-/r*38.2%
metadata-eval38.2%
unpow238.2%
Simplified38.2%
Taylor expanded in k around inf 31.2%
distribute-rgt-out32.9%
unpow232.9%
associate-/l*34.2%
metadata-eval34.2%
unpow234.2%
Simplified34.2%
Taylor expanded in l around 0 30.4%
associate-/r*30.0%
unpow230.0%
unpow230.0%
Simplified30.0%
Final simplification30.0%
(FPCore (t l k) :precision binary64 (* (/ (* l l) k) (/ -0.3333333333333333 (* t k))))
double code(double t, double l, double k) {
return ((l * l) / k) * (-0.3333333333333333 / (t * k));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l * l) / k) * ((-0.3333333333333333d0) / (t * k))
end function
public static double code(double t, double l, double k) {
return ((l * l) / k) * (-0.3333333333333333 / (t * k));
}
def code(t, l, k): return ((l * l) / k) * (-0.3333333333333333 / (t * k))
function code(t, l, k) return Float64(Float64(Float64(l * l) / k) * Float64(-0.3333333333333333 / Float64(t * k))) end
function tmp = code(t, l, k) tmp = ((l * l) / k) * (-0.3333333333333333 / (t * k)); end
code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] / k), $MachinePrecision] * N[(-0.3333333333333333 / N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell \cdot \ell}{k} \cdot \frac{-0.3333333333333333}{t \cdot k}
\end{array}
Initial program 52.1%
associate-*l*52.1%
associate-/l/52.1%
*-commutative52.1%
associate-*r/52.1%
associate-/l*52.1%
associate-/r/48.8%
Simplified53.9%
Taylor expanded in k around inf 53.6%
associate-*r/53.6%
times-frac54.3%
unpow254.3%
associate-/r*54.4%
*-commutative54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in k around 0 36.5%
cancel-sign-sub-inv36.5%
fma-def36.5%
unpow236.5%
associate-/r*36.6%
unpow236.6%
associate-*r/38.2%
unpow238.2%
associate-/r*38.2%
metadata-eval38.2%
unpow238.2%
Simplified38.2%
Taylor expanded in k around inf 31.2%
distribute-rgt-out32.9%
unpow232.9%
associate-/l*34.2%
metadata-eval34.2%
unpow234.2%
Simplified34.2%
Taylor expanded in l around 0 30.4%
associate-*r/30.4%
*-commutative30.4%
unpow230.4%
associate-*r*32.2%
times-frac32.4%
unpow232.4%
Simplified32.4%
Final simplification32.4%
(FPCore (t l k) :precision binary64 (/ (* -0.3333333333333333 (* l (/ l t))) (* k k)))
double code(double t, double l, double k) {
return (-0.3333333333333333 * (l * (l / t))) / (k * k);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((-0.3333333333333333d0) * (l * (l / t))) / (k * k)
end function
public static double code(double t, double l, double k) {
return (-0.3333333333333333 * (l * (l / t))) / (k * k);
}
def code(t, l, k): return (-0.3333333333333333 * (l * (l / t))) / (k * k)
function code(t, l, k) return Float64(Float64(-0.3333333333333333 * Float64(l * Float64(l / t))) / Float64(k * k)) end
function tmp = code(t, l, k) tmp = (-0.3333333333333333 * (l * (l / t))) / (k * k); end
code[t_, l_, k_] := N[(N[(-0.3333333333333333 * N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-0.3333333333333333 \cdot \left(\ell \cdot \frac{\ell}{t}\right)}{k \cdot k}
\end{array}
Initial program 52.1%
associate-*l*52.1%
associate-/l/52.1%
*-commutative52.1%
associate-*r/52.1%
associate-/l*52.1%
associate-/r/48.8%
Simplified53.9%
Taylor expanded in k around inf 53.6%
associate-*r/53.6%
times-frac54.3%
unpow254.3%
associate-/r*54.4%
*-commutative54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in k around 0 36.5%
cancel-sign-sub-inv36.5%
fma-def36.5%
unpow236.5%
associate-/r*36.6%
unpow236.6%
associate-*r/38.2%
unpow238.2%
associate-/r*38.2%
metadata-eval38.2%
unpow238.2%
Simplified38.2%
Taylor expanded in k around inf 30.8%
unpow230.8%
associate-/l*32.1%
Simplified32.1%
Taylor expanded in k around 0 31.2%
associate-*r/31.2%
distribute-rgt-out32.9%
unpow232.9%
associate-*l/34.2%
metadata-eval34.2%
*-commutative34.2%
associate-*r*34.2%
metadata-eval34.2%
*-commutative34.2%
unpow234.2%
Simplified34.2%
Final simplification34.2%
herbie shell --seed 2023215
(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))))