
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
(FPCore (t l k)
:precision binary64
(if (or (<= t -9.5e-18) (not (<= t 8e-101)))
(/
(pow
(/ (cbrt (/ 2.0 (tan k))) (/ t (/ (cbrt l) (/ (cbrt (sin k)) (cbrt l)))))
3.0)
(+ 2.0 (pow (/ k t) 2.0)))
(* (/ 2.0 (* k (* t k))) (/ (* l (* l (cos k))) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -9.5e-18) || !(t <= 8e-101)) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / (cbrt(l) / (cbrt(sin(k)) / cbrt(l))))), 3.0) / (2.0 + pow((k / t), 2.0));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -9.5e-18) || !(t <= 8e-101)) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t / (Math.cbrt(l) / (Math.cbrt(Math.sin(k)) / Math.cbrt(l))))), 3.0) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * Math.cos(k))) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -9.5e-18) || !(t <= 8e-101)) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(cbrt(l) / Float64(cbrt(sin(k)) / cbrt(l))))) ^ 3.0) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(l * Float64(l * cos(k))) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -9.5e-18], N[Not[LessEqual[t, 8e-101]], $MachinePrecision]], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[Power[l, 1/3], $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-18} \lor \neg \left(t \leq 8 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{\sqrt[3]{\ell}}{\frac{\sqrt[3]{\sin k}}{\sqrt[3]{\ell}}}}}\right)}^{3}}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{{\sin k}^{2}}\\
\end{array}
\end{array}
if t < -9.5000000000000003e-18 or 8.00000000000000041e-101 < t Initial program 62.7%
associate-/r*62.8%
associate-*l*58.5%
sqr-neg58.5%
associate-*l*62.8%
*-commutative62.8%
sqr-neg62.8%
associate-/r*62.8%
Simplified62.7%
associate-/l/62.7%
associate-/r/62.8%
add-cube-cbrt62.8%
pow362.8%
Applied egg-rr77.1%
cbrt-div92.4%
Applied egg-rr92.4%
cbrt-div95.0%
Applied egg-rr95.0%
if -9.5000000000000003e-18 < t < 8.00000000000000041e-101Initial program 35.5%
associate-/r*35.5%
associate-*l*35.5%
sqr-neg35.5%
associate-*l*35.5%
*-commutative35.5%
sqr-neg35.5%
associate-/r*35.5%
Simplified35.5%
associate-/l/35.5%
associate-/r/35.5%
add-cube-cbrt35.4%
pow335.4%
Applied egg-rr58.6%
cbrt-div54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 76.7%
associate-*r/76.7%
associate-*r*76.7%
times-frac77.0%
unpow277.0%
associate-*l*81.9%
unpow281.9%
associate-*l*81.9%
Simplified81.9%
Final simplification89.8%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<=
(/
2.0
(*
(+ 1.0 (+ t_1 1.0))
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))))
2e+258)
(/
(pow (/ (cbrt (/ 2.0 (tan k))) t) 3.0)
(/ (+ 2.0 t_1) (/ l (/ (sin k) l))))
(* (/ 2.0 (* k (* t k))) (/ (* l (* l (cos k))) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if ((2.0 / ((1.0 + (t_1 + 1.0)) * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= 2e+258) {
tmp = pow((cbrt((2.0 / tan(k))) / t), 3.0) / ((2.0 + t_1) / (l / (sin(k) / l)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / pow(sin(k), 2.0));
}
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 / ((1.0 + (t_1 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= 2e+258) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / t), 3.0) / ((2.0 + t_1) / (l / (Math.sin(k) / l)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * Math.cos(k))) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (Float64(2.0 / Float64(Float64(1.0 + Float64(t_1 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= 2e+258) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / t) ^ 3.0) / Float64(Float64(2.0 + t_1) / Float64(l / Float64(sin(k) / l)))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(l * Float64(l * cos(k))) / (sin(k) ^ 2.0))); 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[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+258], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision] / N[(N[(2.0 + t$95$1), $MachinePrecision] / N[(l / N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;\frac{2}{\left(1 + \left(t_1 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq 2 \cdot 10^{+258}:\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{t}\right)}^{3}}{\frac{2 + t_1}{\frac{\ell}{\frac{\sin k}{\ell}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{{\sin k}^{2}}\\
\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))) < 2.00000000000000011e258Initial program 76.3%
associate-/r*76.4%
associate-*l*71.5%
sqr-neg71.5%
associate-*l*76.4%
*-commutative76.4%
sqr-neg76.4%
associate-/r*76.4%
Simplified76.2%
associate-/l/76.3%
associate-/r/76.4%
add-cube-cbrt76.3%
pow376.3%
Applied egg-rr88.8%
div-inv88.8%
associate-/r/88.9%
associate-/r/88.9%
Applied egg-rr88.9%
associate-*r/88.9%
associate-*l/88.9%
*-rgt-identity88.9%
cube-prod84.7%
rem-cube-cbrt84.8%
associate-/l*84.7%
associate-*l/79.6%
associate-/l*84.7%
Simplified84.7%
if 2.00000000000000011e258 < (/.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 24.4%
associate-/r*24.4%
associate-*l*24.4%
sqr-neg24.4%
associate-*l*24.4%
*-commutative24.4%
sqr-neg24.4%
associate-/r*24.4%
Simplified24.4%
associate-/l/24.4%
associate-/r/24.4%
add-cube-cbrt24.4%
pow324.4%
Applied egg-rr48.3%
cbrt-div58.3%
Applied egg-rr58.3%
Taylor expanded in k around inf 62.4%
associate-*r/62.4%
associate-*r*62.4%
times-frac62.7%
unpow262.7%
associate-*l*66.8%
unpow266.8%
associate-*l*66.8%
Simplified66.8%
Final simplification76.3%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)) (t_2 (* l (* l (cos k)))))
(if (<=
(/
2.0
(*
(+ 1.0 (+ t_1 1.0))
(* (tan k) (* (sin k) (/ (pow t 3.0) (* l l))))))
5e+197)
(* (/ 2.0 (* t (pow (* t (sin k)) 2.0))) (/ t_2 (+ 2.0 t_1)))
(* (/ 2.0 (* k (* t k))) (/ t_2 (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double t_2 = l * (l * cos(k));
double tmp;
if ((2.0 / ((1.0 + (t_1 + 1.0)) * (tan(k) * (sin(k) * (pow(t, 3.0) / (l * l)))))) <= 5e+197) {
tmp = (2.0 / (t * pow((t * sin(k)), 2.0))) * (t_2 / (2.0 + t_1));
} else {
tmp = (2.0 / (k * (t * k))) * (t_2 / pow(sin(k), 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (k / t) ** 2.0d0
t_2 = l * (l * cos(k))
if ((2.0d0 / ((1.0d0 + (t_1 + 1.0d0)) * (tan(k) * (sin(k) * ((t ** 3.0d0) / (l * l)))))) <= 5d+197) then
tmp = (2.0d0 / (t * ((t * sin(k)) ** 2.0d0))) * (t_2 / (2.0d0 + t_1))
else
tmp = (2.0d0 / (k * (t * k))) * (t_2 / (sin(k) ** 2.0d0))
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 t_2 = l * (l * Math.cos(k));
double tmp;
if ((2.0 / ((1.0 + (t_1 + 1.0)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t, 3.0) / (l * l)))))) <= 5e+197) {
tmp = (2.0 / (t * Math.pow((t * Math.sin(k)), 2.0))) * (t_2 / (2.0 + t_1));
} else {
tmp = (2.0 / (k * (t * k))) * (t_2 / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((k / t), 2.0) t_2 = l * (l * math.cos(k)) tmp = 0 if (2.0 / ((1.0 + (t_1 + 1.0)) * (math.tan(k) * (math.sin(k) * (math.pow(t, 3.0) / (l * l)))))) <= 5e+197: tmp = (2.0 / (t * math.pow((t * math.sin(k)), 2.0))) * (t_2 / (2.0 + t_1)) else: tmp = (2.0 / (k * (t * k))) * (t_2 / math.pow(math.sin(k), 2.0)) return tmp
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 t_2 = Float64(l * Float64(l * cos(k))) tmp = 0.0 if (Float64(2.0 / Float64(Float64(1.0 + Float64(t_1 + 1.0)) * Float64(tan(k) * Float64(sin(k) * Float64((t ^ 3.0) / Float64(l * l)))))) <= 5e+197) tmp = Float64(Float64(2.0 / Float64(t * (Float64(t * sin(k)) ^ 2.0))) * Float64(t_2 / Float64(2.0 + t_1))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(t_2 / (sin(k) ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (k / t) ^ 2.0; t_2 = l * (l * cos(k)); tmp = 0.0; if ((2.0 / ((1.0 + (t_1 + 1.0)) * (tan(k) * (sin(k) * ((t ^ 3.0) / (l * l)))))) <= 5e+197) tmp = (2.0 / (t * ((t * sin(k)) ^ 2.0))) * (t_2 / (2.0 + t_1)); else tmp = (2.0 / (k * (t * k))) * (t_2 / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(2.0 / N[(N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+197], N[(N[(2.0 / N[(t * N[Power[N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
t_2 := \ell \cdot \left(\ell \cdot \cos k\right)\\
\mathbf{if}\;\frac{2}{\left(1 + \left(t_1 + 1\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right)} \leq 5 \cdot 10^{+197}:\\
\;\;\;\;\frac{2}{t \cdot {\left(t \cdot \sin k\right)}^{2}} \cdot \frac{t_2}{2 + t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{t_2}{{\sin k}^{2}}\\
\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))) < 5.00000000000000009e197Initial program 76.1%
associate-/r*76.3%
associate-*l*72.0%
sqr-neg72.0%
associate-*l*76.3%
*-commutative76.3%
sqr-neg76.3%
associate-/r*76.3%
Simplified76.1%
associate-/l/76.1%
associate-/r/76.3%
add-cube-cbrt76.2%
pow376.2%
Applied egg-rr88.8%
cbrt-div94.3%
Applied egg-rr94.3%
Taylor expanded in l around 0 58.9%
associate-*r/58.9%
associate-*r*58.9%
times-frac58.8%
cube-mult58.8%
unpow258.8%
associate-*l*60.4%
unpow260.4%
unpow260.4%
swap-sqr70.0%
unpow170.0%
pow-plus70.0%
metadata-eval70.0%
Simplified83.3%
if 5.00000000000000009e197 < (/.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%
associate-/r*25.0%
associate-*l*24.2%
sqr-neg24.2%
associate-*l*25.0%
*-commutative25.0%
sqr-neg25.0%
associate-/r*25.0%
Simplified25.0%
associate-/l/25.0%
associate-/r/25.0%
add-cube-cbrt25.0%
pow325.0%
Applied egg-rr48.7%
cbrt-div58.6%
Applied egg-rr58.6%
Taylor expanded in k around inf 62.0%
associate-*r/62.0%
associate-*r*62.0%
times-frac62.2%
unpow262.2%
associate-*l*66.3%
unpow266.3%
associate-*l*66.3%
Simplified66.3%
Final simplification75.3%
(FPCore (t l k)
:precision binary64
(if (or (<= t -2.7e-10) (not (<= t 1.25e-95)))
(/
(pow
(/ (cbrt (/ 2.0 (tan k))) (/ t (/ (cbrt l) (cbrt (/ (sin k) l)))))
3.0)
(+ 2.0 (* (/ k t) (/ k t))))
(* (/ 2.0 (* k (* t k))) (/ (* l (* l (cos k))) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -2.7e-10) || !(t <= 1.25e-95)) {
tmp = pow((cbrt((2.0 / tan(k))) / (t / (cbrt(l) / cbrt((sin(k) / l))))), 3.0) / (2.0 + ((k / t) * (k / t)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / pow(sin(k), 2.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -2.7e-10) || !(t <= 1.25e-95)) {
tmp = Math.pow((Math.cbrt((2.0 / Math.tan(k))) / (t / (Math.cbrt(l) / Math.cbrt((Math.sin(k) / l))))), 3.0) / (2.0 + ((k / t) * (k / t)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * Math.cos(k))) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
function code(t, l, k) tmp = 0.0 if ((t <= -2.7e-10) || !(t <= 1.25e-95)) tmp = Float64((Float64(cbrt(Float64(2.0 / tan(k))) / Float64(t / Float64(cbrt(l) / cbrt(Float64(sin(k) / l))))) ^ 3.0) / Float64(2.0 + Float64(Float64(k / t) * Float64(k / t)))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(l * Float64(l * cos(k))) / (sin(k) ^ 2.0))); end return tmp end
code[t_, l_, k_] := If[Or[LessEqual[t, -2.7e-10], N[Not[LessEqual[t, 1.25e-95]], $MachinePrecision]], N[(N[Power[N[(N[Power[N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(t / N[(N[Power[l, 1/3], $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / N[(2.0 + N[(N[(k / t), $MachinePrecision] * N[(k / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-10} \lor \neg \left(t \leq 1.25 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{{\left(\frac{\sqrt[3]{\frac{2}{\tan k}}}{\frac{t}{\frac{\sqrt[3]{\ell}}{\sqrt[3]{\frac{\sin k}{\ell}}}}}\right)}^{3}}{2 + \frac{k}{t} \cdot \frac{k}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{{\sin k}^{2}}\\
\end{array}
\end{array}
if t < -2.7e-10 or 1.2499999999999999e-95 < t Initial program 62.7%
associate-/r*62.8%
associate-*l*58.5%
sqr-neg58.5%
associate-*l*62.8%
*-commutative62.8%
sqr-neg62.8%
associate-/r*62.8%
Simplified62.7%
associate-/l/62.7%
associate-/r/62.8%
add-cube-cbrt62.8%
pow362.8%
Applied egg-rr77.1%
cbrt-div92.4%
Applied egg-rr92.4%
unpow292.4%
Applied egg-rr92.4%
if -2.7e-10 < t < 1.2499999999999999e-95Initial program 35.5%
associate-/r*35.5%
associate-*l*35.5%
sqr-neg35.5%
associate-*l*35.5%
*-commutative35.5%
sqr-neg35.5%
associate-/r*35.5%
Simplified35.5%
associate-/l/35.5%
associate-/r/35.5%
add-cube-cbrt35.4%
pow335.4%
Applied egg-rr58.6%
cbrt-div54.6%
Applied egg-rr54.6%
Taylor expanded in k around inf 76.7%
associate-*r/76.7%
associate-*r*76.7%
times-frac77.0%
unpow277.0%
associate-*l*81.9%
unpow281.9%
associate-*l*81.9%
Simplified81.9%
Final simplification88.2%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ k t) 2.0)))
(if (<= t -7.8e-16)
(/
(* l (* l (/ 2.0 (pow (* t (* (cbrt (sin k)) (cbrt (tan k)))) 3.0))))
(+ 2.0 t_1))
(if (<= t 2e-79)
(* (/ 2.0 (* k (* t k))) (/ (* l (* l (cos k))) (pow (sin k) 2.0)))
(/
(/ 2.0 (* (tan k) (* (sin k) (pow (/ (pow t 1.5) l) 2.0))))
(+ 1.0 (+ t_1 1.0)))))))
double code(double t, double l, double k) {
double t_1 = pow((k / t), 2.0);
double tmp;
if (t <= -7.8e-16) {
tmp = (l * (l * (2.0 / pow((t * (cbrt(sin(k)) * cbrt(tan(k)))), 3.0)))) / (2.0 + t_1);
} else if (t <= 2e-79) {
tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / pow(sin(k), 2.0));
} else {
tmp = (2.0 / (tan(k) * (sin(k) * pow((pow(t, 1.5) / l), 2.0)))) / (1.0 + (t_1 + 1.0));
}
return tmp;
}
public static double code(double t, double l, double k) {
double t_1 = Math.pow((k / t), 2.0);
double tmp;
if (t <= -7.8e-16) {
tmp = (l * (l * (2.0 / Math.pow((t * (Math.cbrt(Math.sin(k)) * Math.cbrt(Math.tan(k)))), 3.0)))) / (2.0 + t_1);
} else if (t <= 2e-79) {
tmp = (2.0 / (k * (t * k))) * ((l * (l * Math.cos(k))) / Math.pow(Math.sin(k), 2.0));
} else {
tmp = (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t, 1.5) / l), 2.0)))) / (1.0 + (t_1 + 1.0));
}
return tmp;
}
function code(t, l, k) t_1 = Float64(k / t) ^ 2.0 tmp = 0.0 if (t <= -7.8e-16) tmp = Float64(Float64(l * Float64(l * Float64(2.0 / (Float64(t * Float64(cbrt(sin(k)) * cbrt(tan(k)))) ^ 3.0)))) / Float64(2.0 + t_1)); elseif (t <= 2e-79) tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(l * Float64(l * cos(k))) / (sin(k) ^ 2.0))); else tmp = Float64(Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (Float64((t ^ 1.5) / l) ^ 2.0)))) / Float64(1.0 + Float64(t_1 + 1.0))); end return tmp end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, -7.8e-16], N[(N[(l * N[(l * N[(2.0 / N[Power[N[(t * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-79], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{k}{t}\right)}^{2}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{-16}:\\
\;\;\;\;\frac{\ell \cdot \left(\ell \cdot \frac{2}{{\left(t \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\tan k}\right)\right)}^{3}}\right)}{2 + t_1}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-79}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{{\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(\sin k \cdot {\left(\frac{{t}^{1.5}}{\ell}\right)}^{2}\right)}}{1 + \left(t_1 + 1\right)}\\
\end{array}
\end{array}
if t < -7.79999999999999954e-16Initial program 67.2%
associate-/r*67.6%
associate-*l*64.0%
sqr-neg64.0%
associate-*l*67.6%
*-commutative67.6%
sqr-neg67.6%
associate-*l/67.6%
associate-*r/69.0%
associate-/r/68.9%
Simplified68.9%
add-cube-cbrt68.8%
pow368.8%
*-commutative68.8%
cbrt-prod68.8%
cbrt-prod68.7%
rem-cbrt-cube76.1%
Applied egg-rr76.1%
associate-*l/76.1%
associate-*l*76.0%
Applied egg-rr76.0%
unpow276.0%
*-commutative76.0%
associate-*r/76.0%
unpow276.0%
associate-*l*84.7%
Simplified84.7%
if -7.79999999999999954e-16 < t < 2e-79Initial program 35.5%
associate-/r*35.5%
associate-*l*35.5%
sqr-neg35.5%
associate-*l*35.5%
*-commutative35.5%
sqr-neg35.5%
associate-/r*35.5%
Simplified35.5%
associate-/l/35.5%
associate-/r/35.5%
add-cube-cbrt35.5%
pow335.5%
Applied egg-rr58.0%
cbrt-div54.9%
Applied egg-rr54.9%
Taylor expanded in k around inf 76.4%
associate-*r/76.4%
associate-*r*76.4%
times-frac76.7%
unpow276.7%
associate-*l*81.4%
unpow281.4%
associate-*l*81.5%
Simplified81.5%
if 2e-79 < t Initial program 60.1%
associate-/r*60.1%
+-commutative60.1%
Simplified60.1%
add-sqr-sqrt60.1%
pow260.1%
sqrt-div60.1%
sqrt-pow168.4%
metadata-eval68.4%
sqrt-prod46.9%
add-sqr-sqrt80.9%
Applied egg-rr80.9%
Final simplification82.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* l (* l (cos k))))
(t_2 (+ 2.0 (pow (/ k t) 2.0)))
(t_3 (* (/ 2.0 (* t (pow (* t (sin k)) 2.0))) (/ t_1 t_2))))
(if (<= t -2e-10)
t_3
(if (<= t 5.2e-80)
(* (/ 2.0 (* k (* t k))) (/ t_1 (pow (sin k) 2.0)))
(if (<= t 7.4e+143)
(/ (/ 2.0 t_2) (* (pow (/ (pow t 1.5) l) 2.0) (* (tan k) (sin k))))
t_3)))))
double code(double t, double l, double k) {
double t_1 = l * (l * cos(k));
double t_2 = 2.0 + pow((k / t), 2.0);
double t_3 = (2.0 / (t * pow((t * sin(k)), 2.0))) * (t_1 / t_2);
double tmp;
if (t <= -2e-10) {
tmp = t_3;
} else if (t <= 5.2e-80) {
tmp = (2.0 / (k * (t * k))) * (t_1 / pow(sin(k), 2.0));
} else if (t <= 7.4e+143) {
tmp = (2.0 / t_2) / (pow((pow(t, 1.5) / l), 2.0) * (tan(k) * sin(k)));
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = l * (l * cos(k))
t_2 = 2.0d0 + ((k / t) ** 2.0d0)
t_3 = (2.0d0 / (t * ((t * sin(k)) ** 2.0d0))) * (t_1 / t_2)
if (t <= (-2d-10)) then
tmp = t_3
else if (t <= 5.2d-80) then
tmp = (2.0d0 / (k * (t * k))) * (t_1 / (sin(k) ** 2.0d0))
else if (t <= 7.4d+143) then
tmp = (2.0d0 / t_2) / ((((t ** 1.5d0) / l) ** 2.0d0) * (tan(k) * sin(k)))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = l * (l * Math.cos(k));
double t_2 = 2.0 + Math.pow((k / t), 2.0);
double t_3 = (2.0 / (t * Math.pow((t * Math.sin(k)), 2.0))) * (t_1 / t_2);
double tmp;
if (t <= -2e-10) {
tmp = t_3;
} else if (t <= 5.2e-80) {
tmp = (2.0 / (k * (t * k))) * (t_1 / Math.pow(Math.sin(k), 2.0));
} else if (t <= 7.4e+143) {
tmp = (2.0 / t_2) / (Math.pow((Math.pow(t, 1.5) / l), 2.0) * (Math.tan(k) * Math.sin(k)));
} else {
tmp = t_3;
}
return tmp;
}
def code(t, l, k): t_1 = l * (l * math.cos(k)) t_2 = 2.0 + math.pow((k / t), 2.0) t_3 = (2.0 / (t * math.pow((t * math.sin(k)), 2.0))) * (t_1 / t_2) tmp = 0 if t <= -2e-10: tmp = t_3 elif t <= 5.2e-80: tmp = (2.0 / (k * (t * k))) * (t_1 / math.pow(math.sin(k), 2.0)) elif t <= 7.4e+143: tmp = (2.0 / t_2) / (math.pow((math.pow(t, 1.5) / l), 2.0) * (math.tan(k) * math.sin(k))) else: tmp = t_3 return tmp
function code(t, l, k) t_1 = Float64(l * Float64(l * cos(k))) t_2 = Float64(2.0 + (Float64(k / t) ^ 2.0)) t_3 = Float64(Float64(2.0 / Float64(t * (Float64(t * sin(k)) ^ 2.0))) * Float64(t_1 / t_2)) tmp = 0.0 if (t <= -2e-10) tmp = t_3; elseif (t <= 5.2e-80) tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(t_1 / (sin(k) ^ 2.0))); elseif (t <= 7.4e+143) tmp = Float64(Float64(2.0 / t_2) / Float64((Float64((t ^ 1.5) / l) ^ 2.0) * Float64(tan(k) * sin(k)))); else tmp = t_3; end return tmp end
function tmp_2 = code(t, l, k) t_1 = l * (l * cos(k)); t_2 = 2.0 + ((k / t) ^ 2.0); t_3 = (2.0 / (t * ((t * sin(k)) ^ 2.0))) * (t_1 / t_2); tmp = 0.0; if (t <= -2e-10) tmp = t_3; elseif (t <= 5.2e-80) tmp = (2.0 / (k * (t * k))) * (t_1 / (sin(k) ^ 2.0)); elseif (t <= 7.4e+143) tmp = (2.0 / t_2) / ((((t ^ 1.5) / l) ^ 2.0) * (tan(k) * sin(k))); else tmp = t_3; end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 / N[(t * N[Power[N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-10], t$95$3, If[LessEqual[t, 5.2e-80], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e+143], N[(N[(2.0 / t$95$2), $MachinePrecision] / N[(N[Power[N[(N[Power[t, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \ell \cdot \left(\ell \cdot \cos k\right)\\
t_2 := 2 + {\left(\frac{k}{t}\right)}^{2}\\
t_3 := \frac{2}{t \cdot {\left(t \cdot \sin k\right)}^{2}} \cdot \frac{t_1}{t_2}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-10}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{t_1}{{\sin k}^{2}}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+143}:\\
\;\;\;\;\frac{\frac{2}{t_2}}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(\tan k \cdot \sin k\right)}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -2.00000000000000007e-10 or 7.4000000000000003e143 < t Initial program 62.9%
associate-/r*63.2%
associate-*l*57.0%
sqr-neg57.0%
associate-*l*63.2%
*-commutative63.2%
sqr-neg63.2%
associate-/r*63.2%
Simplified62.9%
associate-/l/62.9%
associate-/r/63.2%
add-cube-cbrt63.1%
pow363.1%
Applied egg-rr78.2%
cbrt-div93.0%
Applied egg-rr93.0%
Taylor expanded in l around 0 50.3%
associate-*r/50.3%
associate-*r*50.3%
times-frac50.3%
cube-mult50.3%
unpow250.3%
associate-*l*53.7%
unpow253.7%
unpow253.7%
swap-sqr68.3%
unpow168.3%
pow-plus68.3%
metadata-eval68.3%
Simplified76.1%
if -2.00000000000000007e-10 < t < 5.2000000000000002e-80Initial program 35.5%
associate-/r*35.5%
associate-*l*35.5%
sqr-neg35.5%
associate-*l*35.5%
*-commutative35.5%
sqr-neg35.5%
associate-/r*35.5%
Simplified35.5%
associate-/l/35.5%
associate-/r/35.5%
add-cube-cbrt35.5%
pow335.5%
Applied egg-rr58.0%
cbrt-div54.9%
Applied egg-rr54.9%
Taylor expanded in k around inf 76.4%
associate-*r/76.4%
associate-*r*76.4%
times-frac76.7%
unpow276.7%
associate-*l*81.4%
unpow281.4%
associate-*l*81.5%
Simplified81.5%
if 5.2000000000000002e-80 < t < 7.4000000000000003e143Initial program 63.6%
associate-/r*63.6%
+-commutative63.6%
Simplified63.6%
add-sqr-sqrt63.6%
pow263.6%
sqrt-div63.6%
sqrt-pow171.9%
metadata-eval71.9%
sqrt-prod48.7%
add-sqr-sqrt86.0%
Applied egg-rr86.0%
div-inv86.0%
*-commutative86.0%
*-commutative86.0%
associate-+r+86.0%
metadata-eval86.0%
Applied egg-rr86.0%
associate-*l/86.0%
associate-*r/86.0%
metadata-eval86.0%
associate-*r*79.7%
Simplified79.7%
Final simplification79.1%
(FPCore (t l k) :precision binary64 (if (<= k 1.66e-9) (* (/ l (/ k l)) (/ (cos k) (* (sin k) (pow t 3.0)))) (* 2.0 (* (* l (/ l (* k k))) (/ (cos k) (* t (pow (sin k) 2.0)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.66e-9) {
tmp = (l / (k / l)) * (cos(k) / (sin(k) * pow(t, 3.0)));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.66d-9) then
tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ** 3.0d0)))
else
tmp = 2.0d0 * ((l * (l / (k * k))) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.66e-9) {
tmp = (l / (k / l)) * (Math.cos(k) / (Math.sin(k) * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * ((l * (l / (k * k))) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.66e-9: tmp = (l / (k / l)) * (math.cos(k) / (math.sin(k) * math.pow(t, 3.0))) else: tmp = 2.0 * ((l * (l / (k * k))) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.66e-9) tmp = Float64(Float64(l / Float64(k / l)) * Float64(cos(k) / Float64(sin(k) * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / Float64(k * k))) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.66e-9) tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ^ 3.0))); else tmp = 2.0 * ((l * (l / (k * k))) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.66e-9], N[(N[(l / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.66 \cdot 10^{-9}:\\
\;\;\;\;\frac{\ell}{\frac{k}{\ell}} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\ell \cdot \frac{\ell}{k \cdot k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 1.6600000000000001e-9Initial program 56.3%
associate-/r*56.5%
associate-*l*52.8%
sqr-neg52.8%
associate-*l*56.5%
*-commutative56.5%
sqr-neg56.5%
associate-/r*56.5%
Simplified56.3%
Taylor expanded in k around 0 54.7%
unpow254.7%
Simplified54.7%
Taylor expanded in t around inf 55.3%
times-frac55.5%
unpow255.5%
associate-/l*60.7%
*-commutative60.7%
Simplified60.7%
if 1.6600000000000001e-9 < k Initial program 40.7%
associate-/r*40.7%
associate-*l*40.7%
sqr-neg40.7%
associate-*l*40.7%
*-commutative40.7%
sqr-neg40.7%
associate-/r*40.7%
Simplified40.7%
associate-/l/40.7%
associate-/r/40.7%
add-cube-cbrt40.7%
pow340.7%
Applied egg-rr59.0%
cbrt-div61.2%
Applied egg-rr61.2%
Taylor expanded in k around inf 72.8%
times-frac67.7%
unpow267.7%
associate-*r/68.2%
unpow268.2%
Simplified68.2%
Final simplification62.8%
(FPCore (t l k) :precision binary64 (if (<= k 3.3e-10) (* (/ l (/ k l)) (/ (cos k) (* (sin k) (pow t 3.0)))) (* 2.0 (* (/ (* l l) (* k (* t k))) (/ (cos k) (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-10) {
tmp = (l / (k / l)) * (cos(k) / (sin(k) * pow(t, 3.0)));
} else {
tmp = 2.0 * (((l * l) / (k * (t * k))) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.3d-10) then
tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ** 3.0d0)))
else
tmp = 2.0d0 * (((l * l) / (k * (t * k))) * (cos(k) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 3.3e-10) {
tmp = (l / (k / l)) * (Math.cos(k) / (Math.sin(k) * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * (((l * l) / (k * (t * k))) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 3.3e-10: tmp = (l / (k / l)) * (math.cos(k) / (math.sin(k) * math.pow(t, 3.0))) else: tmp = 2.0 * (((l * l) / (k * (t * k))) * (math.cos(k) / math.pow(math.sin(k), 2.0))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 3.3e-10) tmp = Float64(Float64(l / Float64(k / l)) * Float64(cos(k) / Float64(sin(k) * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / Float64(k * Float64(t * k))) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 3.3e-10) tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ^ 3.0))); else tmp = 2.0 * (((l * l) / (k * (t * k))) * (cos(k) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 3.3e-10], N[(N[(l / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.3 \cdot 10^{-10}:\\
\;\;\;\;\frac{\ell}{\frac{k}{\ell}} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{k \cdot \left(t \cdot k\right)} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if k < 3.3e-10Initial program 56.1%
associate-/r*56.2%
associate-*l*52.6%
sqr-neg52.6%
associate-*l*56.2%
*-commutative56.2%
sqr-neg56.2%
associate-/r*56.2%
Simplified56.1%
Taylor expanded in k around 0 54.4%
unpow254.4%
Simplified54.4%
Taylor expanded in t around inf 55.0%
times-frac55.3%
unpow255.3%
associate-/l*60.5%
*-commutative60.5%
Simplified60.5%
if 3.3e-10 < k Initial program 41.5%
associate-/r*41.5%
associate-*l*41.5%
sqr-neg41.5%
associate-*l*41.5%
*-commutative41.5%
sqr-neg41.5%
associate-*l/41.5%
associate-*r/41.5%
associate-/r/41.4%
Simplified41.4%
Taylor expanded in k around inf 72.8%
associate-*r*72.9%
times-frac73.2%
unpow273.2%
unpow273.2%
associate-*l*74.8%
Simplified74.8%
Final simplification64.5%
(FPCore (t l k) :precision binary64 (if (<= k 1.58e-9) (* (/ l (/ k l)) (/ (cos k) (* (sin k) (pow t 3.0)))) (* (/ 2.0 (* k (* t k))) (/ (* l (* l (cos k))) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.58e-9) {
tmp = (l / (k / l)) * (cos(k) / (sin(k) * pow(t, 3.0)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / pow(sin(k), 2.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.58d-9) then
tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ** 3.0d0)))
else
tmp = (2.0d0 / (k * (t * k))) * ((l * (l * cos(k))) / (sin(k) ** 2.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.58e-9) {
tmp = (l / (k / l)) * (Math.cos(k) / (Math.sin(k) * Math.pow(t, 3.0)));
} else {
tmp = (2.0 / (k * (t * k))) * ((l * (l * Math.cos(k))) / Math.pow(Math.sin(k), 2.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.58e-9: tmp = (l / (k / l)) * (math.cos(k) / (math.sin(k) * math.pow(t, 3.0))) else: tmp = (2.0 / (k * (t * k))) * ((l * (l * math.cos(k))) / math.pow(math.sin(k), 2.0)) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.58e-9) tmp = Float64(Float64(l / Float64(k / l)) * Float64(cos(k) / Float64(sin(k) * (t ^ 3.0)))); else tmp = Float64(Float64(2.0 / Float64(k * Float64(t * k))) * Float64(Float64(l * Float64(l * cos(k))) / (sin(k) ^ 2.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.58e-9) tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ^ 3.0))); else tmp = (2.0 / (k * (t * k))) * ((l * (l * cos(k))) / (sin(k) ^ 2.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.58e-9], N[(N[(l / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.58 \cdot 10^{-9}:\\
\;\;\;\;\frac{\ell}{\frac{k}{\ell}} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{k \cdot \left(t \cdot k\right)} \cdot \frac{\ell \cdot \left(\ell \cdot \cos k\right)}{{\sin k}^{2}}\\
\end{array}
\end{array}
if k < 1.5799999999999999e-9Initial program 56.3%
associate-/r*56.5%
associate-*l*52.8%
sqr-neg52.8%
associate-*l*56.5%
*-commutative56.5%
sqr-neg56.5%
associate-/r*56.5%
Simplified56.3%
Taylor expanded in k around 0 54.7%
unpow254.7%
Simplified54.7%
Taylor expanded in t around inf 55.3%
times-frac55.5%
unpow255.5%
associate-/l*60.7%
*-commutative60.7%
Simplified60.7%
if 1.5799999999999999e-9 < k Initial program 40.7%
associate-/r*40.7%
associate-*l*40.7%
sqr-neg40.7%
associate-*l*40.7%
*-commutative40.7%
sqr-neg40.7%
associate-/r*40.7%
Simplified40.7%
associate-/l/40.7%
associate-/r/40.7%
add-cube-cbrt40.7%
pow340.7%
Applied egg-rr59.0%
cbrt-div61.2%
Applied egg-rr61.2%
Taylor expanded in k around inf 72.8%
associate-*r/72.8%
associate-*r*72.8%
times-frac72.8%
unpow272.8%
associate-*l*74.4%
unpow274.4%
associate-*l*74.4%
Simplified74.4%
Final simplification64.5%
(FPCore (t l k) :precision binary64 (if (<= k 1.82e-9) (* (/ l (/ k l)) (/ (cos k) (* (sin k) (pow t 3.0)))) (* 2.0 (* (/ (* l l) (pow k 3.0)) (/ (cos k) (* t k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.82e-9) {
tmp = (l / (k / l)) * (cos(k) / (sin(k) * pow(t, 3.0)));
} else {
tmp = 2.0 * (((l * l) / pow(k, 3.0)) * (cos(k) / (t * k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.82d-9) then
tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ** 3.0d0)))
else
tmp = 2.0d0 * (((l * l) / (k ** 3.0d0)) * (cos(k) / (t * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.82e-9) {
tmp = (l / (k / l)) * (Math.cos(k) / (Math.sin(k) * Math.pow(t, 3.0)));
} else {
tmp = 2.0 * (((l * l) / Math.pow(k, 3.0)) * (Math.cos(k) / (t * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.82e-9: tmp = (l / (k / l)) * (math.cos(k) / (math.sin(k) * math.pow(t, 3.0))) else: tmp = 2.0 * (((l * l) / math.pow(k, 3.0)) * (math.cos(k) / (t * k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.82e-9) tmp = Float64(Float64(l / Float64(k / l)) * Float64(cos(k) / Float64(sin(k) * (t ^ 3.0)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 3.0)) * Float64(cos(k) / Float64(t * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.82e-9) tmp = (l / (k / l)) * (cos(k) / (sin(k) * (t ^ 3.0))); else tmp = 2.0 * (((l * l) / (k ^ 3.0)) * (cos(k) / (t * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.82e-9], N[(N[(l / N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.82 \cdot 10^{-9}:\\
\;\;\;\;\frac{\ell}{\frac{k}{\ell}} \cdot \frac{\cos k}{\sin k \cdot {t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{3}} \cdot \frac{\cos k}{t \cdot k}\right)\\
\end{array}
\end{array}
if k < 1.8199999999999999e-9Initial program 56.3%
associate-/r*56.5%
associate-*l*52.8%
sqr-neg52.8%
associate-*l*56.5%
*-commutative56.5%
sqr-neg56.5%
associate-/r*56.5%
Simplified56.3%
Taylor expanded in k around 0 54.7%
unpow254.7%
Simplified54.7%
Taylor expanded in t around inf 55.3%
times-frac55.5%
unpow255.5%
associate-/l*60.7%
*-commutative60.7%
Simplified60.7%
if 1.8199999999999999e-9 < k Initial program 40.7%
associate-/r*40.7%
associate-*l*40.7%
sqr-neg40.7%
associate-*l*40.7%
*-commutative40.7%
sqr-neg40.7%
associate-/r*40.7%
Simplified40.7%
Taylor expanded in k around 0 35.4%
unpow235.4%
Simplified35.4%
Taylor expanded in k around inf 59.2%
times-frac59.2%
unpow259.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in k around 0 62.1%
Final simplification61.1%
(FPCore (t l k) :precision binary64 (if (<= k 5.8e-9) (/ (* l (* 2.0 (/ l (* k (* k (pow t 3.0)))))) (+ 2.0 (pow (/ k t) 2.0))) (* 2.0 (* (/ (* l l) (pow k 3.0)) (/ (cos k) (* t k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 5.8e-9) {
tmp = (l * (2.0 * (l / (k * (k * pow(t, 3.0)))))) / (2.0 + pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l * l) / pow(k, 3.0)) * (cos(k) / (t * k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5.8d-9) then
tmp = (l * (2.0d0 * (l / (k * (k * (t ** 3.0d0)))))) / (2.0d0 + ((k / t) ** 2.0d0))
else
tmp = 2.0d0 * (((l * l) / (k ** 3.0d0)) * (cos(k) / (t * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 5.8e-9) {
tmp = (l * (2.0 * (l / (k * (k * Math.pow(t, 3.0)))))) / (2.0 + Math.pow((k / t), 2.0));
} else {
tmp = 2.0 * (((l * l) / Math.pow(k, 3.0)) * (Math.cos(k) / (t * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 5.8e-9: tmp = (l * (2.0 * (l / (k * (k * math.pow(t, 3.0)))))) / (2.0 + math.pow((k / t), 2.0)) else: tmp = 2.0 * (((l * l) / math.pow(k, 3.0)) * (math.cos(k) / (t * k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 5.8e-9) tmp = Float64(Float64(l * Float64(2.0 * Float64(l / Float64(k * Float64(k * (t ^ 3.0)))))) / Float64(2.0 + (Float64(k / t) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 3.0)) * Float64(cos(k) / Float64(t * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 5.8e-9) tmp = (l * (2.0 * (l / (k * (k * (t ^ 3.0)))))) / (2.0 + ((k / t) ^ 2.0)); else tmp = 2.0 * (((l * l) / (k ^ 3.0)) * (cos(k) / (t * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 5.8e-9], N[(N[(l * N[(2.0 * N[(l / N[(k * N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{\ell \cdot \left(2 \cdot \frac{\ell}{k \cdot \left(k \cdot {t}^{3}\right)}\right)}{2 + {\left(\frac{k}{t}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{3}} \cdot \frac{\cos k}{t \cdot k}\right)\\
\end{array}
\end{array}
if k < 5.79999999999999982e-9Initial program 56.3%
associate-/r*56.5%
associate-*l*52.8%
sqr-neg52.8%
associate-*l*56.5%
*-commutative56.5%
sqr-neg56.5%
associate-*l/56.5%
associate-*r/56.6%
associate-/r/56.5%
Simplified56.5%
add-cube-cbrt56.5%
pow356.5%
*-commutative56.5%
cbrt-prod56.4%
cbrt-prod56.3%
rem-cbrt-cube64.2%
Applied egg-rr64.2%
associate-*l/64.3%
associate-*l*64.3%
Applied egg-rr64.3%
unpow264.3%
*-commutative64.3%
associate-*r/64.2%
unpow264.2%
associate-*l*70.3%
Simplified70.3%
Taylor expanded in k around 0 54.6%
unpow254.6%
associate-*l*60.2%
Simplified60.2%
if 5.79999999999999982e-9 < k Initial program 40.7%
associate-/r*40.7%
associate-*l*40.7%
sqr-neg40.7%
associate-*l*40.7%
*-commutative40.7%
sqr-neg40.7%
associate-/r*40.7%
Simplified40.7%
Taylor expanded in k around 0 35.4%
unpow235.4%
Simplified35.4%
Taylor expanded in k around inf 59.2%
times-frac59.2%
unpow259.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in k around 0 62.1%
Final simplification60.7%
(FPCore (t l k)
:precision binary64
(if (<= k 1.2e-272)
(* 2.0 (* (/ l t) (/ l (pow k 4.0))))
(if (<= k 4.2e-193)
(/ (* l l) (* k (* k (pow t 3.0))))
(if (<= k 1.8e-9)
(* (/ (/ l k) k) (/ l (pow t 3.0)))
(* 2.0 (* (/ (* l l) (pow k 3.0)) (/ (cos k) (* t k))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.2e-272) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else if (k <= 4.2e-193) {
tmp = (l * l) / (k * (k * pow(t, 3.0)));
} else if (k <= 1.8e-9) {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * (((l * l) / pow(k, 3.0)) * (cos(k) / (t * k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.2d-272) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else if (k <= 4.2d-193) then
tmp = (l * l) / (k * (k * (t ** 3.0d0)))
else if (k <= 1.8d-9) then
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * (((l * l) / (k ** 3.0d0)) * (cos(k) / (t * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.2e-272) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else if (k <= 4.2e-193) {
tmp = (l * l) / (k * (k * Math.pow(t, 3.0)));
} else if (k <= 1.8e-9) {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * (((l * l) / Math.pow(k, 3.0)) * (Math.cos(k) / (t * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.2e-272: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) elif k <= 4.2e-193: tmp = (l * l) / (k * (k * math.pow(t, 3.0))) elif k <= 1.8e-9: tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * (((l * l) / math.pow(k, 3.0)) * (math.cos(k) / (t * k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.2e-272) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); elseif (k <= 4.2e-193) tmp = Float64(Float64(l * l) / Float64(k * Float64(k * (t ^ 3.0)))); elseif (k <= 1.8e-9) tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 3.0)) * Float64(cos(k) / Float64(t * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.2e-272) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); elseif (k <= 4.2e-193) tmp = (l * l) / (k * (k * (t ^ 3.0))); elseif (k <= 1.8e-9) tmp = ((l / k) / k) * (l / (t ^ 3.0)); else tmp = 2.0 * (((l * l) / (k ^ 3.0)) * (cos(k) / (t * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.2e-272], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.2e-193], N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e-9], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.2 \cdot 10^{-272}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{elif}\;k \leq 4.2 \cdot 10^{-193}:\\
\;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\
\mathbf{elif}\;k \leq 1.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{3}} \cdot \frac{\cos k}{t \cdot k}\right)\\
\end{array}
\end{array}
if k < 1.19999999999999995e-272Initial program 50.9%
associate-/r*51.1%
associate-*l*47.2%
sqr-neg47.2%
associate-*l*51.1%
*-commutative51.1%
sqr-neg51.1%
associate-/r*51.1%
Simplified50.9%
Taylor expanded in k around 0 48.7%
unpow248.7%
Simplified48.7%
Taylor expanded in k around inf 52.3%
times-frac52.6%
unpow252.6%
*-commutative52.6%
Simplified52.6%
Taylor expanded in k around 0 52.0%
unpow252.0%
*-commutative52.0%
times-frac53.5%
Simplified53.5%
if 1.19999999999999995e-272 < k < 4.1999999999999999e-193Initial program 57.2%
associate-/r*57.2%
associate-*l*50.0%
sqr-neg50.0%
associate-*l*57.2%
*-commutative57.2%
sqr-neg57.2%
associate-/r*57.2%
Simplified56.6%
associate-/l/56.6%
associate-/r/57.2%
add-cube-cbrt57.2%
pow357.2%
Applied egg-rr83.3%
Taylor expanded in k around 0 50.0%
unpow250.0%
associate-*l*56.7%
unpow256.7%
Simplified56.7%
if 4.1999999999999999e-193 < k < 1.8e-9Initial program 83.8%
associate-/r*83.8%
associate-*l*83.9%
sqr-neg83.9%
associate-*l*83.8%
*-commutative83.8%
sqr-neg83.8%
associate-/r*83.8%
Simplified83.9%
associate-/l/83.9%
associate-/r/83.8%
add-cube-cbrt83.5%
pow383.5%
Applied egg-rr88.7%
Taylor expanded in k around 0 85.3%
associate-/r*87.5%
unpow287.5%
associate-*l/88.8%
unpow288.8%
associate-*r/88.9%
Simplified88.9%
add-log-exp60.0%
Applied egg-rr60.0%
add-log-exp88.9%
associate-/r*89.0%
Applied egg-rr89.0%
if 1.8e-9 < k Initial program 40.7%
associate-/r*40.7%
associate-*l*40.7%
sqr-neg40.7%
associate-*l*40.7%
*-commutative40.7%
sqr-neg40.7%
associate-/r*40.7%
Simplified40.7%
Taylor expanded in k around 0 35.4%
unpow235.4%
Simplified35.4%
Taylor expanded in k around inf 59.2%
times-frac59.2%
unpow259.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in k around 0 62.1%
Final simplification59.9%
(FPCore (t l k)
:precision binary64
(if (<= t -1.2e-63)
(/ (* l l) (* k (* k (pow t 3.0))))
(if (<= t 3.2e-100)
(* 2.0 (* (/ l t) (* l (/ 1.0 (pow k 4.0)))))
(* (/ (/ l k) k) (/ l (pow t 3.0))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -1.2e-63) {
tmp = (l * l) / (k * (k * pow(t, 3.0)));
} else if (t <= 3.2e-100) {
tmp = 2.0 * ((l / t) * (l * (1.0 / pow(k, 4.0))));
} else {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-1.2d-63)) then
tmp = (l * l) / (k * (k * (t ** 3.0d0)))
else if (t <= 3.2d-100) then
tmp = 2.0d0 * ((l / t) * (l * (1.0d0 / (k ** 4.0d0))))
else
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -1.2e-63) {
tmp = (l * l) / (k * (k * Math.pow(t, 3.0)));
} else if (t <= 3.2e-100) {
tmp = 2.0 * ((l / t) * (l * (1.0 / Math.pow(k, 4.0))));
} else {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -1.2e-63: tmp = (l * l) / (k * (k * math.pow(t, 3.0))) elif t <= 3.2e-100: tmp = 2.0 * ((l / t) * (l * (1.0 / math.pow(k, 4.0)))) else: tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -1.2e-63) tmp = Float64(Float64(l * l) / Float64(k * Float64(k * (t ^ 3.0)))); elseif (t <= 3.2e-100) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l * Float64(1.0 / (k ^ 4.0))))); else tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -1.2e-63) tmp = (l * l) / (k * (k * (t ^ 3.0))); elseif (t <= 3.2e-100) tmp = 2.0 * ((l / t) * (l * (1.0 / (k ^ 4.0)))); else tmp = ((l / k) / k) * (l / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -1.2e-63], N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-100], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l * N[(1.0 / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-63}:\\
\;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-100}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \left(\ell \cdot \frac{1}{{k}^{4}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\end{array}
\end{array}
if t < -1.2e-63Initial program 66.3%
associate-/r*66.6%
associate-*l*63.5%
sqr-neg63.5%
associate-*l*66.6%
*-commutative66.6%
sqr-neg66.6%
associate-/r*66.6%
Simplified66.4%
associate-/l/66.4%
associate-/r/66.6%
add-cube-cbrt66.5%
pow366.5%
Applied egg-rr78.2%
Taylor expanded in k around 0 60.0%
unpow260.0%
associate-*l*63.1%
unpow263.1%
Simplified63.1%
if -1.2e-63 < t < 3.20000000000000017e-100Initial program 32.4%
associate-/r*32.4%
associate-*l*32.4%
sqr-neg32.4%
associate-*l*32.4%
*-commutative32.4%
sqr-neg32.4%
associate-/r*32.4%
Simplified32.4%
Taylor expanded in k around 0 32.4%
unpow232.4%
Simplified32.4%
Taylor expanded in k around inf 65.3%
times-frac65.6%
unpow265.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in k around 0 63.1%
unpow263.1%
*-commutative63.1%
times-frac66.7%
Simplified66.7%
div-inv66.7%
Applied egg-rr66.7%
if 3.20000000000000017e-100 < t Initial program 59.3%
associate-/r*59.3%
associate-*l*54.5%
sqr-neg54.5%
associate-*l*59.3%
*-commutative59.3%
sqr-neg59.3%
associate-/r*59.3%
Simplified59.2%
associate-/l/59.2%
associate-/r/59.3%
add-cube-cbrt59.3%
pow359.2%
Applied egg-rr74.6%
Taylor expanded in k around 0 52.3%
associate-/r*51.3%
unpow251.3%
associate-*l/52.1%
unpow252.1%
associate-*r/56.4%
Simplified56.4%
add-log-exp45.3%
Applied egg-rr45.3%
add-log-exp56.4%
associate-/r*58.8%
Applied egg-rr58.8%
Final simplification62.9%
(FPCore (t l k) :precision binary64 (if (or (<= k 2e-157) (not (<= k 4.8e-9))) (* 2.0 (* (/ l t) (/ l (pow k 4.0)))) (* (/ l (* k k)) (/ l (pow t 3.0)))))
double code(double t, double l, double k) {
double tmp;
if ((k <= 2e-157) || !(k <= 4.8e-9)) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else {
tmp = (l / (k * k)) * (l / 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 <= 2d-157) .or. (.not. (k <= 4.8d-9))) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else
tmp = (l / (k * k)) * (l / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((k <= 2e-157) || !(k <= 4.8e-9)) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else {
tmp = (l / (k * k)) * (l / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (k <= 2e-157) or not (k <= 4.8e-9): tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) else: tmp = (l / (k * k)) * (l / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if ((k <= 2e-157) || !(k <= 4.8e-9)) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); else tmp = Float64(Float64(l / Float64(k * k)) * Float64(l / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((k <= 2e-157) || ~((k <= 4.8e-9))) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); else tmp = (l / (k * k)) * (l / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[k, 2e-157], N[Not[LessEqual[k, 4.8e-9]], $MachinePrecision]], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-157} \lor \neg \left(k \leq 4.8 \cdot 10^{-9}\right):\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot k} \cdot \frac{\ell}{{t}^{3}}\\
\end{array}
\end{array}
if k < 1.99999999999999989e-157 or 4.8e-9 < k Initial program 48.6%
associate-/r*48.7%
associate-*l*45.8%
sqr-neg45.8%
associate-*l*48.7%
*-commutative48.7%
sqr-neg48.7%
associate-/r*48.7%
Simplified48.6%
Taylor expanded in k around 0 45.6%
unpow245.6%
Simplified45.6%
Taylor expanded in k around inf 54.8%
times-frac54.9%
unpow254.9%
*-commutative54.9%
Simplified54.9%
Taylor expanded in k around 0 54.1%
unpow254.1%
*-commutative54.1%
times-frac55.5%
Simplified55.5%
if 1.99999999999999989e-157 < k < 4.8e-9Initial program 82.5%
associate-/r*82.5%
associate-*l*82.6%
sqr-neg82.6%
associate-*l*82.5%
*-commutative82.5%
sqr-neg82.5%
associate-/r*82.5%
Simplified82.6%
associate-/l/82.6%
associate-/r/82.5%
add-cube-cbrt82.2%
pow382.2%
Applied egg-rr87.8%
Taylor expanded in k around 0 84.1%
associate-/r*86.5%
unpow286.5%
associate-*l/87.9%
unpow287.9%
associate-*r/88.0%
Simplified88.0%
Final simplification58.7%
(FPCore (t l k) :precision binary64 (if (or (<= t -7e-66) (not (<= t 1.95e-94))) (* (/ (/ l k) k) (/ l (pow t 3.0))) (* 2.0 (* (/ l t) (/ l (pow k 4.0))))))
double code(double t, double l, double k) {
double tmp;
if ((t <= -7e-66) || !(t <= 1.95e-94)) {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-7d-66)) .or. (.not. (t <= 1.95d-94))) then
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
else
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((t <= -7e-66) || !(t <= 1.95e-94)) {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
} else {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (t <= -7e-66) or not (t <= 1.95e-94): tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) else: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) return tmp
function code(t, l, k) tmp = 0.0 if ((t <= -7e-66) || !(t <= 1.95e-94)) tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); else tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((t <= -7e-66) || ~((t <= 1.95e-94))) tmp = ((l / k) / k) * (l / (t ^ 3.0)); else tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[Or[LessEqual[t, -7e-66], N[Not[LessEqual[t, 1.95e-94]], $MachinePrecision]], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-66} \lor \neg \left(t \leq 1.95 \cdot 10^{-94}\right):\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\end{array}
\end{array}
if t < -7.0000000000000001e-66 or 1.9500000000000001e-94 < t Initial program 62.5%
associate-/r*62.7%
associate-*l*58.7%
sqr-neg58.7%
associate-*l*62.7%
*-commutative62.7%
sqr-neg62.7%
associate-/r*62.7%
Simplified62.5%
associate-/l/62.5%
associate-/r/62.7%
add-cube-cbrt62.6%
pow362.6%
Applied egg-rr76.2%
Taylor expanded in k around 0 55.9%
associate-/r*55.7%
unpow255.7%
associate-*l/57.1%
unpow257.1%
associate-*r/58.8%
Simplified58.8%
add-log-exp49.1%
Applied egg-rr49.1%
add-log-exp58.8%
associate-/r*60.7%
Applied egg-rr60.7%
if -7.0000000000000001e-66 < t < 1.9500000000000001e-94Initial program 32.4%
associate-/r*32.4%
associate-*l*32.4%
sqr-neg32.4%
associate-*l*32.4%
*-commutative32.4%
sqr-neg32.4%
associate-/r*32.4%
Simplified32.4%
Taylor expanded in k around 0 32.4%
unpow232.4%
Simplified32.4%
Taylor expanded in k around inf 65.3%
times-frac65.6%
unpow265.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in k around 0 63.1%
unpow263.1%
*-commutative63.1%
times-frac66.7%
Simplified66.7%
Final simplification62.8%
(FPCore (t l k)
:precision binary64
(if (<= t -6.8e-61)
(/ (* l l) (* k (* k (pow t 3.0))))
(if (<= t 1.16e-92)
(* 2.0 (* (/ l t) (/ l (pow k 4.0))))
(* (/ (/ l k) k) (/ l (pow t 3.0))))))
double code(double t, double l, double k) {
double tmp;
if (t <= -6.8e-61) {
tmp = (l * l) / (k * (k * pow(t, 3.0)));
} else if (t <= 1.16e-92) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else {
tmp = ((l / k) / k) * (l / pow(t, 3.0));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= (-6.8d-61)) then
tmp = (l * l) / (k * (k * (t ** 3.0d0)))
else if (t <= 1.16d-92) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else
tmp = ((l / k) / k) * (l / (t ** 3.0d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= -6.8e-61) {
tmp = (l * l) / (k * (k * Math.pow(t, 3.0)));
} else if (t <= 1.16e-92) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else {
tmp = ((l / k) / k) * (l / Math.pow(t, 3.0));
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= -6.8e-61: tmp = (l * l) / (k * (k * math.pow(t, 3.0))) elif t <= 1.16e-92: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) else: tmp = ((l / k) / k) * (l / math.pow(t, 3.0)) return tmp
function code(t, l, k) tmp = 0.0 if (t <= -6.8e-61) tmp = Float64(Float64(l * l) / Float64(k * Float64(k * (t ^ 3.0)))); elseif (t <= 1.16e-92) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); else tmp = Float64(Float64(Float64(l / k) / k) * Float64(l / (t ^ 3.0))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= -6.8e-61) tmp = (l * l) / (k * (k * (t ^ 3.0))); elseif (t <= 1.16e-92) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); else tmp = ((l / k) / k) * (l / (t ^ 3.0)); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, -6.8e-61], N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e-92], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-92}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{k}}{k} \cdot \frac{\ell}{{t}^{3}}\\
\end{array}
\end{array}
if t < -6.7999999999999996e-61Initial program 66.3%
associate-/r*66.6%
associate-*l*63.5%
sqr-neg63.5%
associate-*l*66.6%
*-commutative66.6%
sqr-neg66.6%
associate-/r*66.6%
Simplified66.4%
associate-/l/66.4%
associate-/r/66.6%
add-cube-cbrt66.5%
pow366.5%
Applied egg-rr78.2%
Taylor expanded in k around 0 60.0%
unpow260.0%
associate-*l*63.1%
unpow263.1%
Simplified63.1%
if -6.7999999999999996e-61 < t < 1.1599999999999999e-92Initial program 32.4%
associate-/r*32.4%
associate-*l*32.4%
sqr-neg32.4%
associate-*l*32.4%
*-commutative32.4%
sqr-neg32.4%
associate-/r*32.4%
Simplified32.4%
Taylor expanded in k around 0 32.4%
unpow232.4%
Simplified32.4%
Taylor expanded in k around inf 65.3%
times-frac65.6%
unpow265.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in k around 0 63.1%
unpow263.1%
*-commutative63.1%
times-frac66.7%
Simplified66.7%
if 1.1599999999999999e-92 < t Initial program 59.3%
associate-/r*59.3%
associate-*l*54.5%
sqr-neg54.5%
associate-*l*59.3%
*-commutative59.3%
sqr-neg59.3%
associate-/r*59.3%
Simplified59.2%
associate-/l/59.2%
associate-/r/59.3%
add-cube-cbrt59.3%
pow359.2%
Applied egg-rr74.6%
Taylor expanded in k around 0 52.3%
associate-/r*51.3%
unpow251.3%
associate-*l/52.1%
unpow252.1%
associate-*r/56.4%
Simplified56.4%
add-log-exp45.3%
Applied egg-rr45.3%
add-log-exp56.4%
associate-/r*58.8%
Applied egg-rr58.8%
Final simplification62.9%
(FPCore (t l k) :precision binary64 (if (<= t 9.5e+108) (* 2.0 (* (/ l t) (/ l (pow k 4.0)))) (/ (* (* l l) -0.5) (pow t 5.0))))
double code(double t, double l, double k) {
double tmp;
if (t <= 9.5e+108) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else {
tmp = ((l * l) * -0.5) / pow(t, 5.0);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t <= 9.5d+108) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else
tmp = ((l * l) * (-0.5d0)) / (t ** 5.0d0)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (t <= 9.5e+108) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else {
tmp = ((l * l) * -0.5) / Math.pow(t, 5.0);
}
return tmp;
}
def code(t, l, k): tmp = 0 if t <= 9.5e+108: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) else: tmp = ((l * l) * -0.5) / math.pow(t, 5.0) return tmp
function code(t, l, k) tmp = 0.0 if (t <= 9.5e+108) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); else tmp = Float64(Float64(Float64(l * l) * -0.5) / (t ^ 5.0)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (t <= 9.5e+108) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); else tmp = ((l * l) * -0.5) / (t ^ 5.0); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[t, 9.5e+108], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] * -0.5), $MachinePrecision] / N[Power[t, 5.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{+108}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot -0.5}{{t}^{5}}\\
\end{array}
\end{array}
if t < 9.50000000000000097e108Initial program 53.7%
associate-/r*53.8%
associate-*l*52.2%
sqr-neg52.2%
associate-*l*53.8%
*-commutative53.8%
sqr-neg53.8%
associate-/r*53.8%
Simplified53.7%
Taylor expanded in k around 0 50.6%
unpow250.6%
Simplified50.6%
Taylor expanded in k around inf 58.9%
times-frac59.0%
unpow259.0%
*-commutative59.0%
Simplified59.0%
Taylor expanded in k around 0 58.3%
unpow258.3%
*-commutative58.3%
times-frac60.1%
Simplified60.1%
if 9.50000000000000097e108 < t Initial program 41.6%
associate-/r*41.6%
associate-*l*32.9%
sqr-neg32.9%
associate-*l*41.6%
*-commutative41.6%
sqr-neg41.6%
associate-/r*41.6%
Simplified41.2%
associate-/l/41.2%
associate-/r/41.6%
add-cube-cbrt41.6%
pow341.6%
Applied egg-rr63.2%
Taylor expanded in k around 0 32.9%
fma-def32.9%
*-commutative32.9%
associate-/l*32.9%
unpow232.9%
unpow232.9%
associate-/r*32.8%
unpow232.8%
associate-*l/32.8%
unpow232.8%
associate-*r/32.9%
Simplified32.9%
Taylor expanded in t around 0 41.6%
associate-*r/41.6%
unpow241.6%
Simplified41.6%
Final simplification57.5%
(FPCore (t l k) :precision binary64 (/ (* (* l l) -0.5) (pow t 5.0)))
double code(double t, double l, double k) {
return ((l * l) * -0.5) / pow(t, 5.0);
}
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.5d0)) / (t ** 5.0d0)
end function
public static double code(double t, double l, double k) {
return ((l * l) * -0.5) / Math.pow(t, 5.0);
}
def code(t, l, k): return ((l * l) * -0.5) / math.pow(t, 5.0)
function code(t, l, k) return Float64(Float64(Float64(l * l) * -0.5) / (t ^ 5.0)) end
function tmp = code(t, l, k) tmp = ((l * l) * -0.5) / (t ^ 5.0); end
code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] * -0.5), $MachinePrecision] / N[Power[t, 5.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\ell \cdot \ell\right) \cdot -0.5}{{t}^{5}}
\end{array}
Initial program 51.9%
associate-/r*52.0%
associate-*l*49.4%
sqr-neg49.4%
associate-*l*52.0%
*-commutative52.0%
sqr-neg52.0%
associate-/r*52.0%
Simplified51.9%
associate-/l/51.9%
associate-/r/52.0%
add-cube-cbrt52.0%
pow352.0%
Applied egg-rr69.8%
Taylor expanded in k around 0 25.8%
fma-def25.8%
*-commutative25.8%
associate-/l*25.8%
unpow225.8%
unpow225.8%
associate-/r*25.6%
unpow225.6%
associate-*l/25.9%
unpow225.9%
associate-*r/25.9%
Simplified25.9%
Taylor expanded in t around 0 23.3%
associate-*r/23.3%
unpow223.3%
Simplified23.3%
Final simplification23.3%
herbie shell --seed 2023283
(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))))