
(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 12 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 (* 2.0 (/ (* l (/ (cos k) k)) (* (* (/ k l) t) (pow (sin k) 2.0)))))
double code(double t, double l, double k) {
return 2.0 * ((l * (cos(k) / k)) / (((k / l) * t) * pow(sin(k), 2.0)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * ((l * (cos(k) / k)) / (((k / l) * t) * (sin(k) ** 2.0d0)))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((l * (Math.cos(k) / k)) / (((k / l) * t) * Math.pow(Math.sin(k), 2.0)));
}
def code(t, l, k): return 2.0 * ((l * (math.cos(k) / k)) / (((k / l) * t) * math.pow(math.sin(k), 2.0)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(l * Float64(cos(k) / k)) / Float64(Float64(Float64(k / l) * t) * (sin(k) ^ 2.0)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l * (cos(k) / k)) / (((k / l) * t) * (sin(k) ^ 2.0))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(l * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(k / l), $MachinePrecision] * t), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \frac{\ell \cdot \frac{\cos k}{k}}{\left(\frac{k}{\ell} \cdot t\right) \cdot {\sin k}^{2}}
\end{array}
Initial program 37.3%
associate-/r*37.3%
*-commutative37.3%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+50.1%
metadata-eval50.1%
+-rgt-identity50.1%
unpow250.1%
distribute-frac-neg50.1%
Simplified50.1%
Taylor expanded in k around inf 72.7%
associate-*r/72.7%
unpow272.7%
associate-*r*72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
*-commutative72.7%
associate-*r*72.6%
unpow272.6%
times-frac71.0%
unpow271.0%
associate-*r/76.5%
associate-*l*76.5%
Simplified76.5%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
times-frac73.1%
*-commutative73.1%
associate-/r*71.9%
times-frac71.4%
unpow271.4%
associate-*r*71.4%
unpow271.4%
associate-*r/76.9%
times-frac82.4%
associate-/l*89.3%
associate-/r*89.4%
Simplified89.4%
frac-times90.4%
associate-/r/96.5%
Applied egg-rr96.5%
Final simplification96.5%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (or (<= k 2.15e-61) (not (<= k 6.5e+130)))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t t_1))))
(* 2.0 (* (/ (/ (cos k) k) t_1) (* (/ l k) (/ l t)))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if ((k <= 2.15e-61) || !(k <= 6.5e+130)) {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)));
} else {
tmp = 2.0 * (((cos(k) / k) / t_1) * ((l / k) * (l / t)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if ((k <= 2.15d-61) .or. (.not. (k <= 6.5d+130))) then
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)))
else
tmp = 2.0d0 * (((cos(k) / k) / t_1) * ((l / k) * (l / t)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if ((k <= 2.15e-61) || !(k <= 6.5e+130)) {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * t_1)));
} else {
tmp = 2.0 * (((Math.cos(k) / k) / t_1) * ((l / k) * (l / t)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if (k <= 2.15e-61) or not (k <= 6.5e+130): tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * t_1))) else: tmp = 2.0 * (((math.cos(k) / k) / t_1) * ((l / k) * (l / t))) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if ((k <= 2.15e-61) || !(k <= 6.5e+130)) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * t_1)))); else tmp = Float64(2.0 * Float64(Float64(Float64(cos(k) / k) / t_1) * Float64(Float64(l / k) * Float64(l / t)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if ((k <= 2.15e-61) || ~((k <= 6.5e+130))) tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1))); else tmp = 2.0 * (((cos(k) / k) / t_1) * ((l / k) * (l / t))); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[Or[LessEqual[k, 2.15e-61], N[Not[LessEqual[k, 6.5e+130]], $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], N[(2.0 * N[(N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 2.15 \cdot 10^{-61} \lor \neg \left(k \leq 6.5 \cdot 10^{+130}\right):\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\frac{\cos k}{k}}{t_1} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{t}\right)\right)\\
\end{array}
\end{array}
if k < 2.1500000000000002e-61 or 6.5e130 < k Initial program 38.2%
associate-/r*38.2%
*-commutative38.2%
associate-/r*42.9%
associate-*r/42.9%
associate-/l*42.9%
+-commutative42.9%
unpow242.9%
sqr-neg42.9%
distribute-frac-neg42.9%
distribute-frac-neg42.9%
unpow242.9%
associate--l+50.4%
metadata-eval50.4%
+-rgt-identity50.4%
unpow250.4%
distribute-frac-neg50.4%
Simplified50.4%
Taylor expanded in k around inf 70.3%
associate-*r/70.3%
unpow270.3%
associate-*r*70.3%
*-commutative70.3%
unpow270.3%
Simplified70.3%
Taylor expanded in l around 0 70.3%
associate-*r*70.3%
*-commutative70.3%
associate-*r*70.2%
unpow270.2%
times-frac67.9%
unpow267.9%
associate-*r/73.6%
associate-*l*73.6%
Simplified73.6%
Taylor expanded in l around 0 70.3%
associate-*r*70.3%
times-frac70.8%
*-commutative70.8%
associate-/r*68.9%
times-frac68.4%
unpow268.4%
associate-*r*68.4%
unpow268.4%
associate-*r/74.0%
times-frac80.6%
associate-/l*87.9%
associate-/r*87.9%
Simplified87.9%
Taylor expanded in l around 0 70.3%
times-frac70.8%
unpow270.8%
unpow270.8%
times-frac92.4%
Simplified92.4%
if 2.1500000000000002e-61 < k < 6.5e130Initial program 32.8%
associate-/r*32.8%
*-commutative32.8%
associate-/r*35.1%
associate-*r/35.1%
associate-/l*35.1%
+-commutative35.1%
unpow235.1%
sqr-neg35.1%
distribute-frac-neg35.1%
distribute-frac-neg35.1%
unpow235.1%
associate--l+48.0%
metadata-eval48.0%
+-rgt-identity48.0%
unpow248.0%
distribute-frac-neg48.0%
Simplified48.0%
Taylor expanded in k around inf 85.5%
associate-*r/85.5%
unpow285.5%
associate-*r*85.5%
*-commutative85.5%
unpow285.5%
Simplified85.5%
Taylor expanded in l around 0 85.5%
associate-*r*85.5%
*-commutative85.5%
associate-*r*85.5%
unpow285.5%
times-frac87.9%
unpow287.9%
associate-*r/92.6%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in l around 0 85.5%
associate-*r*85.5%
times-frac85.5%
*-commutative85.5%
associate-/r*88.0%
times-frac87.9%
unpow287.9%
associate-*r*87.9%
unpow287.9%
associate-*r/92.4%
times-frac92.5%
associate-/l*97.3%
associate-/r*97.4%
Simplified97.4%
associate-/r/97.4%
Applied egg-rr97.4%
Final simplification93.1%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (or (<= k 2.3e-61) (not (<= k 3.7e+142)))
(* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t t_1))))
(* 2.0 (* (/ l (/ k (/ l t))) (/ (/ (cos k) k) t_1))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if ((k <= 2.3e-61) || !(k <= 3.7e+142)) {
tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)));
} else {
tmp = 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / t_1));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if ((k <= 2.3d-61) .or. (.not. (k <= 3.7d+142))) then
tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1)))
else
tmp = 2.0d0 * ((l / (k / (l / t))) * ((cos(k) / k) / t_1))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if ((k <= 2.3e-61) || !(k <= 3.7e+142)) {
tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * t_1)));
} else {
tmp = 2.0 * ((l / (k / (l / t))) * ((Math.cos(k) / k) / t_1));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if (k <= 2.3e-61) or not (k <= 3.7e+142): tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * t_1))) else: tmp = 2.0 * ((l / (k / (l / t))) * ((math.cos(k) / k) / t_1)) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if ((k <= 2.3e-61) || !(k <= 3.7e+142)) tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * t_1)))); else tmp = Float64(2.0 * Float64(Float64(l / Float64(k / Float64(l / t))) * Float64(Float64(cos(k) / k) / t_1))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if ((k <= 2.3e-61) || ~((k <= 3.7e+142))) tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * t_1))); else tmp = 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / t_1)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[Or[LessEqual[k, 2.3e-61], N[Not[LessEqual[k, 3.7e+142]], $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], N[(2.0 * N[(N[(l / N[(k / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 2.3 \cdot 10^{-61} \lor \neg \left(k \leq 3.7 \cdot 10^{+142}\right):\\
\;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{\frac{k}{\frac{\ell}{t}}} \cdot \frac{\frac{\cos k}{k}}{t_1}\right)\\
\end{array}
\end{array}
if k < 2.29999999999999992e-61 or 3.6999999999999997e142 < k Initial program 38.0%
associate-/r*38.1%
*-commutative38.1%
associate-/r*42.8%
associate-*r/42.8%
associate-/l*42.8%
+-commutative42.8%
unpow242.8%
sqr-neg42.8%
distribute-frac-neg42.8%
distribute-frac-neg42.8%
unpow242.8%
associate--l+50.4%
metadata-eval50.4%
+-rgt-identity50.4%
unpow250.4%
distribute-frac-neg50.4%
Simplified50.4%
Taylor expanded in k around inf 70.5%
associate-*r/70.5%
unpow270.5%
associate-*r*70.5%
*-commutative70.5%
unpow270.5%
Simplified70.5%
Taylor expanded in l around 0 70.5%
associate-*r*70.5%
*-commutative70.5%
associate-*r*70.4%
unpow270.4%
times-frac68.0%
unpow268.0%
associate-*r/73.3%
associate-*l*73.3%
Simplified73.3%
Taylor expanded in l around 0 70.5%
associate-*r*70.5%
times-frac71.0%
*-commutative71.0%
associate-/r*69.1%
times-frac68.5%
unpow268.5%
associate-*r*68.5%
unpow268.5%
associate-*r/73.8%
times-frac80.4%
associate-/l*87.8%
associate-/r*87.8%
Simplified87.8%
Taylor expanded in l around 0 70.5%
times-frac71.0%
unpow271.0%
unpow271.0%
times-frac92.3%
Simplified92.3%
if 2.29999999999999992e-61 < k < 3.6999999999999997e142Initial program 33.6%
associate-/r*33.6%
*-commutative33.6%
associate-/r*35.9%
associate-*r/35.8%
associate-/l*35.9%
+-commutative35.9%
unpow235.9%
sqr-neg35.9%
distribute-frac-neg35.9%
distribute-frac-neg35.9%
unpow235.9%
associate--l+48.2%
metadata-eval48.2%
+-rgt-identity48.2%
unpow248.2%
distribute-frac-neg48.2%
Simplified48.2%
Taylor expanded in k around inf 83.8%
associate-*r/83.8%
unpow283.8%
associate-*r*83.8%
*-commutative83.8%
unpow283.8%
Simplified83.8%
Taylor expanded in l around 0 83.8%
associate-*r*83.8%
*-commutative83.8%
associate-*r*83.8%
unpow283.8%
times-frac86.2%
unpow286.2%
associate-*r/92.9%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in l around 0 83.8%
associate-*r*83.8%
times-frac83.8%
*-commutative83.8%
associate-/r*86.2%
times-frac86.2%
unpow286.2%
associate-*r*86.2%
unpow286.2%
associate-*r/92.8%
times-frac92.8%
associate-/l*97.4%
associate-/r*97.5%
Simplified97.5%
Final simplification93.1%
(FPCore (t l k) :precision binary64 (if (<= k 2e-38) (* 2.0 (* (/ l (/ k (/ l t))) (/ (/ (cos k) k) (* k k)))) (* 2.0 (* (* l (/ l t)) (/ (cos k) (* k (* k (pow (sin k) 2.0))))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2e-38) {
tmp = 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k)));
} else {
tmp = 2.0 * ((l * (l / t)) * (cos(k) / (k * (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 <= 2d-38) then
tmp = 2.0d0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k)))
else
tmp = 2.0d0 * ((l * (l / t)) * (cos(k) / (k * (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 <= 2e-38) {
tmp = 2.0 * ((l / (k / (l / t))) * ((Math.cos(k) / k) / (k * k)));
} else {
tmp = 2.0 * ((l * (l / t)) * (Math.cos(k) / (k * (k * Math.pow(Math.sin(k), 2.0)))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2e-38: tmp = 2.0 * ((l / (k / (l / t))) * ((math.cos(k) / k) / (k * k))) else: tmp = 2.0 * ((l * (l / t)) * (math.cos(k) / (k * (k * math.pow(math.sin(k), 2.0))))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2e-38) tmp = Float64(2.0 * Float64(Float64(l / Float64(k / Float64(l / t))) * Float64(Float64(cos(k) / k) / Float64(k * k)))); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) * Float64(cos(k) / Float64(k * Float64(k * (sin(k) ^ 2.0)))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2e-38) tmp = 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k))); else tmp = 2.0 * ((l * (l / t)) * (cos(k) / (k * (k * (sin(k) ^ 2.0))))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2e-38], N[(2.0 * N[(N[(l / N[(k / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * N[(k * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{-38}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{\frac{k}{\frac{\ell}{t}}} \cdot \frac{\frac{\cos k}{k}}{k \cdot k}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\ell \cdot \frac{\ell}{t}\right) \cdot \frac{\cos k}{k \cdot \left(k \cdot {\sin k}^{2}\right)}\right)\\
\end{array}
\end{array}
if k < 1.9999999999999999e-38Initial program 36.5%
associate-/r*36.5%
*-commutative36.5%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+48.1%
metadata-eval48.1%
+-rgt-identity48.1%
unpow248.1%
distribute-frac-neg48.1%
Simplified48.1%
Taylor expanded in k around inf 69.4%
associate-*r/69.4%
unpow269.4%
associate-*r*69.5%
*-commutative69.5%
unpow269.5%
Simplified69.5%
Taylor expanded in l around 0 69.4%
associate-*r*69.5%
*-commutative69.5%
associate-*r*69.3%
unpow269.3%
times-frac66.5%
unpow266.5%
associate-*r/72.8%
associate-*l*72.8%
Simplified72.8%
Taylor expanded in l around 0 69.4%
associate-*r*69.5%
times-frac70.0%
*-commutative70.0%
associate-/r*67.8%
times-frac67.1%
unpow267.1%
associate-*r*67.1%
unpow267.1%
associate-*r/73.4%
times-frac78.0%
associate-/l*87.7%
associate-/r*87.7%
Simplified87.7%
Taylor expanded in k around 0 72.9%
unpow266.2%
Simplified72.9%
if 1.9999999999999999e-38 < k Initial program 39.2%
associate-/r*39.2%
*-commutative39.2%
associate-/r*41.6%
associate-*r/41.6%
associate-/l*41.6%
+-commutative41.6%
unpow241.6%
sqr-neg41.6%
distribute-frac-neg41.6%
distribute-frac-neg41.6%
unpow241.6%
associate--l+54.1%
metadata-eval54.1%
+-rgt-identity54.1%
unpow254.1%
distribute-frac-neg54.1%
Simplified54.1%
Taylor expanded in k around inf 79.5%
associate-*r/79.5%
unpow279.5%
associate-*r*79.5%
*-commutative79.5%
unpow279.5%
Simplified79.5%
Taylor expanded in l around 0 79.5%
associate-*r*79.5%
*-commutative79.5%
associate-*r*79.5%
unpow279.5%
times-frac80.6%
unpow280.6%
associate-*r/84.4%
associate-*l*84.3%
Simplified84.3%
Final simplification76.6%
(FPCore (t l k) :precision binary64 (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t (pow (sin k) 2.0))))))
double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * pow(sin(k), 2.0))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ** 2.0d0))))
end function
public static double code(double t, double l, double k) {
return 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))));
}
def code(t, l, k): return 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t * math.pow(math.sin(k), 2.0))))
function code(t, l, k) return Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))))) end
function tmp = code(t, l, k) tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t * (sin(k) ^ 2.0)))); end
code[t_, l_, k_] := 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}
\\
2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)
\end{array}
Initial program 37.3%
associate-/r*37.3%
*-commutative37.3%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+50.1%
metadata-eval50.1%
+-rgt-identity50.1%
unpow250.1%
distribute-frac-neg50.1%
Simplified50.1%
Taylor expanded in k around inf 72.7%
associate-*r/72.7%
unpow272.7%
associate-*r*72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
*-commutative72.7%
associate-*r*72.6%
unpow272.6%
times-frac71.0%
unpow271.0%
associate-*r/76.5%
associate-*l*76.5%
Simplified76.5%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
times-frac73.1%
*-commutative73.1%
associate-/r*71.9%
times-frac71.4%
unpow271.4%
associate-*r*71.4%
unpow271.4%
associate-*r/76.9%
times-frac82.4%
associate-/l*89.3%
associate-/r*89.4%
Simplified89.4%
Taylor expanded in l around 0 72.7%
times-frac72.8%
unpow272.8%
unpow272.8%
times-frac91.3%
Simplified91.3%
Final simplification91.3%
(FPCore (t l k) :precision binary64 (* 2.0 (* (/ l (/ k (/ l t))) (/ (/ (cos k) k) (* k k)))))
double code(double t, double l, double k) {
return 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k)))
end function
public static double code(double t, double l, double k) {
return 2.0 * ((l / (k / (l / t))) * ((Math.cos(k) / k) / (k * k)));
}
def code(t, l, k): return 2.0 * ((l / (k / (l / t))) * ((math.cos(k) / k) / (k * k)))
function code(t, l, k) return Float64(2.0 * Float64(Float64(l / Float64(k / Float64(l / t))) * Float64(Float64(cos(k) / k) / Float64(k * k)))) end
function tmp = code(t, l, k) tmp = 2.0 * ((l / (k / (l / t))) * ((cos(k) / k) / (k * k))); end
code[t_, l_, k_] := N[(2.0 * N[(N[(l / N[(k / N[(l / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\frac{\ell}{\frac{k}{\frac{\ell}{t}}} \cdot \frac{\frac{\cos k}{k}}{k \cdot k}\right)
\end{array}
Initial program 37.3%
associate-/r*37.3%
*-commutative37.3%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+50.1%
metadata-eval50.1%
+-rgt-identity50.1%
unpow250.1%
distribute-frac-neg50.1%
Simplified50.1%
Taylor expanded in k around inf 72.7%
associate-*r/72.7%
unpow272.7%
associate-*r*72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
*-commutative72.7%
associate-*r*72.6%
unpow272.6%
times-frac71.0%
unpow271.0%
associate-*r/76.5%
associate-*l*76.5%
Simplified76.5%
Taylor expanded in l around 0 72.7%
associate-*r*72.7%
times-frac73.1%
*-commutative73.1%
associate-/r*71.9%
times-frac71.4%
unpow271.4%
associate-*r*71.4%
unpow271.4%
associate-*r/76.9%
times-frac82.4%
associate-/l*89.3%
associate-/r*89.4%
Simplified89.4%
Taylor expanded in k around 0 72.3%
unpow267.7%
Simplified72.3%
Final simplification72.3%
(FPCore (t l k) :precision binary64 (if (<= k 11600.0) (/ 2.0 (* (/ (pow k 4.0) l) (/ t l))) (* 2.0 (* (/ l (/ t (/ l (* k k)))) -0.16666666666666666))))
double code(double t, double l, double k) {
double tmp;
if (k <= 11600.0) {
tmp = 2.0 / ((pow(k, 4.0) / l) * (t / l));
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
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 <= 11600.0d0) then
tmp = 2.0d0 / (((k ** 4.0d0) / l) * (t / l))
else
tmp = 2.0d0 * ((l / (t / (l / (k * k)))) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 11600.0) {
tmp = 2.0 / ((Math.pow(k, 4.0) / l) * (t / l));
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 11600.0: tmp = 2.0 / ((math.pow(k, 4.0) / l) * (t / l)) else: tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 11600.0) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / l) * Float64(t / l))); else tmp = Float64(2.0 * Float64(Float64(l / Float64(t / Float64(l / Float64(k * k)))) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 11600.0) tmp = 2.0 / (((k ^ 4.0) / l) * (t / l)); else tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 11600.0], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / N[(t / N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 11600:\\
\;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{\frac{t}{\frac{\ell}{k \cdot k}}} \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if k < 11600Initial program 36.2%
associate-/r*36.2%
*-commutative36.2%
associate-/r*41.2%
associate-*r/41.2%
associate-/l*41.2%
+-commutative41.2%
unpow241.2%
sqr-neg41.2%
distribute-frac-neg41.2%
distribute-frac-neg41.2%
unpow241.2%
associate--l+49.0%
metadata-eval49.0%
+-rgt-identity49.0%
unpow249.0%
distribute-frac-neg49.0%
Simplified49.0%
Taylor expanded in k around 0 65.4%
associate-*r/65.4%
associate-/l*65.4%
unpow265.4%
Simplified65.4%
times-frac71.5%
Applied egg-rr71.5%
if 11600 < k Initial program 40.1%
associate-/r*40.1%
*-commutative40.1%
associate-/r*42.8%
associate-*r/42.8%
associate-/l*42.8%
+-commutative42.8%
unpow242.8%
sqr-neg42.8%
distribute-frac-neg42.8%
distribute-frac-neg42.8%
unpow242.8%
associate--l+52.6%
metadata-eval52.6%
+-rgt-identity52.6%
unpow252.6%
distribute-frac-neg52.6%
Simplified52.6%
Taylor expanded in k around inf 77.6%
associate-*r/77.6%
unpow277.6%
associate-*r*77.6%
*-commutative77.6%
unpow277.6%
Simplified77.6%
Taylor expanded in l around 0 77.6%
associate-*r*77.6%
*-commutative77.6%
associate-*r*77.6%
unpow277.6%
times-frac78.9%
unpow278.9%
associate-*r/82.9%
associate-*l*82.9%
Simplified82.9%
Taylor expanded in k around 0 70.6%
associate-*r/70.6%
metadata-eval70.6%
unpow270.6%
Simplified70.6%
Taylor expanded in k around inf 69.7%
*-commutative69.7%
unpow269.7%
associate-/l*70.6%
*-commutative70.6%
associate-/l*70.6%
unpow270.6%
Simplified70.6%
Final simplification71.2%
(FPCore (t l k) :precision binary64 (if (<= k 2.15e+54) (* (/ 2.0 (* t (* k k))) (/ (* l l) (* k k))) (* 2.0 (* (/ l (/ t (/ l (* k k)))) -0.16666666666666666))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.15e+54) {
tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k));
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.15d+54) then
tmp = (2.0d0 / (t * (k * k))) * ((l * l) / (k * k))
else
tmp = 2.0d0 * ((l / (t / (l / (k * k)))) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.15e+54) {
tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k));
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.15e+54: tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k)) else: tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.15e+54) tmp = Float64(Float64(2.0 / Float64(t * Float64(k * k))) * Float64(Float64(l * l) / Float64(k * k))); else tmp = Float64(2.0 * Float64(Float64(l / Float64(t / Float64(l / Float64(k * k)))) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.15e+54) tmp = (2.0 / (t * (k * k))) * ((l * l) / (k * k)); else tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.15e+54], N[(N[(2.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / N[(t / N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.15 \cdot 10^{+54}:\\
\;\;\;\;\frac{2}{t \cdot \left(k \cdot k\right)} \cdot \frac{\ell \cdot \ell}{k \cdot k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{\frac{t}{\frac{\ell}{k \cdot k}}} \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if k < 2.14999999999999988e54Initial program 35.8%
associate-/r*35.8%
*-commutative35.8%
associate-/r*40.6%
associate-*r/40.7%
associate-/l*40.6%
+-commutative40.6%
unpow240.6%
sqr-neg40.6%
distribute-frac-neg40.6%
distribute-frac-neg40.6%
unpow240.6%
associate--l+48.1%
metadata-eval48.1%
+-rgt-identity48.1%
unpow248.1%
distribute-frac-neg48.1%
Simplified48.1%
Taylor expanded in k around inf 71.2%
associate-*r/71.2%
unpow271.2%
associate-*r*71.2%
*-commutative71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in k around 0 66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in k around 0 64.7%
unpow264.7%
Simplified64.7%
times-frac65.2%
Applied egg-rr65.2%
if 2.14999999999999988e54 < k Initial program 41.7%
associate-/r*41.7%
*-commutative41.7%
associate-/r*44.7%
associate-*r/44.7%
associate-/l*44.7%
+-commutative44.7%
unpow244.7%
sqr-neg44.7%
distribute-frac-neg44.7%
distribute-frac-neg44.7%
unpow244.7%
associate--l+56.0%
metadata-eval56.0%
+-rgt-identity56.0%
unpow256.0%
distribute-frac-neg56.0%
Simplified56.0%
Taylor expanded in k around inf 77.1%
associate-*r/77.1%
unpow277.1%
associate-*r*77.1%
*-commutative77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in l around 0 77.1%
associate-*r*77.1%
*-commutative77.1%
associate-*r*77.1%
unpow277.1%
times-frac78.5%
unpow278.5%
associate-*r/80.4%
associate-*l*80.3%
Simplified80.3%
Taylor expanded in k around 0 71.0%
associate-*r/71.0%
metadata-eval71.0%
unpow271.0%
Simplified71.0%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
unpow270.4%
associate-/l*71.0%
*-commutative71.0%
associate-/l*71.0%
unpow271.0%
Simplified71.0%
Final simplification66.7%
(FPCore (t l k) :precision binary64 (if (<= k 2.15e+54) (* (/ (* l l) t) 0.08333333333333333) (* 2.0 (* (* l (/ l t)) (/ -0.16666666666666666 (* k k))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2.15e+54) {
tmp = ((l * l) / t) * 0.08333333333333333;
} else {
tmp = 2.0 * ((l * (l / t)) * (-0.16666666666666666 / (k * k)));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.15d+54) then
tmp = ((l * l) / t) * 0.08333333333333333d0
else
tmp = 2.0d0 * ((l * (l / t)) * ((-0.16666666666666666d0) / (k * k)))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2.15e+54) {
tmp = ((l * l) / t) * 0.08333333333333333;
} else {
tmp = 2.0 * ((l * (l / t)) * (-0.16666666666666666 / (k * k)));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2.15e+54: tmp = ((l * l) / t) * 0.08333333333333333 else: tmp = 2.0 * ((l * (l / t)) * (-0.16666666666666666 / (k * k))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2.15e+54) tmp = Float64(Float64(Float64(l * l) / t) * 0.08333333333333333); else tmp = Float64(2.0 * Float64(Float64(l * Float64(l / t)) * Float64(-0.16666666666666666 / Float64(k * k)))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2.15e+54) tmp = ((l * l) / t) * 0.08333333333333333; else tmp = 2.0 * ((l * (l / t)) * (-0.16666666666666666 / (k * k))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2.15e+54], N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * 0.08333333333333333), $MachinePrecision], N[(2.0 * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(-0.16666666666666666 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.15 \cdot 10^{+54}:\\
\;\;\;\;\frac{\ell \cdot \ell}{t} \cdot 0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(\ell \cdot \frac{\ell}{t}\right) \cdot \frac{-0.16666666666666666}{k \cdot k}\right)\\
\end{array}
\end{array}
if k < 2.14999999999999988e54Initial program 35.8%
associate-/r*35.8%
*-commutative35.8%
associate-/r*40.6%
associate-*r/40.7%
associate-/l*40.6%
+-commutative40.6%
unpow240.6%
sqr-neg40.6%
distribute-frac-neg40.6%
distribute-frac-neg40.6%
unpow240.6%
associate--l+48.1%
metadata-eval48.1%
+-rgt-identity48.1%
unpow248.1%
distribute-frac-neg48.1%
Simplified48.1%
Taylor expanded in k around inf 71.2%
associate-*r/71.2%
unpow271.2%
associate-*r*71.2%
*-commutative71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in k around 0 66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in k around 0 38.6%
associate-+r+38.6%
+-commutative38.6%
unpow238.6%
associate-*r*38.6%
associate-*r*38.6%
distribute-rgt-out40.2%
unpow240.2%
*-commutative40.2%
unpow240.2%
Simplified40.2%
Taylor expanded in k around inf 34.9%
*-commutative34.9%
unpow234.9%
Simplified34.9%
if 2.14999999999999988e54 < k Initial program 41.7%
associate-/r*41.7%
*-commutative41.7%
associate-/r*44.7%
associate-*r/44.7%
associate-/l*44.7%
+-commutative44.7%
unpow244.7%
sqr-neg44.7%
distribute-frac-neg44.7%
distribute-frac-neg44.7%
unpow244.7%
associate--l+56.0%
metadata-eval56.0%
+-rgt-identity56.0%
unpow256.0%
distribute-frac-neg56.0%
Simplified56.0%
Taylor expanded in k around inf 77.1%
associate-*r/77.1%
unpow277.1%
associate-*r*77.1%
*-commutative77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in l around 0 77.1%
associate-*r*77.1%
*-commutative77.1%
associate-*r*77.1%
unpow277.1%
times-frac78.5%
unpow278.5%
associate-*r/80.4%
associate-*l*80.3%
Simplified80.3%
Taylor expanded in k around 0 71.0%
associate-*r/71.0%
metadata-eval71.0%
unpow271.0%
Simplified71.0%
Taylor expanded in k around inf 71.0%
unpow271.0%
Simplified71.0%
Final simplification44.1%
(FPCore (t l k) :precision binary64 (if (<= k 2e+54) (* (/ (* l l) t) 0.08333333333333333) (* 2.0 (* (/ l (/ t (/ l (* k k)))) -0.16666666666666666))))
double code(double t, double l, double k) {
double tmp;
if (k <= 2e+54) {
tmp = ((l * l) / t) * 0.08333333333333333;
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
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+54) then
tmp = ((l * l) / t) * 0.08333333333333333d0
else
tmp = 2.0d0 * ((l / (t / (l / (k * k)))) * (-0.16666666666666666d0))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 2e+54) {
tmp = ((l * l) / t) * 0.08333333333333333;
} else {
tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666);
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 2e+54: tmp = ((l * l) / t) * 0.08333333333333333 else: tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 2e+54) tmp = Float64(Float64(Float64(l * l) / t) * 0.08333333333333333); else tmp = Float64(2.0 * Float64(Float64(l / Float64(t / Float64(l / Float64(k * k)))) * -0.16666666666666666)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 2e+54) tmp = ((l * l) / t) * 0.08333333333333333; else tmp = 2.0 * ((l / (t / (l / (k * k)))) * -0.16666666666666666); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 2e+54], N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * 0.08333333333333333), $MachinePrecision], N[(2.0 * N[(N[(l / N[(t / N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 2 \cdot 10^{+54}:\\
\;\;\;\;\frac{\ell \cdot \ell}{t} \cdot 0.08333333333333333\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\ell}{\frac{t}{\frac{\ell}{k \cdot k}}} \cdot -0.16666666666666666\right)\\
\end{array}
\end{array}
if k < 2.0000000000000002e54Initial program 35.8%
associate-/r*35.8%
*-commutative35.8%
associate-/r*40.6%
associate-*r/40.7%
associate-/l*40.6%
+-commutative40.6%
unpow240.6%
sqr-neg40.6%
distribute-frac-neg40.6%
distribute-frac-neg40.6%
unpow240.6%
associate--l+48.1%
metadata-eval48.1%
+-rgt-identity48.1%
unpow248.1%
distribute-frac-neg48.1%
Simplified48.1%
Taylor expanded in k around inf 71.2%
associate-*r/71.2%
unpow271.2%
associate-*r*71.2%
*-commutative71.2%
unpow271.2%
Simplified71.2%
Taylor expanded in k around 0 66.9%
unpow266.9%
Simplified66.9%
Taylor expanded in k around 0 38.6%
associate-+r+38.6%
+-commutative38.6%
unpow238.6%
associate-*r*38.6%
associate-*r*38.6%
distribute-rgt-out40.2%
unpow240.2%
*-commutative40.2%
unpow240.2%
Simplified40.2%
Taylor expanded in k around inf 34.9%
*-commutative34.9%
unpow234.9%
Simplified34.9%
if 2.0000000000000002e54 < k Initial program 41.7%
associate-/r*41.7%
*-commutative41.7%
associate-/r*44.7%
associate-*r/44.7%
associate-/l*44.7%
+-commutative44.7%
unpow244.7%
sqr-neg44.7%
distribute-frac-neg44.7%
distribute-frac-neg44.7%
unpow244.7%
associate--l+56.0%
metadata-eval56.0%
+-rgt-identity56.0%
unpow256.0%
distribute-frac-neg56.0%
Simplified56.0%
Taylor expanded in k around inf 77.1%
associate-*r/77.1%
unpow277.1%
associate-*r*77.1%
*-commutative77.1%
unpow277.1%
Simplified77.1%
Taylor expanded in l around 0 77.1%
associate-*r*77.1%
*-commutative77.1%
associate-*r*77.1%
unpow277.1%
times-frac78.5%
unpow278.5%
associate-*r/80.4%
associate-*l*80.3%
Simplified80.3%
Taylor expanded in k around 0 71.0%
associate-*r/71.0%
metadata-eval71.0%
unpow271.0%
Simplified71.0%
Taylor expanded in k around inf 70.4%
*-commutative70.4%
unpow270.4%
associate-/l*71.0%
*-commutative71.0%
associate-/l*71.0%
unpow271.0%
Simplified71.0%
Final simplification44.1%
(FPCore (t l k) :precision binary64 (* 0.08333333333333333 (/ l (/ t l))))
double code(double t, double l, double k) {
return 0.08333333333333333 * (l / (t / l));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 0.08333333333333333d0 * (l / (t / l))
end function
public static double code(double t, double l, double k) {
return 0.08333333333333333 * (l / (t / l));
}
def code(t, l, k): return 0.08333333333333333 * (l / (t / l))
function code(t, l, k) return Float64(0.08333333333333333 * Float64(l / Float64(t / l))) end
function tmp = code(t, l, k) tmp = 0.08333333333333333 * (l / (t / l)); end
code[t_, l_, k_] := N[(0.08333333333333333 * N[(l / N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.08333333333333333 \cdot \frac{\ell}{\frac{t}{\ell}}
\end{array}
Initial program 37.3%
associate-/r*37.3%
*-commutative37.3%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+50.1%
metadata-eval50.1%
+-rgt-identity50.1%
unpow250.1%
distribute-frac-neg50.1%
Simplified50.1%
Taylor expanded in k around inf 72.7%
associate-*r/72.7%
unpow272.7%
associate-*r*72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in k around 0 67.7%
unpow267.7%
Simplified67.7%
Taylor expanded in k around 0 28.9%
associate-+r+28.9%
+-commutative28.9%
unpow228.9%
associate-*r*28.9%
associate-*r*28.9%
distribute-rgt-out30.5%
unpow230.5%
*-commutative30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in k around inf 38.2%
*-commutative38.2%
unpow238.2%
associate-/l*33.7%
Simplified33.7%
Final simplification33.7%
(FPCore (t l k) :precision binary64 (* (/ (* l l) t) 0.08333333333333333))
double code(double t, double l, double k) {
return ((l * l) / t) * 0.08333333333333333;
}
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.08333333333333333d0
end function
public static double code(double t, double l, double k) {
return ((l * l) / t) * 0.08333333333333333;
}
def code(t, l, k): return ((l * l) / t) * 0.08333333333333333
function code(t, l, k) return Float64(Float64(Float64(l * l) / t) * 0.08333333333333333) end
function tmp = code(t, l, k) tmp = ((l * l) / t) * 0.08333333333333333; end
code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] / t), $MachinePrecision] * 0.08333333333333333), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell \cdot \ell}{t} \cdot 0.08333333333333333
\end{array}
Initial program 37.3%
associate-/r*37.3%
*-commutative37.3%
associate-/r*41.7%
associate-*r/41.7%
associate-/l*41.7%
+-commutative41.7%
unpow241.7%
sqr-neg41.7%
distribute-frac-neg41.7%
distribute-frac-neg41.7%
unpow241.7%
associate--l+50.1%
metadata-eval50.1%
+-rgt-identity50.1%
unpow250.1%
distribute-frac-neg50.1%
Simplified50.1%
Taylor expanded in k around inf 72.7%
associate-*r/72.7%
unpow272.7%
associate-*r*72.7%
*-commutative72.7%
unpow272.7%
Simplified72.7%
Taylor expanded in k around 0 67.7%
unpow267.7%
Simplified67.7%
Taylor expanded in k around 0 28.9%
associate-+r+28.9%
+-commutative28.9%
unpow228.9%
associate-*r*28.9%
associate-*r*28.9%
distribute-rgt-out30.5%
unpow230.5%
*-commutative30.5%
unpow230.5%
Simplified30.5%
Taylor expanded in k around inf 38.2%
*-commutative38.2%
unpow238.2%
Simplified38.2%
Final simplification38.2%
herbie shell --seed 2023293
(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))))