
(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 15 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))))
1e+186)
(/
(/ (* 2.0 (* l l)) (tan k))
(* (+ 2.0 t_1) (pow (* t (cbrt (sin k))) 3.0)))
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan 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)))) <= 1e+186) {
tmp = ((2.0 * (l * l)) / tan(k)) / ((2.0 + t_1) * pow((t * cbrt(sin(k))), 3.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
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)))) <= 1e+186) {
tmp = ((2.0 * (l * l)) / Math.tan(k)) / ((2.0 + t_1) * Math.pow((t * Math.cbrt(Math.sin(k))), 3.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(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)))) <= 1e+186) tmp = Float64(Float64(Float64(2.0 * Float64(l * l)) / tan(k)) / Float64(Float64(2.0 + t_1) * (Float64(t * cbrt(sin(k))) ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); 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], 1e+186], N[(N[(N[(2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[(2.0 + t$95$1), $MachinePrecision] * N[Power[N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $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 10^{+186}:\\
\;\;\;\;\frac{\frac{2 \cdot \left(\ell \cdot \ell\right)}{\tan k}}{\left(2 + t_1\right) \cdot {\left(t \cdot \sqrt[3]{\sin k}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan 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))) < 9.9999999999999998e185Initial program 84.5%
associate-/l/84.5%
associate-*l/85.1%
associate-*l/81.9%
associate-/r/83.0%
*-commutative83.0%
associate-/l/83.0%
associate-*r*83.0%
*-commutative83.0%
associate-*r*83.0%
*-commutative83.0%
Simplified83.0%
add-cube-cbrt82.9%
pow382.9%
cbrt-prod82.9%
unpow382.9%
add-cbrt-cube85.6%
Applied egg-rr85.6%
associate-*r/85.6%
Applied egg-rr85.6%
associate-/r*88.1%
unpow288.1%
*-commutative88.1%
unpow288.1%
Simplified88.1%
if 9.9999999999999998e185 < (/.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 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*r*25.0%
+-commutative25.0%
associate-+r+25.0%
metadata-eval25.0%
Simplified25.0%
Taylor expanded in k around inf 57.1%
*-commutative57.1%
unpow257.1%
times-frac67.1%
unpow267.1%
Simplified67.1%
associate-*l/67.3%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in t around 0 57.1%
associate-/l*56.1%
unpow256.1%
unpow256.1%
associate-*r/61.8%
times-frac83.6%
associate-/l*84.5%
*-commutative84.5%
associate-/l*87.7%
Simplified87.7%
Final simplification87.9%
(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+61)
(*
(* l l)
(/ 2.0 (* (tan k) (* (+ 2.0 t_1) (pow (* t (cbrt (sin k))) 3.0)))))
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan 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+61) {
tmp = (l * l) * (2.0 / (tan(k) * ((2.0 + t_1) * pow((t * cbrt(sin(k))), 3.0))));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
}
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)))) <= 2e+61) {
tmp = (l * l) * (2.0 / (Math.tan(k) * ((2.0 + t_1) * Math.pow((t * Math.cbrt(Math.sin(k))), 3.0))));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(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+61) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64(tan(k) * Float64(Float64(2.0 + t_1) * (Float64(t * cbrt(sin(k))) ^ 3.0))))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); 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], 2e+61], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + t$95$1), $MachinePrecision] * N[Power[N[(t * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $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^{+61}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{\tan k \cdot \left(\left(2 + t_1\right) \cdot {\left(t \cdot \sqrt[3]{\sin k}\right)}^{3}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if (/.f64 2 (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))) < 1.9999999999999999e61Initial program 84.3%
associate-/l/84.3%
associate-*l/84.9%
associate-*l/83.0%
associate-/r/84.1%
*-commutative84.1%
associate-/l/84.1%
associate-*r*84.1%
*-commutative84.1%
associate-*r*84.1%
*-commutative84.1%
Simplified84.1%
add-cube-cbrt84.0%
pow384.0%
cbrt-prod84.0%
unpow384.0%
add-cbrt-cube86.7%
Applied egg-rr86.7%
if 1.9999999999999999e61 < (/.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 26.3%
*-commutative26.3%
associate-*l*26.3%
associate-*r*26.3%
+-commutative26.3%
associate-+r+26.3%
metadata-eval26.3%
Simplified26.3%
Taylor expanded in k around inf 56.2%
*-commutative56.2%
unpow256.2%
times-frac66.0%
unpow266.0%
Simplified66.0%
associate-*l/66.2%
associate-/l*75.7%
Applied egg-rr75.7%
Taylor expanded in t around 0 56.2%
associate-/l*55.2%
unpow255.2%
unpow255.2%
associate-*r/60.8%
times-frac82.2%
associate-/l*83.1%
*-commutative83.1%
associate-/l*86.3%
Simplified86.3%
Final simplification86.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1
(/
2.0
(*
(* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
(+ 1.0 (+ 1.0 (pow (/ k t) 2.0)))))))
(if (<= t_1 1e+186)
t_1
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k)))))))
double code(double t, double l, double k) {
double t_1 = 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + pow((k / t), 2.0))));
double tmp;
if (t_1 <= 1e+186) {
tmp = t_1;
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * (1.0d0 + (1.0d0 + ((k / t) ** 2.0d0))))
if (t_1 <= 1d+186) then
tmp = t_1
else
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * (1.0 + (1.0 + Math.pow((k / t), 2.0))));
double tmp;
if (t_1 <= 1e+186) {
tmp = t_1;
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * (1.0 + (1.0 + math.pow((k / t), 2.0)))) tmp = 0 if t_1 <= 1e+186: tmp = t_1 else: tmp = 2.0 / (((k / l) * (t / (l / k))) * (math.sin(k) * math.tan(k))) return tmp
function code(t, l, k) t_1 = Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))))) tmp = 0.0 if (t_1 <= 1e+186) tmp = t_1; else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * (1.0 + (1.0 + ((k / t) ^ 2.0)))); tmp = 0.0; if (t_1 <= 1e+186) tmp = t_1; else tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = 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 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+186], t$95$1, N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}\\
\mathbf{if}\;t_1 \leq 10^{+186}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan 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))) < 9.9999999999999998e185Initial program 84.5%
if 9.9999999999999998e185 < (/.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 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*r*25.0%
+-commutative25.0%
associate-+r+25.0%
metadata-eval25.0%
Simplified25.0%
Taylor expanded in k around inf 57.1%
*-commutative57.1%
unpow257.1%
times-frac67.1%
unpow267.1%
Simplified67.1%
associate-*l/67.3%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in t around 0 57.1%
associate-/l*56.1%
unpow256.1%
unpow256.1%
associate-*r/61.8%
times-frac83.6%
associate-/l*84.5%
*-commutative84.5%
associate-/l*87.7%
Simplified87.7%
Final simplification85.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (+ 1.0 (+ 1.0 (pow (/ k t) 2.0))))
(t_2 (* (/ (pow t 3.0) (* l l)) (sin k))))
(if (<= (/ 2.0 (* (* t_2 (tan k)) t_1)) 1e+186)
(/ 2.0 (* t_2 (* (tan k) t_1)))
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k)))))))
double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + pow((k / t), 2.0));
double t_2 = (pow(t, 3.0) / (l * l)) * sin(k);
double tmp;
if ((2.0 / ((t_2 * tan(k)) * t_1)) <= 1e+186) {
tmp = 2.0 / (t_2 * (tan(k) * t_1));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 + (1.0d0 + ((k / t) ** 2.0d0))
t_2 = ((t ** 3.0d0) / (l * l)) * sin(k)
if ((2.0d0 / ((t_2 * tan(k)) * t_1)) <= 1d+186) then
tmp = 2.0d0 / (t_2 * (tan(k) * t_1))
else
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 1.0 + (1.0 + Math.pow((k / t), 2.0));
double t_2 = (Math.pow(t, 3.0) / (l * l)) * Math.sin(k);
double tmp;
if ((2.0 / ((t_2 * Math.tan(k)) * t_1)) <= 1e+186) {
tmp = 2.0 / (t_2 * (Math.tan(k) * t_1));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
}
return tmp;
}
def code(t, l, k): t_1 = 1.0 + (1.0 + math.pow((k / t), 2.0)) t_2 = (math.pow(t, 3.0) / (l * l)) * math.sin(k) tmp = 0 if (2.0 / ((t_2 * math.tan(k)) * t_1)) <= 1e+186: tmp = 2.0 / (t_2 * (math.tan(k) * t_1)) else: tmp = 2.0 / (((k / l) * (t / (l / k))) * (math.sin(k) * math.tan(k))) return tmp
function code(t, l, k) t_1 = Float64(1.0 + Float64(1.0 + (Float64(k / t) ^ 2.0))) t_2 = Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) tmp = 0.0 if (Float64(2.0 / Float64(Float64(t_2 * tan(k)) * t_1)) <= 1e+186) tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * t_1))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 1.0 + (1.0 + ((k / t) ^ 2.0)); t_2 = ((t ^ 3.0) / (l * l)) * sin(k); tmp = 0.0; if ((2.0 / ((t_2 * tan(k)) * t_1)) <= 1e+186) tmp = 2.0 / (t_2 * (tan(k) * t_1)); else tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k))); end tmp_2 = 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]}, Block[{t$95$2 = N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(t$95$2 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 1e+186], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\\
t_2 := \frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\\
\mathbf{if}\;\frac{2}{\left(t_2 \cdot \tan k\right) \cdot t_1} \leq 10^{+186}:\\
\;\;\;\;\frac{2}{t_2 \cdot \left(\tan k \cdot t_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan 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))) < 9.9999999999999998e185Initial program 84.5%
associate-*l*84.5%
+-commutative84.5%
Simplified84.5%
if 9.9999999999999998e185 < (/.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 25.0%
*-commutative25.0%
associate-*l*25.0%
associate-*r*25.0%
+-commutative25.0%
associate-+r+25.0%
metadata-eval25.0%
Simplified25.0%
Taylor expanded in k around inf 57.1%
*-commutative57.1%
unpow257.1%
times-frac67.1%
unpow267.1%
Simplified67.1%
associate-*l/67.3%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in t around 0 57.1%
associate-/l*56.1%
unpow256.1%
unpow256.1%
associate-*r/61.8%
times-frac83.6%
associate-/l*84.5%
*-commutative84.5%
associate-/l*87.7%
Simplified87.7%
Final simplification85.9%
(FPCore (t l k) :precision binary64 (if (or (<= k -580000000.0) (not (<= k 9.6e-45))) (* 2.0 (/ (/ (/ l t) (/ k (/ l k))) (* (sin k) (tan k)))) (* (/ l k) (/ (/ l k) (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 9.6e-45)) {
tmp = 2.0 * (((l / t) / (k / (l / k))) / (sin(k) * tan(k)));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-580000000.0d0)) .or. (.not. (k <= 9.6d-45))) then
tmp = 2.0d0 * (((l / t) / (k / (l / k))) / (sin(k) * tan(k)))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 9.6e-45)) {
tmp = 2.0 * (((l / t) / (k / (l / k))) / (Math.sin(k) * Math.tan(k)));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= -580000000.0) or not (k <= 9.6e-45): tmp = 2.0 * (((l / t) / (k / (l / k))) / (math.sin(k) * math.tan(k))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= -580000000.0) || !(k <= 9.6e-45)) tmp = Float64(2.0 * Float64(Float64(Float64(l / t) / Float64(k / Float64(l / k))) / Float64(sin(k) * tan(k)))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= -580000000.0) || ~((k <= 9.6e-45))) tmp = 2.0 * (((l / t) / (k / (l / k))) / (sin(k) * tan(k))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, -580000000.0], N[Not[LessEqual[k, 9.6e-45]], $MachinePrecision]], N[(2.0 * N[(N[(N[(l / t), $MachinePrecision] / N[(k / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -580000000 \lor \neg \left(k \leq 9.6 \cdot 10^{-45}\right):\\
\;\;\;\;2 \cdot \frac{\frac{\frac{\ell}{t}}{\frac{k}{\frac{\ell}{k}}}}{\sin k \cdot \tan k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if k < -5.8e8 or 9.5999999999999996e-45 < k Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
+-commutative49.7%
associate-+r+49.7%
metadata-eval49.7%
Simplified49.7%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
unpow270.4%
times-frac74.0%
unpow274.0%
Simplified74.0%
associate-*l/74.2%
associate-/l*81.5%
Applied egg-rr81.5%
expm1-log1p-u72.2%
expm1-udef64.9%
associate-/r*64.9%
associate-/l*64.9%
associate-/r/64.9%
Applied egg-rr64.9%
expm1-def72.8%
expm1-log1p82.1%
associate-/r*82.1%
metadata-eval82.1%
associate-*r/82.1%
associate-/r*82.1%
associate-/r/80.8%
associate-/r*81.2%
associate-/r/81.2%
associate-*l/81.2%
*-lft-identity81.2%
associate-*l/74.1%
associate-/l*81.2%
Simplified81.2%
if -5.8e8 < k < 9.5999999999999996e-45Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
Final simplification80.3%
(FPCore (t l k) :precision binary64 (if (or (<= k -580000000.0) (not (<= k 2.3e-44))) (* l (* l (/ 2.0 (* (tan k) (* (sin k) (* k (* t k))))))) (* (/ l k) (/ (/ l k) (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 2.3e-44)) {
tmp = l * (l * (2.0 / (tan(k) * (sin(k) * (k * (t * k))))));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-580000000.0d0)) .or. (.not. (k <= 2.3d-44))) then
tmp = l * (l * (2.0d0 / (tan(k) * (sin(k) * (k * (t * k))))))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 2.3e-44)) {
tmp = l * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * (k * (t * k))))));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= -580000000.0) or not (k <= 2.3e-44): tmp = l * (l * (2.0 / (math.tan(k) * (math.sin(k) * (k * (t * k)))))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= -580000000.0) || !(k <= 2.3e-44)) tmp = Float64(l * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * Float64(k * Float64(t * k))))))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= -580000000.0) || ~((k <= 2.3e-44))) tmp = l * (l * (2.0 / (tan(k) * (sin(k) * (k * (t * k)))))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, -580000000.0], N[Not[LessEqual[k, 2.3e-44]], $MachinePrecision]], N[(l * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -580000000 \lor \neg \left(k \leq 2.3 \cdot 10^{-44}\right):\\
\;\;\;\;\ell \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot \left(k \cdot \left(t \cdot k\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if k < -5.8e8 or 2.29999999999999998e-44 < k Initial program 49.7%
associate-/l/49.7%
associate-*l/49.7%
associate-*l/49.7%
associate-/r/51.0%
*-commutative51.0%
associate-/l/51.0%
associate-*r*50.9%
*-commutative50.9%
associate-*r*51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
*-commutative70.4%
associate-*l*70.4%
*-commutative70.4%
unpow270.4%
associate-*l*70.4%
Simplified70.4%
add-cbrt-cube65.0%
associate-*r*65.0%
associate-*r*65.0%
associate-*r*65.0%
Applied egg-rr65.0%
associate-*l*65.0%
cube-unmult65.0%
unpow265.0%
associate-*r*65.0%
*-commutative65.0%
unpow265.0%
associate-*r*66.3%
*-commutative66.3%
*-commutative66.3%
Simplified66.3%
expm1-log1p-u60.2%
expm1-udef56.4%
rem-cbrt-cube61.1%
associate-*l*64.4%
*-commutative64.4%
Applied egg-rr64.4%
expm1-def73.5%
expm1-log1p82.7%
*-commutative82.7%
Simplified82.7%
if -5.8e8 < k < 2.29999999999999998e-44Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
Final simplification81.2%
(FPCore (t l k) :precision binary64 (if (or (<= k -580000000.0) (not (<= k 1.2e-44))) (/ 2.0 (* (* (sin k) (tan k)) (* (/ k l) (* t (/ k l))))) (* (/ l k) (/ (/ l k) (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 1.2e-44)) {
tmp = 2.0 / ((sin(k) * tan(k)) * ((k / l) * (t * (k / l))));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-580000000.0d0)) .or. (.not. (k <= 1.2d-44))) then
tmp = 2.0d0 / ((sin(k) * tan(k)) * ((k / l) * (t * (k / l))))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 1.2e-44)) {
tmp = 2.0 / ((Math.sin(k) * Math.tan(k)) * ((k / l) * (t * (k / l))));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= -580000000.0) or not (k <= 1.2e-44): tmp = 2.0 / ((math.sin(k) * math.tan(k)) * ((k / l) * (t * (k / l)))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= -580000000.0) || !(k <= 1.2e-44)) tmp = Float64(2.0 / Float64(Float64(sin(k) * tan(k)) * Float64(Float64(k / l) * Float64(t * Float64(k / l))))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= -580000000.0) || ~((k <= 1.2e-44))) tmp = 2.0 / ((sin(k) * tan(k)) * ((k / l) * (t * (k / l)))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, -580000000.0], N[Not[LessEqual[k, 1.2e-44]], $MachinePrecision]], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / l), $MachinePrecision] * N[(t * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -580000000 \lor \neg \left(k \leq 1.2 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot \left(\frac{k}{\ell} \cdot \left(t \cdot \frac{k}{\ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if k < -5.8e8 or 1.20000000000000004e-44 < k Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
+-commutative49.7%
associate-+r+49.7%
metadata-eval49.7%
Simplified49.7%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
unpow270.4%
times-frac74.0%
unpow274.0%
Simplified74.0%
associate-*l/74.2%
associate-/l*81.5%
Applied egg-rr81.5%
Taylor expanded in t around 0 70.4%
associate-/l*69.6%
unpow269.6%
unpow269.6%
associate-*r/71.6%
times-frac87.8%
associate-/l*89.7%
*-commutative89.7%
associate-/l*91.0%
Simplified91.0%
div-inv91.0%
clear-num91.0%
Applied egg-rr91.0%
if -5.8e8 < k < 1.20000000000000004e-44Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
Final simplification86.0%
(FPCore (t l k) :precision binary64 (if (or (<= k -580000000.0) (not (<= k 4.8e-45))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* (sin k) (tan k)))) (* (/ l k) (/ (/ l k) (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 4.8e-45)) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)));
} else {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-580000000.0d0)) .or. (.not. (k <= 4.8d-45))) then
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k)))
else
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= -580000000.0) || !(k <= 4.8e-45)) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (Math.sin(k) * Math.tan(k)));
} else {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= -580000000.0) or not (k <= 4.8e-45): tmp = 2.0 / (((k / l) * (t / (l / k))) * (math.sin(k) * math.tan(k))) else: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= -580000000.0) || !(k <= 4.8e-45)) tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(sin(k) * tan(k)))); else tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= -580000000.0) || ~((k <= 4.8e-45))) tmp = 2.0 / (((k / l) * (t / (l / k))) * (sin(k) * tan(k))); else tmp = (l / k) * ((l / k) / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, -580000000.0], N[Not[LessEqual[k, 4.8e-45]], $MachinePrecision]], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -580000000 \lor \neg \left(k \leq 4.8 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(\sin k \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\end{array}
\end{array}
if k < -5.8e8 or 4.7999999999999998e-45 < k Initial program 49.7%
*-commutative49.7%
associate-*l*49.7%
associate-*r*49.7%
+-commutative49.7%
associate-+r+49.7%
metadata-eval49.7%
Simplified49.7%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
unpow270.4%
times-frac74.0%
unpow274.0%
Simplified74.0%
associate-*l/74.2%
associate-/l*81.5%
Applied egg-rr81.5%
Taylor expanded in t around 0 70.4%
associate-/l*69.6%
unpow269.6%
unpow269.6%
associate-*r/71.6%
times-frac87.8%
associate-/l*89.7%
*-commutative89.7%
associate-/l*91.0%
Simplified91.0%
if -5.8e8 < k < 4.7999999999999998e-45Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
Final simplification86.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= k -580000000.0)
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) t_1))
(if (<= k 5.4e-45)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(/ 2.0 (* (/ k l) (* t (* (/ k l) t_1))))))))
double code(double t, double l, double k) {
double t_1 = sin(k) * tan(k);
double tmp;
if (k <= -580000000.0) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1);
} else if (k <= 5.4e-45) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / ((k / l) * (t * ((k / l) * t_1)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) * tan(k)
if (k <= (-580000000.0d0)) then
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * t_1)
else if (k <= 5.4d-45) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / ((k / l) * (t * ((k / l) * t_1)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= -580000000.0) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1);
} else if (k <= 5.4e-45) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / ((k / l) * (t * ((k / l) * t_1)));
}
return tmp;
}
def code(t, l, k): t_1 = math.sin(k) * math.tan(k) tmp = 0 if k <= -580000000.0: tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1) elif k <= 5.4e-45: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / ((k / l) * (t * ((k / l) * t_1))) return tmp
function code(t, l, k) t_1 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= -580000000.0) tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * t_1)); elseif (k <= 5.4e-45) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(k / l) * Float64(t * Float64(Float64(k / l) * t_1)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) * tan(k); tmp = 0.0; if (k <= -580000000.0) tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1); elseif (k <= 5.4e-45) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / ((k / l) * (t * ((k / l) * t_1))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -580000000.0], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.4e-45], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k / l), $MachinePrecision] * N[(t * N[(N[(k / l), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;k \leq -580000000:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot t_1}\\
\mathbf{elif}\;k \leq 5.4 \cdot 10^{-45}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{k}{\ell} \cdot \left(t \cdot \left(\frac{k}{\ell} \cdot t_1\right)\right)}\\
\end{array}
\end{array}
if k < -5.8e8Initial program 41.2%
*-commutative41.2%
associate-*l*41.2%
associate-*r*41.3%
+-commutative41.3%
associate-+r+41.3%
metadata-eval41.3%
Simplified41.3%
Taylor expanded in k around inf 69.4%
*-commutative69.4%
unpow269.4%
times-frac73.2%
unpow273.2%
Simplified73.2%
associate-*l/73.3%
associate-/l*80.9%
Applied egg-rr80.9%
Taylor expanded in t around 0 69.4%
associate-/l*69.4%
unpow269.4%
unpow269.4%
associate-*r/71.1%
times-frac86.7%
associate-/l*86.6%
*-commutative86.6%
associate-/l*88.1%
Simplified88.1%
if -5.8e8 < k < 5.3999999999999997e-45Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
if 5.3999999999999997e-45 < k Initial program 56.2%
*-commutative56.2%
associate-*l*56.2%
associate-*r*56.2%
+-commutative56.2%
associate-+r+56.2%
metadata-eval56.2%
Simplified56.2%
Taylor expanded in k around inf 71.2%
*-commutative71.2%
unpow271.2%
times-frac74.7%
unpow274.7%
Simplified74.7%
associate-*l/74.9%
associate-/l*82.0%
Applied egg-rr82.0%
Taylor expanded in t around 0 71.2%
associate-/l*69.7%
unpow269.7%
unpow269.7%
associate-*r/72.1%
times-frac88.7%
associate-/l*92.1%
*-commutative92.1%
associate-/l*93.2%
Simplified93.2%
pow193.2%
associate-*l*93.2%
div-inv93.1%
clear-num93.2%
Applied egg-rr93.2%
unpow193.2%
associate-*l*93.2%
Simplified93.2%
Final simplification86.0%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (sin k) (tan k))))
(if (<= k -580000000.0)
(/ 2.0 (* (* (/ k l) (/ t (/ l k))) t_1))
(if (<= k 2.2e-44)
(* (/ l k) (/ (/ l k) (pow t 3.0)))
(/ (/ 2.0 (/ k l)) (* t (* (/ k l) t_1)))))))
double code(double t, double l, double k) {
double t_1 = sin(k) * tan(k);
double tmp;
if (k <= -580000000.0) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1);
} else if (k <= 2.2e-44) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = (2.0 / (k / l)) / (t * ((k / l) * t_1));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) * tan(k)
if (k <= (-580000000.0d0)) then
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * t_1)
else if (k <= 2.2d-44) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = (2.0d0 / (k / l)) / (t * ((k / l) * t_1))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.sin(k) * Math.tan(k);
double tmp;
if (k <= -580000000.0) {
tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1);
} else if (k <= 2.2e-44) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = (2.0 / (k / l)) / (t * ((k / l) * t_1));
}
return tmp;
}
def code(t, l, k): t_1 = math.sin(k) * math.tan(k) tmp = 0 if k <= -580000000.0: tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1) elif k <= 2.2e-44: tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = (2.0 / (k / l)) / (t * ((k / l) * t_1)) return tmp
function code(t, l, k) t_1 = Float64(sin(k) * tan(k)) tmp = 0.0 if (k <= -580000000.0) tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * t_1)); elseif (k <= 2.2e-44) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(Float64(2.0 / Float64(k / l)) / Float64(t * Float64(Float64(k / l) * t_1))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) * tan(k); tmp = 0.0; if (k <= -580000000.0) tmp = 2.0 / (((k / l) * (t / (l / k))) * t_1); elseif (k <= 2.2e-44) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = (2.0 / (k / l)) / (t * ((k / l) * t_1)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -580000000.0], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e-44], N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k / l), $MachinePrecision]), $MachinePrecision] / N[(t * N[(N[(k / l), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sin k \cdot \tan k\\
\mathbf{if}\;k \leq -580000000:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot t_1}\\
\mathbf{elif}\;k \leq 2.2 \cdot 10^{-44}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\frac{k}{\ell}}}{t \cdot \left(\frac{k}{\ell} \cdot t_1\right)}\\
\end{array}
\end{array}
if k < -5.8e8Initial program 41.2%
*-commutative41.2%
associate-*l*41.2%
associate-*r*41.3%
+-commutative41.3%
associate-+r+41.3%
metadata-eval41.3%
Simplified41.3%
Taylor expanded in k around inf 69.4%
*-commutative69.4%
unpow269.4%
times-frac73.2%
unpow273.2%
Simplified73.2%
associate-*l/73.3%
associate-/l*80.9%
Applied egg-rr80.9%
Taylor expanded in t around 0 69.4%
associate-/l*69.4%
unpow269.4%
unpow269.4%
associate-*r/71.1%
times-frac86.7%
associate-/l*86.6%
*-commutative86.6%
associate-/l*88.1%
Simplified88.1%
if -5.8e8 < k < 2.20000000000000012e-44Initial program 70.3%
associate-/l/70.3%
associate-*l/70.3%
associate-*l/66.0%
associate-/r/65.9%
*-commutative65.9%
associate-/l/65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r*65.9%
*-commutative65.9%
Simplified65.9%
Taylor expanded in k around 0 62.4%
unpow262.4%
unpow262.4%
associate-*l*67.4%
Simplified67.4%
Taylor expanded in l around 0 62.4%
unpow262.4%
unpow262.4%
associate-*r*67.4%
times-frac76.7%
associate-/r*79.2%
Simplified79.2%
if 2.20000000000000012e-44 < k Initial program 56.2%
*-commutative56.2%
associate-*l*56.2%
associate-*r*56.2%
+-commutative56.2%
associate-+r+56.2%
metadata-eval56.2%
Simplified56.2%
Taylor expanded in k around inf 71.2%
*-commutative71.2%
unpow271.2%
times-frac74.7%
unpow274.7%
Simplified74.7%
associate-*l/74.9%
associate-/l*82.0%
Applied egg-rr82.0%
Taylor expanded in t around 0 71.2%
associate-/l*69.7%
unpow269.7%
unpow269.7%
associate-*r/72.1%
times-frac88.7%
associate-/l*92.1%
*-commutative92.1%
associate-/l*93.2%
Simplified93.2%
div-inv93.2%
associate-*l*93.2%
div-inv93.1%
clear-num93.2%
Applied egg-rr93.2%
associate-*r/93.2%
metadata-eval93.2%
associate-/r*93.9%
associate-*l*93.9%
Simplified93.9%
Final simplification86.2%
(FPCore (t l k) :precision binary64 (if (or (<= t -1.35e-27) (not (<= t 8.6e-44))) (* (/ l k) (/ l (* (pow t 3.0) k))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.35e-27) || !(t <= 8.6e-44)) {
tmp = (l / k) * (l / (pow(t, 3.0) * k));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.35d-27)) .or. (.not. (t <= 8.6d-44))) then
tmp = (l / k) * (l / ((t ** 3.0d0) * k))
else
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.35e-27) || !(t <= 8.6e-44)) {
tmp = (l / k) * (l / (Math.pow(t, 3.0) * k));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -1.35e-27) or not (t <= 8.6e-44): tmp = (l / k) * (l / (math.pow(t, 3.0) * k)) else: tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -1.35e-27) || !(t <= 8.6e-44)) tmp = Float64(Float64(l / k) * Float64(l / Float64((t ^ 3.0) * k))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.35e-27) || ~((t <= 8.6e-44))) tmp = (l / k) * (l / ((t ^ 3.0) * k)); else tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.35e-27], N[Not[LessEqual[t, 8.6e-44]], $MachinePrecision]], N[(N[(l / k), $MachinePrecision] * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-27} \lor \neg \left(t \leq 8.6 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\ell}{{t}^{3} \cdot k}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if t < -1.34999999999999994e-27 or 8.60000000000000027e-44 < t Initial program 69.8%
associate-/l/69.8%
associate-*l/70.5%
associate-*l/67.3%
associate-/r/67.8%
*-commutative67.8%
associate-/l/67.8%
associate-*r*67.8%
*-commutative67.8%
associate-*r*67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in k around 0 59.8%
unpow259.8%
unpow259.8%
associate-*l*63.5%
Simplified63.5%
times-frac69.6%
Applied egg-rr69.6%
if -1.34999999999999994e-27 < t < 8.60000000000000027e-44Initial program 43.2%
*-commutative43.2%
associate-*l*43.2%
associate-*r*43.2%
+-commutative43.2%
associate-+r+43.2%
metadata-eval43.2%
Simplified43.2%
Taylor expanded in k around inf 73.0%
*-commutative73.0%
unpow273.0%
times-frac79.4%
unpow279.4%
Simplified79.4%
associate-*l/79.6%
associate-/l*88.6%
Applied egg-rr88.6%
Taylor expanded in t around 0 73.0%
associate-/l*71.8%
unpow271.8%
unpow271.8%
associate-*r/75.8%
times-frac92.1%
associate-/l*94.7%
*-commutative94.7%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in k around 0 67.6%
unpow267.6%
Simplified67.6%
Final simplification68.8%
(FPCore (t l k) :precision binary64 (if (or (<= t -1.76e-71) (not (<= t 7.4e-96))) (* (/ l k) (/ (/ l k) (pow t 3.0))) (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* k k)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -1.76e-71) || !(t <= 7.4e-96)) {
tmp = (l / k) * ((l / k) / pow(t, 3.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.76d-71)) .or. (.not. (t <= 7.4d-96))) then
tmp = (l / k) * ((l / k) / (t ** 3.0d0))
else
tmp = 2.0d0 / (((k / l) * (t / (l / k))) * (k * k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -1.76e-71) || !(t <= 7.4e-96)) {
tmp = (l / k) * ((l / k) / Math.pow(t, 3.0));
} else {
tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -1.76e-71) or not (t <= 7.4e-96): tmp = (l / k) * ((l / k) / math.pow(t, 3.0)) else: tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -1.76e-71) || !(t <= 7.4e-96)) tmp = Float64(Float64(l / k) * Float64(Float64(l / k) / (t ^ 3.0))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(k * k))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -1.76e-71) || ~((t <= 7.4e-96))) tmp = (l / k) * ((l / k) / (t ^ 3.0)); else tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -1.76e-71], N[Not[LessEqual[t, 7.4e-96]], $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[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.76 \cdot 10^{-71} \lor \neg \left(t \leq 7.4 \cdot 10^{-96}\right):\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if t < -1.76000000000000002e-71 or 7.39999999999999972e-96 < t Initial program 69.8%
associate-/l/69.8%
associate-*l/70.4%
associate-*l/67.6%
associate-/r/68.6%
*-commutative68.6%
associate-/l/68.7%
associate-*r*68.6%
*-commutative68.6%
associate-*r*68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in k around 0 60.3%
unpow260.3%
unpow260.3%
associate-*l*63.5%
Simplified63.5%
Taylor expanded in l around 0 60.3%
unpow260.3%
unpow260.3%
associate-*r*63.5%
times-frac68.4%
associate-/r*70.0%
Simplified70.0%
if -1.76000000000000002e-71 < t < 7.39999999999999972e-96Initial program 36.1%
*-commutative36.1%
associate-*l*36.1%
associate-*r*36.1%
+-commutative36.1%
associate-+r+36.1%
metadata-eval36.1%
Simplified36.1%
Taylor expanded in k around inf 73.7%
*-commutative73.7%
unpow273.7%
times-frac81.6%
unpow281.6%
Simplified81.6%
associate-*l/81.8%
associate-/l*92.1%
Applied egg-rr92.1%
Taylor expanded in t around 0 73.7%
associate-/l*72.2%
unpow272.2%
unpow272.2%
associate-*r/77.3%
times-frac95.4%
associate-/l*97.7%
*-commutative97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in k around 0 68.9%
unpow268.9%
Simplified68.9%
Final simplification69.7%
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (/ k l) (/ t (/ l k))) (* k k))))
double code(double t, double l, double k) {
return 2.0 / (((k / l) * (t / (l / k))) * (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 = 2.0d0 / (((k / l) * (t / (l / k))) * (k * k))
end function
public static double code(double t, double l, double k) {
return 2.0 / (((k / l) * (t / (l / k))) * (k * k));
}
def code(t, l, k): return 2.0 / (((k / l) * (t / (l / k))) * (k * k))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(t / Float64(l / k))) * Float64(k * k))) end
function tmp = code(t, l, k) tmp = 2.0 / (((k / l) * (t / (l / k))) * (k * k)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(t / N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\frac{k}{\ell} \cdot \frac{t}{\frac{\ell}{k}}\right) \cdot \left(k \cdot k\right)}
\end{array}
Initial program 58.5%
*-commutative58.5%
associate-*l*55.6%
associate-*r*55.6%
+-commutative55.6%
associate-+r+55.6%
metadata-eval55.6%
Simplified55.6%
Taylor expanded in k around inf 65.5%
*-commutative65.5%
unpow265.5%
times-frac70.3%
unpow270.3%
Simplified70.3%
associate-*l/70.1%
associate-/l*74.3%
Applied egg-rr74.3%
Taylor expanded in t around 0 65.5%
associate-/l*66.2%
unpow266.2%
unpow266.2%
associate-*r/68.7%
times-frac77.9%
associate-/l*78.3%
*-commutative78.3%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in k around 0 62.0%
unpow262.0%
Simplified62.0%
Final simplification62.0%
(FPCore (t l k) :precision binary64 (* -0.044444444444444446 (/ l (/ t l))))
double code(double t, double l, double k) {
return -0.044444444444444446 * (l / (t / l));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (-0.044444444444444446d0) * (l / (t / l))
end function
public static double code(double t, double l, double k) {
return -0.044444444444444446 * (l / (t / l));
}
def code(t, l, k): return -0.044444444444444446 * (l / (t / l))
function code(t, l, k) return Float64(-0.044444444444444446 * Float64(l / Float64(t / l))) end
function tmp = code(t, l, k) tmp = -0.044444444444444446 * (l / (t / l)); end
code[t_, l_, k_] := N[(-0.044444444444444446 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-0.044444444444444446 \cdot \frac{\ell}{\frac{t}{\ell}}
\end{array}
Initial program 58.5%
associate-/l/58.5%
associate-*l/58.5%
associate-*l/56.6%
associate-/r/57.3%
*-commutative57.3%
associate-/l/57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*r*57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in k around inf 64.4%
*-commutative64.4%
*-commutative64.4%
associate-*l*64.0%
*-commutative64.0%
unpow264.0%
associate-*l*64.0%
Simplified64.0%
Taylor expanded in k around 0 56.6%
unpow256.6%
Simplified56.6%
Taylor expanded in k around 0 30.6%
associate-*r/30.6%
metadata-eval30.6%
*-commutative30.6%
associate-*r/30.6%
metadata-eval30.6%
*-commutative30.6%
associate-/r*30.6%
unpow230.6%
associate-*r/30.6%
metadata-eval30.6%
Simplified30.6%
Taylor expanded in k around inf 31.6%
unpow231.6%
associate-/l*28.6%
Simplified28.6%
Final simplification28.6%
(FPCore (t l k) :precision binary64 (* (* l l) (/ -0.044444444444444446 t)))
double code(double t, double l, double k) {
return (l * l) * (-0.044444444444444446 / t);
}
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) * ((-0.044444444444444446d0) / t)
end function
public static double code(double t, double l, double k) {
return (l * l) * (-0.044444444444444446 / t);
}
def code(t, l, k): return (l * l) * (-0.044444444444444446 / t)
function code(t, l, k) return Float64(Float64(l * l) * Float64(-0.044444444444444446 / t)) end
function tmp = code(t, l, k) tmp = (l * l) * (-0.044444444444444446 / t); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(-0.044444444444444446 / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{-0.044444444444444446}{t}
\end{array}
Initial program 58.5%
associate-/l/58.5%
associate-*l/58.5%
associate-*l/56.6%
associate-/r/57.3%
*-commutative57.3%
associate-/l/57.3%
associate-*r*57.3%
*-commutative57.3%
associate-*r*57.3%
*-commutative57.3%
Simplified57.3%
Taylor expanded in k around inf 64.4%
*-commutative64.4%
*-commutative64.4%
associate-*l*64.0%
*-commutative64.0%
unpow264.0%
associate-*l*64.0%
Simplified64.0%
Taylor expanded in k around 0 56.6%
unpow256.6%
Simplified56.6%
Taylor expanded in k around 0 30.6%
associate-*r/30.6%
metadata-eval30.6%
*-commutative30.6%
associate-*r/30.6%
metadata-eval30.6%
*-commutative30.6%
associate-/r*30.6%
unpow230.6%
associate-*r/30.6%
metadata-eval30.6%
Simplified30.6%
Taylor expanded in k around inf 31.6%
Final simplification31.6%
herbie shell --seed 2023171
(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))))