
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 5.3e-55)
(/ (* 2.0 (pow (/ l k) 2.0)) (* k (* k t)))
(if (<= k 1.08e+154)
(* 2.0 (/ (cos k) (/ t_1 (* (/ l k) (/ (/ l t) k)))))
(* 2.0 (* (* (/ l k) (/ l k)) (* (cos k) (/ 1.0 (* t t_1)))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 5.3e-55) {
tmp = (2.0 * pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.08e+154) {
tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * (1.0 / (t * t_1))));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 5.3d-55) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / (k * (k * t))
else if (k <= 1.08d+154) then
tmp = 2.0d0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) * (1.0d0 / (t * t_1))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 5.3e-55) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.08e+154) {
tmp = 2.0 * (Math.cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) * (1.0 / (t * t_1))));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 5.3e-55: tmp = (2.0 * math.pow((l / k), 2.0)) / (k * (k * t)) elif k <= 1.08e+154: tmp = 2.0 * (math.cos(k) / (t_1 / ((l / k) * ((l / t) / k)))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) * (1.0 / (t * t_1)))) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 5.3e-55) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / Float64(k * Float64(k * t))); elseif (k <= 1.08e+154) tmp = Float64(2.0 * Float64(cos(k) / Float64(t_1 / Float64(Float64(l / k) * Float64(Float64(l / t) / k))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) * Float64(1.0 / Float64(t * t_1))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 5.3e-55) tmp = (2.0 * ((l / k) ^ 2.0)) / (k * (k * t)); elseif (k <= 1.08e+154) tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k)))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) * (1.0 / (t * t_1)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 5.3e-55], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.08e+154], N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(t$95$1 / N[(N[(l / k), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(1.0 / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 5.3 \cdot 10^{-55}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 1.08 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \frac{\cos k}{\frac{t_1}{\frac{\ell}{k} \cdot \frac{\frac{\ell}{t}}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\cos k \cdot \frac{1}{t \cdot t_1}\right)\right)\\
\end{array}
\end{array}
if k < 5.3000000000000003e-55Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 5.3000000000000003e-55 < k < 1.08e154Initial program 24.8%
associate-*l*24.8%
associate-*l*24.8%
associate-/r*24.7%
associate-/r/24.8%
*-commutative24.8%
times-frac24.8%
+-commutative24.8%
associate--l+32.1%
metadata-eval32.1%
+-rgt-identity32.1%
times-frac32.1%
Simplified32.1%
Taylor expanded in t around 0 81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
*-commutative80.3%
Simplified80.3%
associate-*r/80.3%
pow280.3%
Applied egg-rr80.3%
Taylor expanded in l around 0 81.0%
*-commutative81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
unpow280.3%
associate-/r/79.9%
*-commutative79.9%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in l around 0 82.8%
*-commutative82.8%
associate-/r*79.8%
unpow279.8%
associate-*r/92.4%
unpow292.4%
times-frac97.5%
Simplified97.5%
if 1.08e154 < k Initial program 25.9%
associate-*l*25.9%
associate-*l*25.9%
associate-/r*25.9%
associate-/r/25.9%
*-commutative25.9%
times-frac23.4%
+-commutative23.4%
associate--l+31.1%
metadata-eval31.1%
+-rgt-identity31.1%
times-frac31.1%
Simplified31.1%
Taylor expanded in t around 0 52.2%
*-commutative52.2%
times-frac52.2%
unpow252.2%
unpow252.2%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
div-inv97.1%
Applied egg-rr97.1%
Final simplification85.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 3.5e-55)
(/ (* 2.0 (pow (/ l k) 2.0)) (* k (* k t)))
(if (<= k 1.16e+154)
(* 2.0 (* (* (/ l k) (/ (/ l t) k)) (/ (cos k) t_1)))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t t_1))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 3.5e-55) {
tmp = (2.0 * pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.16e+154) {
tmp = 2.0 * (((l / k) * ((l / t) / k)) * (cos(k) / t_1));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 3.5d-55) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / (k * (k * t))
else if (k <= 1.16d+154) then
tmp = 2.0d0 * (((l / k) * ((l / t) / k)) * (cos(k) / t_1))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 3.5e-55) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.16e+154) {
tmp = 2.0 * (((l / k) * ((l / t) / k)) * (Math.cos(k) / t_1));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * t_1)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 3.5e-55: tmp = (2.0 * math.pow((l / k), 2.0)) / (k * (k * t)) elif k <= 1.16e+154: tmp = 2.0 * (((l / k) * ((l / t) / k)) * (math.cos(k) / t_1)) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * t_1))) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 3.5e-55) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / Float64(k * Float64(k * t))); elseif (k <= 1.16e+154) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(Float64(l / t) / k)) * Float64(cos(k) / t_1))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * t_1)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 3.5e-55) tmp = (2.0 * ((l / k) ^ 2.0)) / (k * (k * t)); elseif (k <= 1.16e+154) tmp = 2.0 * (((l / k) * ((l / t) / k)) * (cos(k) / t_1)); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 3.5e-55], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.16e+154], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 3.5 \cdot 10^{-55}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 1.16 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\frac{\ell}{t}}{k}\right) \cdot \frac{\cos k}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\end{array}
\end{array}
if k < 3.50000000000000025e-55Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 3.50000000000000025e-55 < k < 1.16000000000000001e154Initial program 24.8%
associate-*l*24.8%
associate-*l*24.8%
associate-/r*24.7%
associate-/r/24.8%
*-commutative24.8%
times-frac24.8%
+-commutative24.8%
associate--l+32.1%
metadata-eval32.1%
+-rgt-identity32.1%
times-frac32.1%
Simplified32.1%
Taylor expanded in t around 0 81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in l around 0 81.0%
*-commutative81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
unpow280.3%
associate-*r/80.3%
times-frac84.2%
Simplified84.2%
Taylor expanded in l around 0 82.7%
*-commutative82.8%
associate-/r*79.8%
unpow279.8%
associate-*r/92.4%
unpow292.4%
times-frac97.5%
Simplified97.5%
if 1.16000000000000001e154 < k Initial program 25.9%
associate-*l*25.9%
associate-*l*25.9%
associate-/r*25.9%
associate-/r/25.9%
*-commutative25.9%
times-frac23.4%
+-commutative23.4%
associate--l+31.1%
metadata-eval31.1%
+-rgt-identity31.1%
times-frac31.1%
Simplified31.1%
Taylor expanded in t around 0 52.2%
*-commutative52.2%
times-frac52.2%
unpow252.2%
unpow252.2%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
Final simplification85.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 1.08e-54)
(/ (* 2.0 (pow (/ l k) 2.0)) (* k (* k t)))
(if (<= k 1.2e+154)
(* 2.0 (/ (cos k) (/ t_1 (* (/ l k) (/ (/ l t) k)))))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t t_1))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 1.08e-54) {
tmp = (2.0 * pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.2e+154) {
tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 1.08d-54) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / (k * (k * t))
else if (k <= 1.2d+154) then
tmp = 2.0d0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 1.08e-54) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.2e+154) {
tmp = 2.0 * (Math.cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * t_1)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 1.08e-54: tmp = (2.0 * math.pow((l / k), 2.0)) / (k * (k * t)) elif k <= 1.2e+154: tmp = 2.0 * (math.cos(k) / (t_1 / ((l / k) * ((l / t) / k)))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * t_1))) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 1.08e-54) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / Float64(k * Float64(k * t))); elseif (k <= 1.2e+154) tmp = Float64(2.0 * Float64(cos(k) / Float64(t_1 / Float64(Float64(l / k) * Float64(Float64(l / t) / k))))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * t_1)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 1.08e-54) tmp = (2.0 * ((l / k) ^ 2.0)) / (k * (k * t)); elseif (k <= 1.2e+154) tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k)))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 1.08e-54], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e+154], N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(t$95$1 / N[(N[(l / k), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 1.08 \cdot 10^{-54}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \frac{\cos k}{\frac{t_1}{\frac{\ell}{k} \cdot \frac{\frac{\ell}{t}}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\end{array}
\end{array}
if k < 1.08000000000000002e-54Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 1.08000000000000002e-54 < k < 1.20000000000000007e154Initial program 24.8%
associate-*l*24.8%
associate-*l*24.8%
associate-/r*24.7%
associate-/r/24.8%
*-commutative24.8%
times-frac24.8%
+-commutative24.8%
associate--l+32.1%
metadata-eval32.1%
+-rgt-identity32.1%
times-frac32.1%
Simplified32.1%
Taylor expanded in t around 0 81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
*-commutative80.3%
Simplified80.3%
associate-*r/80.3%
pow280.3%
Applied egg-rr80.3%
Taylor expanded in l around 0 81.0%
*-commutative81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
unpow280.3%
associate-/r/79.9%
*-commutative79.9%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in l around 0 82.8%
*-commutative82.8%
associate-/r*79.8%
unpow279.8%
associate-*r/92.4%
unpow292.4%
times-frac97.5%
Simplified97.5%
if 1.20000000000000007e154 < k Initial program 25.9%
associate-*l*25.9%
associate-*l*25.9%
associate-/r*25.9%
associate-/r/25.9%
*-commutative25.9%
times-frac23.4%
+-commutative23.4%
associate--l+31.1%
metadata-eval31.1%
+-rgt-identity31.1%
times-frac31.1%
Simplified31.1%
Taylor expanded in t around 0 52.2%
*-commutative52.2%
times-frac52.2%
unpow252.2%
unpow252.2%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
Final simplification85.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 2.6e-54)
(/ (* 2.0 (pow (/ l k) 2.0)) (* k (* k t)))
(if (<= k 1.2e+154)
(* 2.0 (/ (cos k) (/ t_1 (* (/ l k) (/ (/ l t) k)))))
(* 2.0 (/ (* (cos k) (* (/ l k) (/ l k))) (* t t_1)))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 2.6e-54) {
tmp = (2.0 * pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.2e+154) {
tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * ((cos(k) * ((l / k) * (l / k))) / (t * t_1));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 2.6d-54) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / (k * (k * t))
else if (k <= 1.2d+154) then
tmp = 2.0d0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k))))
else
tmp = 2.0d0 * ((cos(k) * ((l / k) * (l / k))) / (t * t_1))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 2.6e-54) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / (k * (k * t));
} else if (k <= 1.2e+154) {
tmp = 2.0 * (Math.cos(k) / (t_1 / ((l / k) * ((l / t) / k))));
} else {
tmp = 2.0 * ((Math.cos(k) * ((l / k) * (l / k))) / (t * t_1));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 2.6e-54: tmp = (2.0 * math.pow((l / k), 2.0)) / (k * (k * t)) elif k <= 1.2e+154: tmp = 2.0 * (math.cos(k) / (t_1 / ((l / k) * ((l / t) / k)))) else: tmp = 2.0 * ((math.cos(k) * ((l / k) * (l / k))) / (t * t_1)) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 2.6e-54) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / Float64(k * Float64(k * t))); elseif (k <= 1.2e+154) tmp = Float64(2.0 * Float64(cos(k) / Float64(t_1 / Float64(Float64(l / k) * Float64(Float64(l / t) / k))))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * Float64(Float64(l / k) * Float64(l / k))) / Float64(t * t_1))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 2.6e-54) tmp = (2.0 * ((l / k) ^ 2.0)) / (k * (k * t)); elseif (k <= 1.2e+154) tmp = 2.0 * (cos(k) / (t_1 / ((l / k) * ((l / t) / k)))); else tmp = 2.0 * ((cos(k) * ((l / k) * (l / k))) / (t * t_1)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 2.6e-54], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e+154], N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(t$95$1 / N[(N[(l / k), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 2.6 \cdot 10^{-54}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \frac{\cos k}{\frac{t_1}{\frac{\ell}{k} \cdot \frac{\frac{\ell}{t}}{k}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)}{t \cdot t_1}\\
\end{array}
\end{array}
if k < 2.60000000000000002e-54Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 2.60000000000000002e-54 < k < 1.20000000000000007e154Initial program 24.8%
associate-*l*24.8%
associate-*l*24.8%
associate-/r*24.7%
associate-/r/24.8%
*-commutative24.8%
times-frac24.8%
+-commutative24.8%
associate--l+32.1%
metadata-eval32.1%
+-rgt-identity32.1%
times-frac32.1%
Simplified32.1%
Taylor expanded in t around 0 81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
*-commutative80.3%
Simplified80.3%
associate-*r/80.3%
pow280.3%
Applied egg-rr80.3%
Taylor expanded in l around 0 81.0%
*-commutative81.0%
*-commutative81.0%
times-frac76.4%
unpow276.4%
unpow276.4%
times-frac80.3%
unpow280.3%
associate-/r/79.9%
*-commutative79.9%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in l around 0 82.8%
*-commutative82.8%
associate-/r*79.8%
unpow279.8%
associate-*r/92.4%
unpow292.4%
times-frac97.5%
Simplified97.5%
if 1.20000000000000007e154 < k Initial program 25.9%
associate-*l*25.9%
associate-*l*25.9%
associate-/r*25.9%
associate-/r/25.9%
*-commutative25.9%
times-frac23.4%
+-commutative23.4%
associate--l+31.1%
metadata-eval31.1%
+-rgt-identity31.1%
times-frac31.1%
Simplified31.1%
Taylor expanded in t around 0 52.2%
*-commutative52.2%
times-frac52.2%
unpow252.2%
unpow252.2%
times-frac97.0%
*-commutative97.0%
Simplified97.0%
associate-*r/97.1%
pow297.1%
Applied egg-rr97.1%
pow297.1%
Applied egg-rr97.1%
Final simplification85.3%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= (* l l) 2e+77) (* (/ 2.0 (* k (* k t))) (* (/ l (sin k)) (/ l (tan k)))) (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0)))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e+77) {
tmp = (2.0 / (k * (k * t))) * ((l / sin(k)) * (l / tan(k)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 2d+77) then
tmp = (2.0d0 / (k * (k * t))) * ((l / sin(k)) * (l / tan(k)))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e+77) {
tmp = (2.0 / (k * (k * t))) * ((l / Math.sin(k)) * (l / Math.tan(k)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (l * l) <= 2e+77: tmp = (2.0 / (k * (k * t))) * ((l / math.sin(k)) * (l / math.tan(k))) else: tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0)))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e+77) tmp = Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 2e+77) tmp = (2.0 / (k * (k * t))) * ((l / sin(k)) * (l / tan(k))); else tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e+77], N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{+77}:\\
\;\;\;\;\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 1.99999999999999997e77Initial program 30.6%
associate-*l*30.6%
associate-*l*30.6%
associate-/r*30.5%
associate-/r/30.6%
*-commutative30.6%
times-frac31.4%
+-commutative31.4%
associate--l+41.5%
metadata-eval41.5%
+-rgt-identity41.5%
times-frac49.5%
Simplified49.5%
Taylor expanded in t around 0 88.8%
unpow288.8%
associate-*l*94.3%
Simplified94.3%
if 1.99999999999999997e77 < (*.f64 l l) Initial program 31.1%
associate-*l*31.1%
associate-*l*31.1%
associate-/r*30.7%
associate-/r/30.7%
*-commutative30.7%
times-frac29.4%
+-commutative29.4%
associate--l+31.9%
metadata-eval31.9%
+-rgt-identity31.9%
times-frac31.9%
Simplified31.9%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac65.4%
unpow265.4%
unpow265.4%
times-frac93.5%
*-commutative93.5%
Simplified93.5%
Final simplification93.9%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ 2.0 (* k (* k t))) (* (/ l (sin k)) (/ l (tan k)))))
k = abs(k);
double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * ((l / sin(k)) * (l / tan(k)));
}
NOTE: k should be positive before calling this function
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 * (k * t))) * ((l / sin(k)) * (l / tan(k)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (2.0 / (k * (k * t))) * ((l / Math.sin(k)) * (l / Math.tan(k)));
}
k = abs(k) def code(t, l, k): return (2.0 / (k * (k * t))) * ((l / math.sin(k)) * (l / math.tan(k)))
k = abs(k) function code(t, l, k) return Float64(Float64(2.0 / Float64(k * Float64(k * t))) * Float64(Float64(l / sin(k)) * Float64(l / tan(k)))) end
k = abs(k) function tmp = code(t, l, k) tmp = (2.0 / (k * (k * t))) * ((l / sin(k)) * (l / tan(k))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{k \cdot \left(k \cdot t\right)} \cdot \left(\frac{\ell}{\sin k} \cdot \frac{\ell}{\tan k}\right)
\end{array}
Initial program 30.8%
associate-*l*30.8%
associate-*l*30.8%
associate-/r*30.6%
associate-/r/30.6%
*-commutative30.6%
times-frac30.5%
+-commutative30.5%
associate--l+37.1%
metadata-eval37.1%
+-rgt-identity37.1%
times-frac41.4%
Simplified41.4%
Taylor expanded in t around 0 77.9%
unpow277.9%
associate-*l*83.7%
Simplified83.7%
Final simplification83.7%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 8e-55)
(/ (* 2.0 (pow (/ l k) 2.0)) (* k (* k t)))
(*
(* 2.0 (/ (cos k) (* k k)))
(* (/ l t) (+ (/ l (* k k)) (* l 0.3333333333333333))))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 8e-55) {
tmp = (2.0 * pow((l / k), 2.0)) / (k * (k * t));
} else {
tmp = (2.0 * (cos(k) / (k * k))) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)));
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 8d-55) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / (k * (k * t))
else
tmp = (2.0d0 * (cos(k) / (k * k))) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 8e-55) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / (k * (k * t));
} else {
tmp = (2.0 * (Math.cos(k) / (k * k))) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 8e-55: tmp = (2.0 * math.pow((l / k), 2.0)) / (k * (k * t)) else: tmp = (2.0 * (math.cos(k) / (k * k))) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 8e-55) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / Float64(k * Float64(k * t))); else tmp = Float64(Float64(2.0 * Float64(cos(k) / Float64(k * k))) * Float64(Float64(l / t) * Float64(Float64(l / Float64(k * k)) + Float64(l * 0.3333333333333333)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 8e-55) tmp = (2.0 * ((l / k) ^ 2.0)) / (k * (k * t)); else tmp = (2.0 * (cos(k) / (k * k))) * ((l / t) * ((l / (k * k)) + (l * 0.3333333333333333))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 8e-55], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision] + N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 8 \cdot 10^{-55}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \frac{\cos k}{k \cdot k}\right) \cdot \left(\frac{\ell}{t} \cdot \left(\frac{\ell}{k \cdot k} + \ell \cdot 0.3333333333333333\right)\right)\\
\end{array}
\end{array}
if k < 7.99999999999999996e-55Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 7.99999999999999996e-55 < k Initial program 25.3%
associate-*l*25.3%
associate-*l*25.3%
associate-/r*25.2%
associate-/r/25.3%
*-commutative25.3%
times-frac24.2%
+-commutative24.2%
associate--l+31.7%
metadata-eval31.7%
+-rgt-identity31.7%
times-frac31.6%
Simplified31.6%
Taylor expanded in t around 0 68.8%
times-frac65.9%
associate-*r*65.9%
unpow265.9%
unpow265.9%
*-commutative65.9%
times-frac76.1%
Simplified76.1%
Taylor expanded in k around 0 60.6%
unpow260.6%
*-commutative60.6%
Simplified60.6%
Final simplification72.1%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* k t))))
(if (<= k 1.55e-54)
(/ (* 2.0 (pow (/ l k) 2.0)) t_1)
(if (<= k 7.2e+52)
(* (* 2.0 (/ (cos k) (* k k))) (* (/ l t) (/ l (* k k))))
(*
2.0
(* (* (/ l k) (/ l k)) (- (/ 1.0 t_1) (/ 0.16666666666666666 t))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 1.55e-54) {
tmp = (2.0 * pow((l / k), 2.0)) / t_1;
} else if (k <= 7.2e+52) {
tmp = (2.0 * (cos(k) / (k * k))) * ((l / t) * (l / (k * k)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (k * t)
if (k <= 1.55d-54) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / t_1
else if (k <= 7.2d+52) then
tmp = (2.0d0 * (cos(k) / (k * k))) * ((l / t) * (l / (k * k)))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / t_1) - (0.16666666666666666d0 / t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 1.55e-54) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / t_1;
} else if (k <= 7.2e+52) {
tmp = (2.0 * (Math.cos(k) / (k * k))) * ((l / t) * (l / (k * k)));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = k * (k * t) tmp = 0 if k <= 1.55e-54: tmp = (2.0 * math.pow((l / k), 2.0)) / t_1 elif k <= 7.2e+52: tmp = (2.0 * (math.cos(k) / (k * k))) * ((l / t) * (l / (k * k))) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t))) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 1.55e-54) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / t_1); elseif (k <= 7.2e+52) tmp = Float64(Float64(2.0 * Float64(cos(k) / Float64(k * k))) * Float64(Float64(l / t) * Float64(l / Float64(k * k)))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / t_1) - Float64(0.16666666666666666 / t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = k * (k * t); tmp = 0.0; if (k <= 1.55e-54) tmp = (2.0 * ((l / k) ^ 2.0)) / t_1; elseif (k <= 7.2e+52) tmp = (2.0 * (cos(k) / (k * k))) * ((l / t) * (l / (k * k))); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.55e-54], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / t$95$1), $MachinePrecision] - N[(0.16666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 1.55 \cdot 10^{-54}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{t_1}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\left(2 \cdot \frac{\cos k}{k \cdot k}\right) \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t_1} - \frac{0.16666666666666666}{t}\right)\right)\\
\end{array}
\end{array}
if k < 1.55000000000000002e-54Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
associate-*l/87.3%
associate-*l/84.6%
Applied egg-rr84.6%
associate-*r/84.6%
Simplified84.6%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.6%
unpow278.6%
Simplified78.6%
if 1.55000000000000002e-54 < k < 7.2e52Initial program 21.0%
associate-*l*20.9%
associate-*l*20.9%
associate-/r*20.9%
associate-/r/20.9%
*-commutative20.9%
times-frac21.0%
+-commutative21.0%
associate--l+27.7%
metadata-eval27.7%
+-rgt-identity27.7%
times-frac27.6%
Simplified27.6%
Taylor expanded in t around 0 76.5%
times-frac73.3%
associate-*r*73.3%
unpow273.3%
unpow273.3%
*-commutative73.3%
times-frac93.0%
Simplified93.0%
Taylor expanded in k around 0 72.4%
unpow272.4%
Simplified72.4%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac61.4%
unpow261.4%
unpow261.4%
times-frac92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in k around 0 56.2%
unpow256.2%
associate-*r*56.2%
associate-*r/56.2%
metadata-eval56.2%
Simplified56.2%
Final simplification72.4%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))) (t_2 (* k (* k t))))
(if (<= k 2.6e-60)
(* t_1 (/ 2.0 t_2))
(if (<= k 7.2e+52)
(* 2.0 (* (/ l t) (/ l (pow k 4.0))))
(* 2.0 (* t_1 (- (/ 1.0 t_2) (/ 0.16666666666666666 t))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 2.6e-60) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = 2.0 * ((l / t) * (l / pow(k, 4.0)));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) * (l / k)
t_2 = k * (k * t)
if (k <= 2.6d-60) then
tmp = t_1 * (2.0d0 / t_2)
else if (k <= 7.2d+52) then
tmp = 2.0d0 * ((l / t) * (l / (k ** 4.0d0)))
else
tmp = 2.0d0 * (t_1 * ((1.0d0 / t_2) - (0.16666666666666666d0 / t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 2.6e-60) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = 2.0 * ((l / t) * (l / Math.pow(k, 4.0)));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = (l / k) * (l / k) t_2 = k * (k * t) tmp = 0 if k <= 2.6e-60: tmp = t_1 * (2.0 / t_2) elif k <= 7.2e+52: tmp = 2.0 * ((l / t) * (l / math.pow(k, 4.0))) else: tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) t_2 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 2.6e-60) tmp = Float64(t_1 * Float64(2.0 / t_2)); elseif (k <= 7.2e+52) tmp = Float64(2.0 * Float64(Float64(l / t) * Float64(l / (k ^ 4.0)))); else tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(1.0 / t_2) - Float64(0.16666666666666666 / t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); t_2 = k * (k * t); tmp = 0.0; if (k <= 2.6e-60) tmp = t_1 * (2.0 / t_2); elseif (k <= 7.2e+52) tmp = 2.0 * ((l / t) * (l / (k ^ 4.0))); else tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.6e-60], N[(t$95$1 * N[(2.0 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(2.0 * N[(N[(l / t), $MachinePrecision] * N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(N[(1.0 / t$95$2), $MachinePrecision] - N[(0.16666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
t_2 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 2.6 \cdot 10^{-60}:\\
\;\;\;\;t_1 \cdot \frac{2}{t_2}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{t} \cdot \frac{\ell}{{k}^{4}}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{1}{t_2} - \frac{0.16666666666666666}{t}\right)\right)\\
\end{array}
\end{array}
if k < 2.5999999999999998e-60Initial program 34.3%
associate-*l*34.3%
associate-*l*34.3%
associate-/r*34.0%
associate-/r/34.0%
*-commutative34.0%
times-frac34.4%
+-commutative34.4%
associate--l+40.6%
metadata-eval40.6%
+-rgt-identity40.6%
times-frac47.4%
Simplified47.4%
Taylor expanded in t around 0 82.2%
unpow282.2%
associate-*l*87.1%
Simplified87.1%
Taylor expanded in k around 0 67.0%
unpow267.0%
unpow267.0%
times-frac78.3%
Simplified78.3%
if 2.5999999999999998e-60 < k < 7.2e52Initial program 19.9%
associate-*l*19.8%
associate-*l*19.8%
associate-/r*19.8%
associate-/r/19.8%
*-commutative19.8%
times-frac19.9%
+-commutative19.9%
associate--l+26.1%
metadata-eval26.1%
+-rgt-identity26.1%
times-frac26.1%
Simplified26.1%
Taylor expanded in k around 0 55.4%
unpow255.4%
*-commutative55.4%
times-frac73.6%
Simplified73.6%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac61.4%
unpow261.4%
unpow261.4%
times-frac92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in k around 0 56.2%
unpow256.2%
associate-*r*56.2%
associate-*r/56.2%
metadata-eval56.2%
Simplified56.2%
Final simplification72.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))) (t_2 (* k (* k t))))
(if (<= k 2.45e-60)
(* t_1 (/ 2.0 t_2))
(if (<= k 7.2e+52)
(/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))
(* 2.0 (* t_1 (- (/ 1.0 t_2) (/ 0.16666666666666666 t))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 2.45e-60) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = 2.0 / ((t / l) * (pow(k, 4.0) / l));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) * (l / k)
t_2 = k * (k * t)
if (k <= 2.45d-60) then
tmp = t_1 * (2.0d0 / t_2)
else if (k <= 7.2d+52) then
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
else
tmp = 2.0d0 * (t_1 * ((1.0d0 / t_2) - (0.16666666666666666d0 / t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 2.45e-60) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = (l / k) * (l / k) t_2 = k * (k * t) tmp = 0 if k <= 2.45e-60: tmp = t_1 * (2.0 / t_2) elif k <= 7.2e+52: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) else: tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) t_2 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 2.45e-60) tmp = Float64(t_1 * Float64(2.0 / t_2)); elseif (k <= 7.2e+52) tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); else tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(1.0 / t_2) - Float64(0.16666666666666666 / t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); t_2 = k * (k * t); tmp = 0.0; if (k <= 2.45e-60) tmp = t_1 * (2.0 / t_2); elseif (k <= 7.2e+52) tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); else tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.45e-60], N[(t$95$1 * N[(2.0 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(N[(1.0 / t$95$2), $MachinePrecision] - N[(0.16666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
t_2 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 2.45 \cdot 10^{-60}:\\
\;\;\;\;t_1 \cdot \frac{2}{t_2}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{1}{t_2} - \frac{0.16666666666666666}{t}\right)\right)\\
\end{array}
\end{array}
if k < 2.44999999999999994e-60Initial program 34.3%
associate-*l*34.3%
associate-*l*34.3%
associate-/r*34.0%
associate-/r/34.0%
*-commutative34.0%
times-frac34.4%
+-commutative34.4%
associate--l+40.6%
metadata-eval40.6%
+-rgt-identity40.6%
times-frac47.4%
Simplified47.4%
Taylor expanded in t around 0 82.2%
unpow282.2%
associate-*l*87.1%
Simplified87.1%
Taylor expanded in k around 0 67.0%
unpow267.0%
unpow267.0%
times-frac78.3%
Simplified78.3%
if 2.44999999999999994e-60 < k < 7.2e52Initial program 19.9%
Taylor expanded in k around 0 55.4%
*-commutative55.4%
unpow255.4%
times-frac73.8%
Simplified73.8%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac61.4%
unpow261.4%
unpow261.4%
times-frac92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in k around 0 56.2%
unpow256.2%
associate-*r*56.2%
associate-*r/56.2%
metadata-eval56.2%
Simplified56.2%
Final simplification72.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* k (* k t))))
(if (<= k 2.45e-60)
(/ (* 2.0 (pow (/ l k) 2.0)) t_1)
(if (<= k 7.2e+52)
(/ 2.0 (* (/ t l) (/ (pow k 4.0) l)))
(*
2.0
(* (* (/ l k) (/ l k)) (- (/ 1.0 t_1) (/ 0.16666666666666666 t))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 2.45e-60) {
tmp = (2.0 * pow((l / k), 2.0)) / t_1;
} else if (k <= 7.2e+52) {
tmp = 2.0 / ((t / l) * (pow(k, 4.0) / l));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = k * (k * t)
if (k <= 2.45d-60) then
tmp = (2.0d0 * ((l / k) ** 2.0d0)) / t_1
else if (k <= 7.2d+52) then
tmp = 2.0d0 / ((t / l) * ((k ** 4.0d0) / l))
else
tmp = 2.0d0 * (((l / k) * (l / k)) * ((1.0d0 / t_1) - (0.16666666666666666d0 / t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = k * (k * t);
double tmp;
if (k <= 2.45e-60) {
tmp = (2.0 * Math.pow((l / k), 2.0)) / t_1;
} else if (k <= 7.2e+52) {
tmp = 2.0 / ((t / l) * (Math.pow(k, 4.0) / l));
} else {
tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = k * (k * t) tmp = 0 if k <= 2.45e-60: tmp = (2.0 * math.pow((l / k), 2.0)) / t_1 elif k <= 7.2e+52: tmp = 2.0 / ((t / l) * (math.pow(k, 4.0) / l)) else: tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t))) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 2.45e-60) tmp = Float64(Float64(2.0 * (Float64(l / k) ^ 2.0)) / t_1); elseif (k <= 7.2e+52) tmp = Float64(2.0 / Float64(Float64(t / l) * Float64((k ^ 4.0) / l))); else tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(Float64(1.0 / t_1) - Float64(0.16666666666666666 / t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = k * (k * t); tmp = 0.0; if (k <= 2.45e-60) tmp = (2.0 * ((l / k) ^ 2.0)) / t_1; elseif (k <= 7.2e+52) tmp = 2.0 / ((t / l) * ((k ^ 4.0) / l)); else tmp = 2.0 * (((l / k) * (l / k)) * ((1.0 / t_1) - (0.16666666666666666 / t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 2.45e-60], N[(N[(2.0 * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 / t$95$1), $MachinePrecision] - N[(0.16666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 2.45 \cdot 10^{-60}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k}\right)}^{2}}{t_1}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{{k}^{4}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(\frac{1}{t_1} - \frac{0.16666666666666666}{t}\right)\right)\\
\end{array}
\end{array}
if k < 2.44999999999999994e-60Initial program 34.3%
associate-*l*34.3%
associate-*l*34.3%
associate-/r*34.0%
associate-/r/34.0%
*-commutative34.0%
times-frac34.4%
+-commutative34.4%
associate--l+40.6%
metadata-eval40.6%
+-rgt-identity40.6%
times-frac47.4%
Simplified47.4%
Taylor expanded in t around 0 82.2%
unpow282.2%
associate-*l*87.1%
Simplified87.1%
associate-*l/87.2%
associate-*l/84.4%
Applied egg-rr84.4%
associate-*r/84.4%
Simplified84.4%
Taylor expanded in k around 0 67.0%
unpow267.0%
unpow267.0%
times-frac78.4%
unpow278.4%
Simplified78.4%
if 2.44999999999999994e-60 < k < 7.2e52Initial program 19.9%
Taylor expanded in k around 0 55.4%
*-commutative55.4%
unpow255.4%
times-frac73.8%
Simplified73.8%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac61.4%
unpow261.4%
unpow261.4%
times-frac92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in k around 0 56.2%
unpow256.2%
associate-*r*56.2%
associate-*r/56.2%
metadata-eval56.2%
Simplified56.2%
Final simplification72.4%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* (/ l k) (/ l k))) (t_2 (* k (* k t))))
(if (<= k 3.5e-55)
(* t_1 (/ 2.0 t_2))
(if (<= k 7.2e+52)
(* (* (/ l t) (/ l (* k k))) (* 2.0 (/ (/ 1.0 k) k)))
(* 2.0 (* t_1 (- (/ 1.0 t_2) (/ 0.16666666666666666 t))))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 3.5e-55) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) * (l / k)
t_2 = k * (k * t)
if (k <= 3.5d-55) then
tmp = t_1 * (2.0d0 / t_2)
else if (k <= 7.2d+52) then
tmp = ((l / t) * (l / (k * k))) * (2.0d0 * ((1.0d0 / k) / k))
else
tmp = 2.0d0 * (t_1 * ((1.0d0 / t_2) - (0.16666666666666666d0 / t)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = (l / k) * (l / k);
double t_2 = k * (k * t);
double tmp;
if (k <= 3.5e-55) {
tmp = t_1 * (2.0 / t_2);
} else if (k <= 7.2e+52) {
tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k));
} else {
tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t)));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = (l / k) * (l / k) t_2 = k * (k * t) tmp = 0 if k <= 3.5e-55: tmp = t_1 * (2.0 / t_2) elif k <= 7.2e+52: tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k)) else: tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))) return tmp
k = abs(k) function code(t, l, k) t_1 = Float64(Float64(l / k) * Float64(l / k)) t_2 = Float64(k * Float64(k * t)) tmp = 0.0 if (k <= 3.5e-55) tmp = Float64(t_1 * Float64(2.0 / t_2)); elseif (k <= 7.2e+52) tmp = Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(2.0 * Float64(Float64(1.0 / k) / k))); else tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(1.0 / t_2) - Float64(0.16666666666666666 / t)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = (l / k) * (l / k); t_2 = k * (k * t); tmp = 0.0; if (k <= 3.5e-55) tmp = t_1 * (2.0 / t_2); elseif (k <= 7.2e+52) tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k)); else tmp = 2.0 * (t_1 * ((1.0 / t_2) - (0.16666666666666666 / t))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 3.5e-55], N[(t$95$1 * N[(2.0 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[(N[(1.0 / t$95$2), $MachinePrecision] - N[(0.16666666666666666 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{k} \cdot \frac{\ell}{k}\\
t_2 := k \cdot \left(k \cdot t\right)\\
\mathbf{if}\;k \leq 3.5 \cdot 10^{-55}:\\
\;\;\;\;t_1 \cdot \frac{2}{t_2}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \left(2 \cdot \frac{\frac{1}{k}}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(\frac{1}{t_2} - \frac{0.16666666666666666}{t}\right)\right)\\
\end{array}
\end{array}
if k < 3.50000000000000025e-55Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.5%
Simplified78.5%
if 3.50000000000000025e-55 < k < 7.2e52Initial program 21.0%
associate-*l*20.9%
associate-*l*20.9%
associate-/r*20.9%
associate-/r/20.9%
*-commutative20.9%
times-frac21.0%
+-commutative21.0%
associate--l+27.7%
metadata-eval27.7%
+-rgt-identity27.7%
times-frac27.6%
Simplified27.6%
Taylor expanded in t around 0 76.5%
times-frac73.3%
associate-*r*73.3%
unpow273.3%
unpow273.3%
*-commutative73.3%
times-frac93.0%
Simplified93.0%
Taylor expanded in k around 0 72.4%
unpow272.4%
Simplified72.4%
Taylor expanded in k around 0 71.8%
unpow271.8%
associate-/r*71.9%
Simplified71.9%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in t around 0 65.2%
*-commutative65.2%
times-frac61.4%
unpow261.4%
unpow261.4%
times-frac92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in k around 0 56.2%
unpow256.2%
associate-*r*56.2%
associate-*r/56.2%
metadata-eval56.2%
Simplified56.2%
Final simplification72.3%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(if (<= k 2.36e-54)
(* (* (/ l k) (/ l k)) (/ 2.0 (* k (* k t))))
(if (<= k 7.2e+52)
(* (* (/ l t) (/ l (* k k))) (* 2.0 (/ (/ 1.0 k) k)))
(* (* (/ l k) (/ l (* k t))) -0.3333333333333333))))k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 2.36e-54) {
tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t)));
} else if (k <= 7.2e+52) {
tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k));
} else {
tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.36d-54) then
tmp = ((l / k) * (l / k)) * (2.0d0 / (k * (k * t)))
else if (k <= 7.2d+52) then
tmp = ((l / t) * (l / (k * k))) * (2.0d0 * ((1.0d0 / k) / k))
else
tmp = ((l / k) * (l / (k * t))) * (-0.3333333333333333d0)
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.36e-54) {
tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t)));
} else if (k <= 7.2e+52) {
tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k));
} else {
tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 2.36e-54: tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t))) elif k <= 7.2e+52: tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k)) else: tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333 return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 2.36e-54) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 / Float64(k * Float64(k * t)))); elseif (k <= 7.2e+52) tmp = Float64(Float64(Float64(l / t) * Float64(l / Float64(k * k))) * Float64(2.0 * Float64(Float64(1.0 / k) / k))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) * -0.3333333333333333); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.36e-54) tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t))); elseif (k <= 7.2e+52) tmp = ((l / t) * (l / (k * k))) * (2.0 * ((1.0 / k) / k)); else tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 2.36e-54], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+52], N[(N[(N[(l / t), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / k), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.36 \cdot 10^{-54}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{2}{k \cdot \left(k \cdot t\right)}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\left(\frac{\ell}{t} \cdot \frac{\ell}{k \cdot k}\right) \cdot \left(2 \cdot \frac{\frac{1}{k}}{k}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}\right) \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 2.35999999999999992e-54Initial program 33.9%
associate-*l*33.9%
associate-*l*33.9%
associate-/r*33.6%
associate-/r/33.6%
*-commutative33.6%
times-frac34.0%
+-commutative34.0%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
times-frac46.9%
Simplified46.9%
Taylor expanded in t around 0 82.4%
unpow282.4%
associate-*l*87.2%
Simplified87.2%
Taylor expanded in k around 0 67.4%
unpow267.4%
unpow267.4%
times-frac78.5%
Simplified78.5%
if 2.35999999999999992e-54 < k < 7.2e52Initial program 21.0%
associate-*l*20.9%
associate-*l*20.9%
associate-/r*20.9%
associate-/r/20.9%
*-commutative20.9%
times-frac21.0%
+-commutative21.0%
associate--l+27.7%
metadata-eval27.7%
+-rgt-identity27.7%
times-frac27.6%
Simplified27.6%
Taylor expanded in t around 0 76.5%
times-frac73.3%
associate-*r*73.3%
unpow273.3%
unpow273.3%
*-commutative73.3%
times-frac93.0%
Simplified93.0%
Taylor expanded in k around 0 72.4%
unpow272.4%
Simplified72.4%
Taylor expanded in k around 0 71.8%
unpow271.8%
associate-/r*71.9%
Simplified71.9%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in k around 0 38.4%
+-commutative38.4%
fma-def38.4%
unpow238.4%
*-commutative38.4%
times-frac38.2%
times-frac38.2%
unpow238.2%
unpow238.2%
times-frac41.7%
distribute-rgt-out41.7%
metadata-eval41.7%
metadata-eval41.7%
unpow241.7%
times-frac47.7%
metadata-eval47.7%
Simplified47.7%
Taylor expanded in k around inf 50.2%
*-commutative50.2%
unpow250.2%
unpow250.2%
associate-*r*51.9%
Simplified51.9%
times-frac55.5%
Applied egg-rr55.5%
Final simplification72.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= k 7.2e+52) (* (* (/ l k) (/ l k)) (/ 2.0 (* k (* k t)))) (* (* (/ l k) (/ l (* k t))) -0.3333333333333333)))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (k <= 7.2e+52) {
tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t)));
} else {
tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
return tmp;
}
NOTE: k should be positive before calling this function
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 <= 7.2d+52) then
tmp = ((l / k) * (l / k)) * (2.0d0 / (k * (k * t)))
else
tmp = ((l / k) * (l / (k * t))) * (-0.3333333333333333d0)
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (k <= 7.2e+52) {
tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t)));
} else {
tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if k <= 7.2e+52: tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t))) else: tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333 return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (k <= 7.2e+52) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 / Float64(k * Float64(k * t)))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) * -0.3333333333333333); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 7.2e+52) tmp = ((l / k) * (l / k)) * (2.0 / (k * (k * t))); else tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333; end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[k, 7.2e+52], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq 7.2 \cdot 10^{+52}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{2}{k \cdot \left(k \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}\right) \cdot -0.3333333333333333\\
\end{array}
\end{array}
if k < 7.2e52Initial program 32.0%
associate-*l*32.0%
associate-*l*32.0%
associate-/r*31.7%
associate-/r/31.7%
*-commutative31.7%
times-frac32.0%
+-commutative32.0%
associate--l+38.3%
metadata-eval38.3%
+-rgt-identity38.3%
times-frac44.0%
Simplified44.0%
Taylor expanded in t around 0 82.1%
unpow282.1%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in k around 0 66.1%
unpow266.1%
unpow266.1%
times-frac75.6%
Simplified75.6%
if 7.2e52 < k Initial program 27.3%
associate-*l*27.3%
associate-*l*27.3%
associate-/r*27.2%
associate-/r/27.3%
*-commutative27.3%
times-frac25.7%
+-commutative25.7%
associate--l+33.5%
metadata-eval33.5%
+-rgt-identity33.5%
times-frac33.5%
Simplified33.5%
Taylor expanded in k around 0 38.4%
+-commutative38.4%
fma-def38.4%
unpow238.4%
*-commutative38.4%
times-frac38.2%
times-frac38.2%
unpow238.2%
unpow238.2%
times-frac41.7%
distribute-rgt-out41.7%
metadata-eval41.7%
metadata-eval41.7%
unpow241.7%
times-frac47.7%
metadata-eval47.7%
Simplified47.7%
Taylor expanded in k around inf 50.2%
*-commutative50.2%
unpow250.2%
unpow250.2%
associate-*r*51.9%
Simplified51.9%
times-frac55.5%
Applied egg-rr55.5%
Final simplification70.7%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* (* (/ l k) (/ l (* k t))) -0.3333333333333333))
k = abs(k);
double code(double t, double l, double k) {
return ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l / k) * (l / (k * t))) * (-0.3333333333333333d0)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return ((l / k) * (l / (k * t))) * -0.3333333333333333;
}
k = abs(k) def code(t, l, k): return ((l / k) * (l / (k * t))) * -0.3333333333333333
k = abs(k) function code(t, l, k) return Float64(Float64(Float64(l / k) * Float64(l / Float64(k * t))) * -0.3333333333333333) end
k = abs(k) function tmp = code(t, l, k) tmp = ((l / k) * (l / (k * t))) * -0.3333333333333333; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(N[(l / k), $MachinePrecision] * N[(l / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\left(\frac{\ell}{k} \cdot \frac{\ell}{k \cdot t}\right) \cdot -0.3333333333333333
\end{array}
Initial program 30.8%
associate-*l*30.8%
associate-*l*30.8%
associate-/r*30.6%
associate-/r/30.6%
*-commutative30.6%
times-frac30.5%
+-commutative30.5%
associate--l+37.1%
metadata-eval37.1%
+-rgt-identity37.1%
times-frac41.4%
Simplified41.4%
Taylor expanded in k around 0 25.5%
+-commutative25.5%
fma-def25.5%
unpow225.5%
*-commutative25.5%
times-frac25.6%
times-frac27.9%
unpow227.9%
unpow227.9%
times-frac31.4%
distribute-rgt-out31.4%
metadata-eval31.4%
metadata-eval31.4%
unpow231.4%
times-frac39.4%
metadata-eval39.4%
Simplified39.4%
Taylor expanded in k around inf 30.4%
*-commutative30.4%
unpow230.4%
unpow230.4%
associate-*r*31.3%
Simplified31.3%
times-frac32.6%
Applied egg-rr32.6%
Final simplification32.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ (* l l) t) -0.058333333333333334)))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * (((l * l) / t) * -0.058333333333333334);
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * (((l * l) / t) * (-0.058333333333333334d0))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * (((l * l) / t) * -0.058333333333333334);
}
k = abs(k) def code(t, l, k): return 2.0 * (((l * l) / t) * -0.058333333333333334)
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l * l) / t) * -0.058333333333333334)) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * (((l * l) / t) * -0.058333333333333334); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * -0.058333333333333334), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left(\frac{\ell \cdot \ell}{t} \cdot -0.058333333333333334\right)
\end{array}
Initial program 30.8%
associate-*l*30.8%
associate-*l*30.8%
associate-/r*30.6%
associate-/r/30.6%
*-commutative30.6%
times-frac30.5%
+-commutative30.5%
associate--l+37.1%
metadata-eval37.1%
+-rgt-identity37.1%
times-frac41.4%
Simplified41.4%
Taylor expanded in t around 0 70.4%
*-commutative70.4%
times-frac70.7%
unpow270.7%
unpow270.7%
times-frac89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in k around 0 49.4%
fma-def49.4%
unpow249.4%
unpow249.4%
associate-*r*50.9%
associate-*r/50.9%
metadata-eval50.9%
Simplified50.9%
Taylor expanded in k around inf 23.8%
*-commutative23.8%
unpow223.8%
associate-*r/20.6%
Simplified20.6%
associate-*r/23.8%
Applied egg-rr23.8%
Final simplification23.8%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* l (* (/ l t) -0.11666666666666667)))
k = abs(k);
double code(double t, double l, double k) {
return l * ((l / t) * -0.11666666666666667);
}
NOTE: k should be positive before calling this function
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 / t) * (-0.11666666666666667d0))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return l * ((l / t) * -0.11666666666666667);
}
k = abs(k) def code(t, l, k): return l * ((l / t) * -0.11666666666666667)
k = abs(k) function code(t, l, k) return Float64(l * Float64(Float64(l / t) * -0.11666666666666667)) end
k = abs(k) function tmp = code(t, l, k) tmp = l * ((l / t) * -0.11666666666666667); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(l * N[(N[(l / t), $MachinePrecision] * -0.11666666666666667), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\ell \cdot \left(\frac{\ell}{t} \cdot -0.11666666666666667\right)
\end{array}
Initial program 30.8%
associate-*l*30.8%
associate-*l*30.8%
associate-/r*30.6%
associate-/r/30.6%
*-commutative30.6%
times-frac30.5%
+-commutative30.5%
associate--l+37.1%
metadata-eval37.1%
+-rgt-identity37.1%
times-frac41.4%
Simplified41.4%
Taylor expanded in t around 0 70.4%
*-commutative70.4%
times-frac70.7%
unpow270.7%
unpow270.7%
times-frac89.9%
*-commutative89.9%
Simplified89.9%
Taylor expanded in k around 0 49.4%
fma-def49.4%
unpow249.4%
unpow249.4%
associate-*r*50.9%
associate-*r/50.9%
metadata-eval50.9%
Simplified50.9%
Taylor expanded in k around inf 23.8%
*-commutative23.8%
unpow223.8%
associate-*r/20.6%
Simplified20.6%
Taylor expanded in l around 0 23.8%
*-commutative23.8%
unpow223.8%
associate-*r/20.6%
associate-*l*20.6%
Simplified20.6%
Final simplification20.6%
herbie shell --seed 2023200
(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))))