
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (/ l k) 2.0)) (t_2 (pow (sin k) 2.0)))
(if (<= (* l l) 5e-309)
(/ 2.0 (* (/ k t_1) (/ t (/ (cos k) (sin k)))))
(if (<= (* l l) 2e+116)
(* 2.0 (/ (* (* l l) (cos k)) (* (* k (* k t)) t_2)))
(/ 2.0 (/ (/ (* t t_2) t_1) (cos k)))))))
double code(double t, double l, double k) {
double t_1 = pow((l / k), 2.0);
double t_2 = pow(sin(k), 2.0);
double tmp;
if ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / t_1) * (t / (cos(k) / sin(k))));
} else if ((l * l) <= 2e+116) {
tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_2));
} else {
tmp = 2.0 / (((t * t_2) / t_1) / cos(k));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (l / k) ** 2.0d0
t_2 = sin(k) ** 2.0d0
if ((l * l) <= 5d-309) then
tmp = 2.0d0 / ((k / t_1) * (t / (cos(k) / sin(k))))
else if ((l * l) <= 2d+116) then
tmp = 2.0d0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_2))
else
tmp = 2.0d0 / (((t * t_2) / t_1) / cos(k))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = Math.pow((l / k), 2.0);
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / t_1) * (t / (Math.cos(k) / Math.sin(k))));
} else if ((l * l) <= 2e+116) {
tmp = 2.0 * (((l * l) * Math.cos(k)) / ((k * (k * t)) * t_2));
} else {
tmp = 2.0 / (((t * t_2) / t_1) / Math.cos(k));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow((l / k), 2.0) t_2 = math.pow(math.sin(k), 2.0) tmp = 0 if (l * l) <= 5e-309: tmp = 2.0 / ((k / t_1) * (t / (math.cos(k) / math.sin(k)))) elif (l * l) <= 2e+116: tmp = 2.0 * (((l * l) * math.cos(k)) / ((k * (k * t)) * t_2)) else: tmp = 2.0 / (((t * t_2) / t_1) / math.cos(k)) return tmp
function code(t, l, k) t_1 = Float64(l / k) ^ 2.0 t_2 = sin(k) ^ 2.0 tmp = 0.0 if (Float64(l * l) <= 5e-309) tmp = Float64(2.0 / Float64(Float64(k / t_1) * Float64(t / Float64(cos(k) / sin(k))))); elseif (Float64(l * l) <= 2e+116) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) * cos(k)) / Float64(Float64(k * Float64(k * t)) * t_2))); else tmp = Float64(2.0 / Float64(Float64(Float64(t * t_2) / t_1) / cos(k))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = (l / k) ^ 2.0; t_2 = sin(k) ^ 2.0; tmp = 0.0; if ((l * l) <= 5e-309) tmp = 2.0 / ((k / t_1) * (t / (cos(k) / sin(k)))); elseif ((l * l) <= 2e+116) tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_2)); else tmp = 2.0 / (((t * t_2) / t_1) / cos(k)); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[(2.0 / N[(N[(k / t$95$1), $MachinePrecision] * N[(t / N[(N[Cos[k], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+116], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{k}\right)}^{2}\\
t_2 := {\sin k}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{\frac{k}{t_1} \cdot \frac{t}{\frac{\cos k}{\sin k}}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+116}:\\
\;\;\;\;2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \cos k}{\left(k \cdot \left(k \cdot t\right)\right) \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t \cdot t_2}{t_1}}{\cos k}}\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309Initial program 10.3%
expm1-log1p-u3.0%
expm1-udef3.0%
Applied egg-rr7.6%
expm1-def7.6%
expm1-log1p19.4%
associate-/l*30.6%
associate-/r/37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in k around 0 19.4%
*-commutative19.4%
unpow219.4%
times-frac37.0%
Simplified37.0%
Taylor expanded in t around 0 50.4%
times-frac52.2%
cube-mult52.2%
unpow252.2%
associate-/l*52.5%
unpow252.5%
unpow252.5%
times-frac91.7%
unpow291.7%
associate-/l*91.7%
Simplified91.7%
if 4.9999999999999995e-309 < (*.f64 l l) < 2.00000000000000003e116Initial program 35.0%
associate-/r*35.3%
*-commutative35.3%
associate-/r*35.3%
associate-*r/35.3%
associate-/l*35.4%
+-commutative35.4%
unpow235.4%
sqr-neg35.4%
distribute-frac-neg35.4%
distribute-frac-neg35.4%
unpow235.4%
associate--l+49.2%
metadata-eval49.2%
+-rgt-identity49.2%
unpow249.2%
distribute-frac-neg49.2%
Simplified49.2%
Taylor expanded in k around inf 93.5%
*-commutative93.5%
times-frac89.5%
associate-*l*89.5%
unpow289.5%
unpow289.5%
times-frac90.6%
Simplified90.6%
div-inv90.6%
Applied egg-rr90.6%
Taylor expanded in l around 0 93.5%
unpow293.5%
*-commutative93.5%
associate-*r*93.6%
unpow293.6%
associate-*r*96.0%
Simplified96.0%
if 2.00000000000000003e116 < (*.f64 l l) Initial program 36.7%
expm1-log1p-u32.9%
expm1-udef11.1%
Applied egg-rr11.9%
expm1-def34.6%
expm1-log1p39.3%
associate-/l*39.4%
associate-/r/45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in k around inf 65.1%
associate-/r*65.1%
*-commutative65.1%
associate-/l*68.0%
unpow268.0%
unpow268.0%
times-frac93.7%
unpow293.7%
Simplified93.7%
Final simplification93.9%
(FPCore (t l k)
:precision binary64
(if (<= (* l l) 5e-309)
(/ 2.0 (* (/ k (pow (/ l k) 2.0)) (/ t (/ (cos k) (sin k)))))
(if (<= (* l l) 5e+296)
(* 2.0 (/ (* (* l l) (cos k)) (* (* k (* k t)) (pow (sin k) 2.0))))
(*
(* (/ l k) (/ l k))
(*
2.0
(* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t))))))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / pow((l / k), 2.0)) * (t / (cos(k) / sin(k))));
} else if ((l * l) <= 5e+296) {
tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * pow(sin(k), 2.0)));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 5d-309) then
tmp = 2.0d0 / ((k / ((l / k) ** 2.0d0)) * (t / (cos(k) / sin(k))))
else if ((l * l) <= 5d+296) then
tmp = 2.0d0 * (((l * l) * cos(k)) / ((k * (k * t)) * (sin(k) ** 2.0d0)))
else
tmp = ((l / k) * (l / k)) * (2.0d0 * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / Math.pow((l / k), 2.0)) * (t / (Math.cos(k) / Math.sin(k))));
} else if ((l * l) <= 5e+296) {
tmp = 2.0 * (((l * l) * Math.cos(k)) / ((k * (k * t)) * Math.pow(Math.sin(k), 2.0)));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 5e-309: tmp = 2.0 / ((k / math.pow((l / k), 2.0)) * (t / (math.cos(k) / math.sin(k)))) elif (l * l) <= 5e+296: tmp = 2.0 * (((l * l) * math.cos(k)) / ((k * (k * t)) * math.pow(math.sin(k), 2.0))) else: tmp = ((l / k) * (l / k)) * (2.0 * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-309) tmp = Float64(2.0 / Float64(Float64(k / (Float64(l / k) ^ 2.0)) * Float64(t / Float64(cos(k) / sin(k))))); elseif (Float64(l * l) <= 5e+296) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) * cos(k)) / Float64(Float64(k * Float64(k * t)) * (sin(k) ^ 2.0)))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-309) tmp = 2.0 / ((k / ((l / k) ^ 2.0)) * (t / (cos(k) / sin(k)))); elseif ((l * l) <= 5e+296) tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * (sin(k) ^ 2.0))); else tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[(2.0 / N[(N[(k / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t / N[(N[Cos[k], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+296], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{\frac{k}{{\left(\frac{\ell}{k}\right)}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+296}:\\
\;\;\;\;2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \cos k}{\left(k \cdot \left(k \cdot t\right)\right) \cdot {\sin k}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309Initial program 10.3%
expm1-log1p-u3.0%
expm1-udef3.0%
Applied egg-rr7.6%
expm1-def7.6%
expm1-log1p19.4%
associate-/l*30.6%
associate-/r/37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in k around 0 19.4%
*-commutative19.4%
unpow219.4%
times-frac37.0%
Simplified37.0%
Taylor expanded in t around 0 50.4%
times-frac52.2%
cube-mult52.2%
unpow252.2%
associate-/l*52.5%
unpow252.5%
unpow252.5%
times-frac91.7%
unpow291.7%
associate-/l*91.7%
Simplified91.7%
if 4.9999999999999995e-309 < (*.f64 l l) < 5.0000000000000001e296Initial program 40.6%
associate-/r*40.8%
*-commutative40.8%
associate-/r*40.8%
associate-*r/40.8%
associate-/l*40.8%
+-commutative40.8%
unpow240.8%
sqr-neg40.8%
distribute-frac-neg40.8%
distribute-frac-neg40.8%
unpow240.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 89.1%
*-commutative89.1%
times-frac88.8%
associate-*l*88.8%
unpow288.8%
unpow288.8%
times-frac93.6%
Simplified93.6%
div-inv93.6%
Applied egg-rr93.6%
Taylor expanded in l around 0 89.1%
unpow289.1%
*-commutative89.1%
associate-*r*89.1%
unpow289.1%
associate-*r*93.2%
Simplified93.2%
if 5.0000000000000001e296 < (*.f64 l l) Initial program 28.4%
associate-/r*28.4%
*-commutative28.4%
associate-/r*36.9%
associate-*r/36.9%
associate-/l*36.9%
+-commutative36.9%
unpow236.9%
sqr-neg36.9%
distribute-frac-neg36.9%
distribute-frac-neg36.9%
unpow236.9%
associate--l+37.2%
metadata-eval37.2%
+-rgt-identity37.2%
unpow237.2%
distribute-frac-neg37.2%
Simplified37.2%
Taylor expanded in k around inf 56.8%
*-commutative56.8%
times-frac57.3%
associate-*l*57.3%
unpow257.3%
unpow257.3%
times-frac90.4%
Simplified90.4%
div-inv90.4%
Applied egg-rr90.4%
associate-/r*90.3%
Simplified90.3%
Taylor expanded in k around 0 68.2%
+-commutative68.2%
*-commutative68.2%
unpow268.2%
associate-*r/68.2%
metadata-eval68.2%
Simplified68.2%
Final simplification85.9%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= (* l l) 5e-309)
(/ 2.0 (* (/ k (pow (/ l k) 2.0)) (/ t (/ (cos k) (sin k)))))
(if (<= (* l l) 2e+116)
(* 2.0 (/ (* (* l l) (cos k)) (* (* k (* k t)) t_1)))
(* (* (/ l k) (/ l k)) (* 2.0 (/ (cos k) (* t t_1))))))))
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / pow((l / k), 2.0)) * (t / (cos(k) / sin(k))));
} else if ((l * l) <= 2e+116) {
tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_1));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) / (t * 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 ((l * l) <= 5d-309) then
tmp = 2.0d0 / ((k / ((l / k) ** 2.0d0)) * (t / (cos(k) / sin(k))))
else if ((l * l) <= 2d+116) then
tmp = 2.0d0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_1))
else
tmp = ((l / k) * (l / k)) * (2.0d0 * (cos(k) / (t * 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 ((l * l) <= 5e-309) {
tmp = 2.0 / ((k / Math.pow((l / k), 2.0)) * (t / (Math.cos(k) / Math.sin(k))));
} else if ((l * l) <= 2e+116) {
tmp = 2.0 * (((l * l) * Math.cos(k)) / ((k * (k * t)) * t_1));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (Math.cos(k) / (t * t_1)));
}
return tmp;
}
def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if (l * l) <= 5e-309: tmp = 2.0 / ((k / math.pow((l / k), 2.0)) * (t / (math.cos(k) / math.sin(k)))) elif (l * l) <= 2e+116: tmp = 2.0 * (((l * l) * math.cos(k)) / ((k * (k * t)) * t_1)) else: tmp = ((l / k) * (l / k)) * (2.0 * (math.cos(k) / (t * t_1))) return tmp
function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (Float64(l * l) <= 5e-309) tmp = Float64(2.0 / Float64(Float64(k / (Float64(l / k) ^ 2.0)) * Float64(t / Float64(cos(k) / sin(k))))); elseif (Float64(l * l) <= 2e+116) tmp = Float64(2.0 * Float64(Float64(Float64(l * l) * cos(k)) / Float64(Float64(k * Float64(k * t)) * t_1))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(cos(k) / Float64(t * t_1)))); end return tmp end
function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if ((l * l) <= 5e-309) tmp = 2.0 / ((k / ((l / k) ^ 2.0)) * (t / (cos(k) / sin(k)))); elseif ((l * l) <= 2e+116) tmp = 2.0 * (((l * l) * cos(k)) / ((k * (k * t)) * t_1)); else tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) / (t * 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[LessEqual[N[(l * l), $MachinePrecision], 5e-309], N[(2.0 / N[(N[(k / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t / N[(N[Cos[k], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+116], N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-309}:\\
\;\;\;\;\frac{2}{\frac{k}{{\left(\frac{\ell}{k}\right)}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+116}:\\
\;\;\;\;2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \cos k}{\left(k \cdot \left(k \cdot t\right)\right) \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \frac{\cos k}{t \cdot t_1}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 4.9999999999999995e-309Initial program 10.3%
expm1-log1p-u3.0%
expm1-udef3.0%
Applied egg-rr7.6%
expm1-def7.6%
expm1-log1p19.4%
associate-/l*30.6%
associate-/r/37.0%
*-commutative37.0%
Simplified37.0%
Taylor expanded in k around 0 19.4%
*-commutative19.4%
unpow219.4%
times-frac37.0%
Simplified37.0%
Taylor expanded in t around 0 50.4%
times-frac52.2%
cube-mult52.2%
unpow252.2%
associate-/l*52.5%
unpow252.5%
unpow252.5%
times-frac91.7%
unpow291.7%
associate-/l*91.7%
Simplified91.7%
if 4.9999999999999995e-309 < (*.f64 l l) < 2.00000000000000003e116Initial program 35.0%
associate-/r*35.3%
*-commutative35.3%
associate-/r*35.3%
associate-*r/35.3%
associate-/l*35.4%
+-commutative35.4%
unpow235.4%
sqr-neg35.4%
distribute-frac-neg35.4%
distribute-frac-neg35.4%
unpow235.4%
associate--l+49.2%
metadata-eval49.2%
+-rgt-identity49.2%
unpow249.2%
distribute-frac-neg49.2%
Simplified49.2%
Taylor expanded in k around inf 93.5%
*-commutative93.5%
times-frac89.5%
associate-*l*89.5%
unpow289.5%
unpow289.5%
times-frac90.6%
Simplified90.6%
div-inv90.6%
Applied egg-rr90.6%
Taylor expanded in l around 0 93.5%
unpow293.5%
*-commutative93.5%
associate-*r*93.6%
unpow293.6%
associate-*r*96.0%
Simplified96.0%
if 2.00000000000000003e116 < (*.f64 l l) Initial program 36.7%
associate-/r*36.7%
*-commutative36.7%
associate-/r*42.2%
associate-*r/42.2%
associate-/l*42.2%
+-commutative42.2%
unpow242.2%
sqr-neg42.2%
distribute-frac-neg42.2%
distribute-frac-neg42.2%
unpow242.2%
associate--l+45.0%
metadata-eval45.0%
+-rgt-identity45.0%
unpow245.0%
distribute-frac-neg45.0%
Simplified45.0%
Taylor expanded in k around inf 65.1%
*-commutative65.1%
times-frac68.0%
associate-*l*68.0%
unpow268.0%
unpow268.0%
times-frac93.6%
Simplified93.6%
Final simplification93.9%
(FPCore (t l k)
:precision binary64
(if (<= l 3.1e-149)
(/ 2.0 (* (/ k (pow (/ l k) 2.0)) (/ t (/ (cos k) (sin k)))))
(if (<= l 5.2e+145)
(* 2.0 (* (/ (cos k) (* t (pow (sin k) 2.0))) (/ (* l l) (* k k))))
(*
(* (/ l k) (/ l k))
(*
2.0
(* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t))))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 3.1e-149) {
tmp = 2.0 / ((k / pow((l / k), 2.0)) * (t / (cos(k) / sin(k))));
} else if (l <= 5.2e+145) {
tmp = 2.0 * ((cos(k) / (t * pow(sin(k), 2.0))) * ((l * l) / (k * k)));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3.1d-149) then
tmp = 2.0d0 / ((k / ((l / k) ** 2.0d0)) * (t / (cos(k) / sin(k))))
else if (l <= 5.2d+145) then
tmp = 2.0d0 * ((cos(k) / (t * (sin(k) ** 2.0d0))) * ((l * l) / (k * k)))
else
tmp = ((l / k) * (l / k)) * (2.0d0 * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 3.1e-149) {
tmp = 2.0 / ((k / Math.pow((l / k), 2.0)) * (t / (Math.cos(k) / Math.sin(k))));
} else if (l <= 5.2e+145) {
tmp = 2.0 * ((Math.cos(k) / (t * Math.pow(Math.sin(k), 2.0))) * ((l * l) / (k * k)));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 3.1e-149: tmp = 2.0 / ((k / math.pow((l / k), 2.0)) * (t / (math.cos(k) / math.sin(k)))) elif l <= 5.2e+145: tmp = 2.0 * ((math.cos(k) / (t * math.pow(math.sin(k), 2.0))) * ((l * l) / (k * k))) else: tmp = ((l / k) * (l / k)) * (2.0 * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 3.1e-149) tmp = Float64(2.0 / Float64(Float64(k / (Float64(l / k) ^ 2.0)) * Float64(t / Float64(cos(k) / sin(k))))); elseif (l <= 5.2e+145) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t * (sin(k) ^ 2.0))) * Float64(Float64(l * l) / Float64(k * k)))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 3.1e-149) tmp = 2.0 / ((k / ((l / k) ^ 2.0)) * (t / (cos(k) / sin(k)))); elseif (l <= 5.2e+145) tmp = 2.0 * ((cos(k) / (t * (sin(k) ^ 2.0))) * ((l * l) / (k * k))); else tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 3.1e-149], N[(2.0 / N[(N[(k / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t / N[(N[Cos[k], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 5.2e+145], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.1 \cdot 10^{-149}:\\
\;\;\;\;\frac{2}{\frac{k}{{\left(\frac{\ell}{k}\right)}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}\\
\mathbf{elif}\;\ell \leq 5.2 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \frac{\ell \cdot \ell}{k \cdot k}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\end{array}
\end{array}
if l < 3.09999999999999987e-149Initial program 28.0%
expm1-log1p-u19.7%
expm1-udef9.8%
Applied egg-rr12.3%
expm1-def22.8%
expm1-log1p34.2%
associate-/l*38.9%
associate-/r/44.2%
*-commutative44.2%
Simplified44.2%
Taylor expanded in k around 0 30.2%
*-commutative30.2%
unpow230.2%
times-frac39.5%
Simplified39.5%
Taylor expanded in t around 0 57.1%
times-frac58.4%
cube-mult58.4%
unpow258.4%
associate-/l*60.4%
unpow260.4%
unpow260.4%
times-frac77.8%
unpow277.8%
associate-/l*77.8%
Simplified77.8%
if 3.09999999999999987e-149 < l < 5.20000000000000005e145Initial program 36.6%
associate-/r*36.6%
*-commutative36.6%
associate-/r*36.6%
associate-*r/36.6%
associate-/l*36.6%
+-commutative36.6%
unpow236.6%
sqr-neg36.6%
distribute-frac-neg36.6%
distribute-frac-neg36.6%
unpow236.6%
associate--l+53.4%
metadata-eval53.4%
+-rgt-identity53.4%
unpow253.4%
distribute-frac-neg53.4%
Simplified53.4%
Taylor expanded in k around inf 89.6%
*-commutative89.6%
times-frac92.9%
associate-*l*92.9%
unpow292.9%
unpow292.9%
times-frac96.3%
Simplified96.3%
Taylor expanded in l around 0 89.6%
times-frac92.9%
unpow292.9%
unpow292.9%
Simplified92.9%
if 5.20000000000000005e145 < l Initial program 22.5%
associate-/r*22.5%
*-commutative22.5%
associate-/r*28.0%
associate-*r/28.1%
associate-/l*28.1%
+-commutative28.1%
unpow228.1%
sqr-neg28.1%
distribute-frac-neg28.1%
distribute-frac-neg28.1%
unpow228.1%
associate--l+28.5%
metadata-eval28.5%
+-rgt-identity28.5%
unpow228.5%
distribute-frac-neg28.5%
Simplified28.5%
Taylor expanded in k around inf 53.5%
*-commutative53.5%
times-frac54.2%
associate-*l*54.2%
unpow254.2%
unpow254.2%
times-frac86.4%
Simplified86.4%
div-inv86.5%
Applied egg-rr86.5%
associate-/r*86.4%
Simplified86.4%
Taylor expanded in k around 0 58.7%
+-commutative58.7%
*-commutative58.7%
unpow258.7%
associate-*r/58.7%
metadata-eval58.7%
Simplified58.7%
Final simplification78.5%
(FPCore (t l k)
:precision binary64
(if (<= l 9e-105)
(/ 2.0 (* (/ k (pow (/ l k) 2.0)) (/ t (/ (cos k) (sin k)))))
(*
(* (/ l k) (/ l k))
(* 2.0 (* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t)))))))
double code(double t, double l, double k) {
double tmp;
if (l <= 9e-105) {
tmp = 2.0 / ((k / pow((l / k), 2.0)) * (t / (cos(k) / sin(k))));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 9d-105) then
tmp = 2.0d0 / ((k / ((l / k) ** 2.0d0)) * (t / (cos(k) / sin(k))))
else
tmp = ((l / k) * (l / k)) * (2.0d0 * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (l <= 9e-105) {
tmp = 2.0 / ((k / Math.pow((l / k), 2.0)) * (t / (Math.cos(k) / Math.sin(k))));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if l <= 9e-105: tmp = 2.0 / ((k / math.pow((l / k), 2.0)) * (t / (math.cos(k) / math.sin(k)))) else: tmp = ((l / k) * (l / k)) * (2.0 * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (l <= 9e-105) tmp = Float64(2.0 / Float64(Float64(k / (Float64(l / k) ^ 2.0)) * Float64(t / Float64(cos(k) / sin(k))))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 9e-105) tmp = 2.0 / ((k / ((l / k) ^ 2.0)) * (t / (cos(k) / sin(k)))); else tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[l, 9e-105], N[(2.0 / N[(N[(k / N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t / N[(N[Cos[k], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{\frac{k}{{\left(\frac{\ell}{k}\right)}^{2}} \cdot \frac{t}{\frac{\cos k}{\sin k}}}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\end{array}
\end{array}
if l < 8.9999999999999995e-105Initial program 27.9%
expm1-log1p-u20.0%
expm1-udef10.5%
Applied egg-rr13.5%
expm1-def24.1%
expm1-log1p35.0%
associate-/l*39.5%
associate-/r/44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in k around 0 31.1%
*-commutative31.1%
unpow231.1%
times-frac40.0%
Simplified40.0%
Taylor expanded in t around 0 57.4%
times-frac59.2%
cube-mult59.2%
unpow259.2%
associate-/l*61.1%
unpow261.1%
unpow261.1%
times-frac77.7%
unpow277.7%
associate-/l*77.7%
Simplified77.7%
if 8.9999999999999995e-105 < l Initial program 31.7%
associate-/r*31.7%
*-commutative31.7%
associate-/r*34.1%
associate-*r/34.0%
associate-/l*34.1%
+-commutative34.1%
unpow234.1%
sqr-neg34.1%
distribute-frac-neg34.1%
distribute-frac-neg34.1%
unpow234.1%
associate--l+43.3%
metadata-eval43.3%
+-rgt-identity43.3%
unpow243.3%
distribute-frac-neg43.3%
Simplified43.3%
Taylor expanded in k around inf 74.7%
*-commutative74.7%
times-frac77.1%
associate-*l*77.1%
unpow277.1%
unpow277.1%
times-frac92.9%
Simplified92.9%
div-inv92.9%
Applied egg-rr92.9%
associate-/r*93.0%
Simplified93.0%
Taylor expanded in k around 0 70.7%
+-commutative70.7%
*-commutative70.7%
unpow270.7%
associate-*r/70.7%
metadata-eval70.7%
Simplified70.7%
Final simplification75.3%
(FPCore (t l k)
:precision binary64
(if (<= k 1.15e-12)
(* (pow (/ l k) 2.0) (/ (/ 2.0 k) (* k t)))
(*
(* (/ l k) (/ l k))
(* 2.0 (* (cos k) (+ (/ 1.0 (* t (* k k))) (/ 0.3333333333333333 t)))))))
double code(double t, double l, double k) {
double tmp;
if (k <= 1.15e-12) {
tmp = pow((l / k), 2.0) * ((2.0 / k) / (k * t));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.15d-12) then
tmp = ((l / k) ** 2.0d0) * ((2.0d0 / k) / (k * t))
else
tmp = ((l / k) * (l / k)) * (2.0d0 * (cos(k) * ((1.0d0 / (t * (k * k))) + (0.3333333333333333d0 / t))))
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if (k <= 1.15e-12) {
tmp = Math.pow((l / k), 2.0) * ((2.0 / k) / (k * t));
} else {
tmp = ((l / k) * (l / k)) * (2.0 * (Math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t))));
}
return tmp;
}
def code(t, l, k): tmp = 0 if k <= 1.15e-12: tmp = math.pow((l / k), 2.0) * ((2.0 / k) / (k * t)) else: tmp = ((l / k) * (l / k)) * (2.0 * (math.cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))) return tmp
function code(t, l, k) tmp = 0.0 if (k <= 1.15e-12) tmp = Float64((Float64(l / k) ^ 2.0) * Float64(Float64(2.0 / k) / Float64(k * t))); else tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(cos(k) * Float64(Float64(1.0 / Float64(t * Float64(k * k))) + Float64(0.3333333333333333 / t))))); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if (k <= 1.15e-12) tmp = ((l / k) ^ 2.0) * ((2.0 / k) / (k * t)); else tmp = ((l / k) * (l / k)) * (2.0 * (cos(k) * ((1.0 / (t * (k * k))) + (0.3333333333333333 / t)))); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[k, 1.15e-12], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(1.0 / N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.3333333333333333 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq 1.15 \cdot 10^{-12}:\\
\;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\frac{2}{k}}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \left(\cos k \cdot \left(\frac{1}{t \cdot \left(k \cdot k\right)} + \frac{0.3333333333333333}{t}\right)\right)\right)\\
\end{array}
\end{array}
if k < 1.14999999999999995e-12Initial program 30.5%
associate-/r*30.5%
*-commutative30.5%
associate-/r*35.2%
associate-*r/36.4%
associate-/l*35.2%
+-commutative35.2%
unpow235.2%
sqr-neg35.2%
distribute-frac-neg35.2%
distribute-frac-neg35.2%
unpow235.2%
associate--l+42.0%
metadata-eval42.0%
+-rgt-identity42.0%
unpow242.0%
distribute-frac-neg42.0%
Simplified42.0%
Taylor expanded in k around inf 70.8%
*-commutative70.8%
times-frac70.6%
associate-*l*70.6%
unpow270.6%
unpow270.6%
times-frac88.0%
Simplified88.0%
Taylor expanded in k around 0 77.0%
unpow277.0%
associate-*l*79.8%
Simplified79.8%
pow179.8%
pow279.8%
associate-*l/79.8%
metadata-eval79.8%
*-commutative79.8%
Applied egg-rr79.8%
unpow179.8%
associate-/r*79.8%
Simplified79.8%
if 1.14999999999999995e-12 < k Initial program 26.2%
associate-/r*26.5%
*-commutative26.5%
associate-/r*31.6%
associate-*r/31.5%
associate-/l*31.6%
+-commutative31.6%
unpow231.6%
sqr-neg31.6%
distribute-frac-neg31.6%
distribute-frac-neg31.6%
unpow231.6%
associate--l+43.0%
metadata-eval43.0%
+-rgt-identity43.0%
unpow243.0%
distribute-frac-neg43.0%
Simplified43.0%
Taylor expanded in k around inf 68.0%
*-commutative68.0%
times-frac69.9%
associate-*l*69.9%
unpow269.9%
unpow269.9%
times-frac94.3%
Simplified94.3%
div-inv94.2%
Applied egg-rr94.2%
associate-/r*94.3%
Simplified94.3%
Taylor expanded in k around 0 66.5%
+-commutative66.5%
*-commutative66.5%
unpow266.5%
associate-*r/66.5%
metadata-eval66.5%
Simplified66.5%
Final simplification75.6%
(FPCore (t l k)
:precision binary64
(let* ((t_1 (* 2.0 (/ 1.0 (* k (* k t))))))
(if (<= k 1.85e-77)
(* (* (/ l k) (/ l k)) t_1)
(if (<= k 6.7e+15)
(*
(* l (/ l t))
(+ (/ 2.0 (pow k 4.0)) (/ -0.3333333333333333 (* k k))))
(* t_1 (/ (* l (/ l k)) k))))))
double code(double t, double l, double k) {
double t_1 = 2.0 * (1.0 / (k * (k * t)));
double tmp;
if (k <= 1.85e-77) {
tmp = ((l / k) * (l / k)) * t_1;
} else if (k <= 6.7e+15) {
tmp = (l * (l / t)) * ((2.0 / pow(k, 4.0)) + (-0.3333333333333333 / (k * k)));
} else {
tmp = t_1 * ((l * (l / 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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (1.0d0 / (k * (k * t)))
if (k <= 1.85d-77) then
tmp = ((l / k) * (l / k)) * t_1
else if (k <= 6.7d+15) then
tmp = (l * (l / t)) * ((2.0d0 / (k ** 4.0d0)) + ((-0.3333333333333333d0) / (k * k)))
else
tmp = t_1 * ((l * (l / k)) / k)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 * (1.0 / (k * (k * t)));
double tmp;
if (k <= 1.85e-77) {
tmp = ((l / k) * (l / k)) * t_1;
} else if (k <= 6.7e+15) {
tmp = (l * (l / t)) * ((2.0 / Math.pow(k, 4.0)) + (-0.3333333333333333 / (k * k)));
} else {
tmp = t_1 * ((l * (l / k)) / k);
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 * (1.0 / (k * (k * t))) tmp = 0 if k <= 1.85e-77: tmp = ((l / k) * (l / k)) * t_1 elif k <= 6.7e+15: tmp = (l * (l / t)) * ((2.0 / math.pow(k, 4.0)) + (-0.3333333333333333 / (k * k))) else: tmp = t_1 * ((l * (l / k)) / k) return tmp
function code(t, l, k) t_1 = Float64(2.0 * Float64(1.0 / Float64(k * Float64(k * t)))) tmp = 0.0 if (k <= 1.85e-77) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * t_1); elseif (k <= 6.7e+15) tmp = Float64(Float64(l * Float64(l / t)) * Float64(Float64(2.0 / (k ^ 4.0)) + Float64(-0.3333333333333333 / Float64(k * k)))); else tmp = Float64(t_1 * Float64(Float64(l * Float64(l / k)) / k)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 * (1.0 / (k * (k * t))); tmp = 0.0; if (k <= 1.85e-77) tmp = ((l / k) * (l / k)) * t_1; elseif (k <= 6.7e+15) tmp = (l * (l / t)) * ((2.0 / (k ^ 4.0)) + (-0.3333333333333333 / (k * k))); else tmp = t_1 * ((l * (l / k)) / k); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 * N[(1.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 1.85e-77], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[k, 6.7e+15], N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{1}{k \cdot \left(k \cdot t\right)}\\
\mathbf{if}\;k \leq 1.85 \cdot 10^{-77}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot t_1\\
\mathbf{elif}\;k \leq 6.7 \cdot 10^{+15}:\\
\;\;\;\;\left(\ell \cdot \frac{\ell}{t}\right) \cdot \left(\frac{2}{{k}^{4}} + \frac{-0.3333333333333333}{k \cdot k}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot \frac{\ell}{k}}{k}\\
\end{array}
\end{array}
if k < 1.84999999999999998e-77Initial program 32.2%
associate-/r*32.2%
*-commutative32.2%
associate-/r*37.3%
associate-*r/38.6%
associate-/l*37.3%
+-commutative37.3%
unpow237.3%
sqr-neg37.3%
distribute-frac-neg37.3%
distribute-frac-neg37.3%
unpow237.3%
associate--l+42.4%
metadata-eval42.4%
+-rgt-identity42.4%
unpow242.4%
distribute-frac-neg42.4%
Simplified42.4%
Taylor expanded in k around inf 68.5%
*-commutative68.5%
times-frac67.7%
associate-*l*67.7%
unpow267.7%
unpow267.7%
times-frac86.8%
Simplified86.8%
Taylor expanded in k around 0 74.7%
unpow274.7%
associate-*l*77.8%
Simplified77.8%
if 1.84999999999999998e-77 < k < 6.7e15Initial program 29.2%
associate-/r*29.2%
*-commutative29.2%
associate-/r*29.2%
associate-*r/29.1%
associate-/l*29.2%
+-commutative29.2%
unpow229.2%
sqr-neg29.2%
distribute-frac-neg29.2%
distribute-frac-neg29.2%
unpow229.2%
associate--l+42.8%
metadata-eval42.8%
+-rgt-identity42.8%
unpow242.8%
distribute-frac-neg42.8%
Simplified42.8%
Taylor expanded in k around 0 57.7%
+-commutative57.7%
fma-def57.7%
*-commutative57.7%
associate-/r*59.1%
unpow259.1%
associate-/l*59.2%
associate-*r/59.2%
times-frac62.7%
unpow262.7%
unpow262.7%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in l around 0 79.2%
unpow279.2%
associate-*r/79.2%
metadata-eval79.2%
*-commutative79.2%
sub-neg79.2%
associate-/r*79.0%
associate-*r/79.0%
metadata-eval79.0%
distribute-neg-frac79.0%
metadata-eval79.0%
unpow279.0%
associate-*l*79.0%
Simplified79.0%
Taylor expanded in t around 0 89.9%
associate-/l*89.9%
associate-/r/91.2%
unpow291.2%
associate-*r/91.3%
sub-neg91.3%
associate-*r/91.3%
metadata-eval91.3%
associate-*r/91.3%
metadata-eval91.3%
distribute-neg-frac91.3%
metadata-eval91.3%
unpow291.3%
Simplified91.3%
if 6.7e15 < k Initial program 22.1%
associate-/r*22.4%
*-commutative22.4%
associate-/r*28.4%
associate-*r/28.3%
associate-/l*28.4%
+-commutative28.4%
unpow228.4%
sqr-neg28.4%
distribute-frac-neg28.4%
distribute-frac-neg28.4%
unpow228.4%
associate--l+41.8%
metadata-eval41.8%
+-rgt-identity41.8%
unpow241.8%
distribute-frac-neg41.8%
Simplified41.8%
Taylor expanded in k around inf 62.4%
*-commutative62.4%
times-frac64.7%
associate-*l*64.7%
unpow264.7%
unpow264.7%
times-frac93.3%
Simplified93.3%
Taylor expanded in k around 0 53.0%
unpow253.0%
associate-*l*53.0%
Simplified53.0%
associate-*r/55.8%
Applied egg-rr55.8%
Final simplification73.4%
(FPCore (t l k) :precision binary64 (if (<= (* l l) 2e-142) (* (pow (/ l k) 2.0) (/ (/ 2.0 k) (* k t))) (* (* 2.0 (/ 1.0 (* k (* k t)))) (/ (* l (/ l k)) k))))
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-142) {
tmp = pow((l / k), 2.0) * ((2.0 / k) / (k * t));
} else {
tmp = (2.0 * (1.0 / (k * (k * t)))) * ((l * (l / 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 ((l * l) <= 2d-142) then
tmp = ((l / k) ** 2.0d0) * ((2.0d0 / k) / (k * t))
else
tmp = (2.0d0 * (1.0d0 / (k * (k * t)))) * ((l * (l / k)) / k)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 2e-142) {
tmp = Math.pow((l / k), 2.0) * ((2.0 / k) / (k * t));
} else {
tmp = (2.0 * (1.0 / (k * (k * t)))) * ((l * (l / k)) / k);
}
return tmp;
}
def code(t, l, k): tmp = 0 if (l * l) <= 2e-142: tmp = math.pow((l / k), 2.0) * ((2.0 / k) / (k * t)) else: tmp = (2.0 * (1.0 / (k * (k * t)))) * ((l * (l / k)) / k) return tmp
function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 2e-142) tmp = Float64((Float64(l / k) ^ 2.0) * Float64(Float64(2.0 / k) / Float64(k * t))); else tmp = Float64(Float64(2.0 * Float64(1.0 / Float64(k * Float64(k * t)))) * Float64(Float64(l * Float64(l / k)) / k)); end return tmp end
function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 2e-142) tmp = ((l / k) ^ 2.0) * ((2.0 / k) / (k * t)); else tmp = (2.0 * (1.0 / (k * (k * t)))) * ((l * (l / k)) / k); end tmp_2 = tmp; end
code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 2e-142], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(2.0 / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(1.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-142}:\\
\;\;\;\;{\left(\frac{\ell}{k}\right)}^{2} \cdot \frac{\frac{2}{k}}{k \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \frac{1}{k \cdot \left(k \cdot t\right)}\right) \cdot \frac{\ell \cdot \frac{\ell}{k}}{k}\\
\end{array}
\end{array}
if (*.f64 l l) < 2.0000000000000001e-142Initial program 15.3%
associate-/r*15.3%
*-commutative15.3%
associate-/r*21.4%
associate-*r/23.5%
associate-/l*21.4%
+-commutative21.4%
unpow221.4%
sqr-neg21.4%
distribute-frac-neg21.4%
distribute-frac-neg21.4%
unpow221.4%
associate--l+33.3%
metadata-eval33.3%
+-rgt-identity33.3%
unpow233.3%
distribute-frac-neg33.3%
Simplified33.3%
Taylor expanded in k around inf 64.8%
*-commutative64.8%
times-frac63.3%
associate-*l*63.3%
unpow263.3%
unpow263.3%
times-frac83.9%
Simplified83.9%
Taylor expanded in k around 0 81.1%
unpow281.1%
associate-*l*85.9%
Simplified85.9%
pow185.9%
pow285.9%
associate-*l/85.9%
metadata-eval85.9%
*-commutative85.9%
Applied egg-rr85.9%
unpow185.9%
associate-/r*86.0%
Simplified86.0%
if 2.0000000000000001e-142 < (*.f64 l l) Initial program 38.2%
associate-/r*38.4%
*-commutative38.4%
associate-/r*42.3%
associate-*r/42.3%
associate-/l*42.3%
+-commutative42.3%
unpow242.3%
sqr-neg42.3%
distribute-frac-neg42.3%
distribute-frac-neg42.3%
unpow242.3%
associate--l+48.1%
metadata-eval48.1%
+-rgt-identity48.1%
unpow248.1%
distribute-frac-neg48.1%
Simplified48.1%
Taylor expanded in k around inf 73.3%
*-commutative73.3%
times-frac75.0%
associate-*l*75.0%
unpow275.0%
unpow275.0%
times-frac93.8%
Simplified93.8%
Taylor expanded in k around 0 62.7%
unpow262.7%
associate-*l*62.7%
Simplified62.7%
associate-*r/66.3%
Applied egg-rr66.3%
Final simplification74.1%
(FPCore (t l k) :precision binary64 (let* ((t_1 (* 2.0 (/ 1.0 (* k (* k t)))))) (if (<= k 5e-92) (* (* (/ l k) (/ l k)) t_1) (* t_1 (/ (* l (/ l k)) k)))))
double code(double t, double l, double k) {
double t_1 = 2.0 * (1.0 / (k * (k * t)));
double tmp;
if (k <= 5e-92) {
tmp = ((l / k) * (l / k)) * t_1;
} else {
tmp = t_1 * ((l * (l / 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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (1.0d0 / (k * (k * t)))
if (k <= 5d-92) then
tmp = ((l / k) * (l / k)) * t_1
else
tmp = t_1 * ((l * (l / k)) / k)
end if
code = tmp
end function
public static double code(double t, double l, double k) {
double t_1 = 2.0 * (1.0 / (k * (k * t)));
double tmp;
if (k <= 5e-92) {
tmp = ((l / k) * (l / k)) * t_1;
} else {
tmp = t_1 * ((l * (l / k)) / k);
}
return tmp;
}
def code(t, l, k): t_1 = 2.0 * (1.0 / (k * (k * t))) tmp = 0 if k <= 5e-92: tmp = ((l / k) * (l / k)) * t_1 else: tmp = t_1 * ((l * (l / k)) / k) return tmp
function code(t, l, k) t_1 = Float64(2.0 * Float64(1.0 / Float64(k * Float64(k * t)))) tmp = 0.0 if (k <= 5e-92) tmp = Float64(Float64(Float64(l / k) * Float64(l / k)) * t_1); else tmp = Float64(t_1 * Float64(Float64(l * Float64(l / k)) / k)); end return tmp end
function tmp_2 = code(t, l, k) t_1 = 2.0 * (1.0 / (k * (k * t))); tmp = 0.0; if (k <= 5e-92) tmp = ((l / k) * (l / k)) * t_1; else tmp = t_1 * ((l * (l / k)) / k); end tmp_2 = tmp; end
code[t_, l_, k_] := Block[{t$95$1 = N[(2.0 * N[(1.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, 5e-92], N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[(N[(l * N[(l / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \frac{1}{k \cdot \left(k \cdot t\right)}\\
\mathbf{if}\;k \leq 5 \cdot 10^{-92}:\\
\;\;\;\;\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{\ell \cdot \frac{\ell}{k}}{k}\\
\end{array}
\end{array}
if k < 5.00000000000000011e-92Initial program 33.0%
associate-/r*33.0%
*-commutative33.0%
associate-/r*38.3%
associate-*r/39.7%
associate-/l*38.4%
+-commutative38.4%
unpow238.4%
sqr-neg38.4%
distribute-frac-neg38.4%
distribute-frac-neg38.4%
unpow238.4%
associate--l+43.1%
metadata-eval43.1%
+-rgt-identity43.1%
unpow243.1%
distribute-frac-neg43.1%
Simplified43.1%
Taylor expanded in k around inf 67.7%
*-commutative67.7%
times-frac66.3%
associate-*l*66.3%
unpow266.3%
unpow266.3%
times-frac86.2%
Simplified86.2%
Taylor expanded in k around 0 73.6%
unpow273.6%
associate-*l*76.8%
Simplified76.8%
if 5.00000000000000011e-92 < k Initial program 23.5%
associate-/r*23.7%
*-commutative23.7%
associate-/r*27.7%
associate-*r/27.6%
associate-/l*27.7%
+-commutative27.7%
unpow227.7%
sqr-neg27.7%
distribute-frac-neg27.7%
distribute-frac-neg27.7%
unpow227.7%
associate--l+41.2%
metadata-eval41.2%
+-rgt-identity41.2%
unpow241.2%
distribute-frac-neg41.2%
Simplified41.2%
Taylor expanded in k around inf 73.2%
*-commutative73.2%
times-frac76.5%
associate-*l*76.5%
unpow276.5%
unpow276.5%
times-frac95.4%
Simplified95.4%
Taylor expanded in k around 0 64.5%
unpow264.5%
associate-*l*64.5%
Simplified64.5%
associate-*r/66.4%
Applied egg-rr66.4%
Final simplification72.6%
(FPCore (t l k) :precision binary64 (* (* (/ l k) (/ l k)) (* 2.0 (/ 1.0 (* k (* k t))))))
double code(double t, double l, double k) {
return ((l / k) * (l / k)) * (2.0 * (1.0 / (k * (k * t))));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l / k) * (l / k)) * (2.0d0 * (1.0d0 / (k * (k * t))))
end function
public static double code(double t, double l, double k) {
return ((l / k) * (l / k)) * (2.0 * (1.0 / (k * (k * t))));
}
def code(t, l, k): return ((l / k) * (l / k)) * (2.0 * (1.0 / (k * (k * t))))
function code(t, l, k) return Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(2.0 * Float64(1.0 / Float64(k * Float64(k * t))))) end
function tmp = code(t, l, k) tmp = ((l / k) * (l / k)) * (2.0 * (1.0 / (k * (k * t)))); end
code[t_, l_, k_] := N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(1.0 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \left(2 \cdot \frac{1}{k \cdot \left(k \cdot t\right)}\right)
\end{array}
Initial program 29.2%
associate-/r*29.3%
*-commutative29.3%
associate-/r*34.0%
associate-*r/34.9%
associate-/l*34.1%
+-commutative34.1%
unpow234.1%
sqr-neg34.1%
distribute-frac-neg34.1%
distribute-frac-neg34.1%
unpow234.1%
associate--l+42.3%
metadata-eval42.3%
+-rgt-identity42.3%
unpow242.3%
distribute-frac-neg42.3%
Simplified42.3%
Taylor expanded in k around inf 69.9%
*-commutative69.9%
times-frac70.4%
associate-*l*70.4%
unpow270.4%
unpow270.4%
times-frac89.9%
Simplified89.9%
Taylor expanded in k around 0 69.9%
unpow269.9%
associate-*l*71.8%
Simplified71.8%
Final simplification71.8%
(FPCore (t l k) :precision binary64 (* (* l l) (/ -0.3333333333333333 (* k (* k t)))))
double code(double t, double l, double k) {
return (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (l * l) * ((-0.3333333333333333d0) / (k * (k * t)))
end function
public static double code(double t, double l, double k) {
return (l * l) * (-0.3333333333333333 / (k * (k * t)));
}
def code(t, l, k): return (l * l) * (-0.3333333333333333 / (k * (k * t)))
function code(t, l, k) return Float64(Float64(l * l) * Float64(-0.3333333333333333 / Float64(k * Float64(k * t)))) end
function tmp = code(t, l, k) tmp = (l * l) * (-0.3333333333333333 / (k * (k * t))); end
code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] * N[(-0.3333333333333333 / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\ell \cdot \ell\right) \cdot \frac{-0.3333333333333333}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 29.2%
associate-/r*29.3%
*-commutative29.3%
associate-/r*34.0%
associate-*r/34.9%
associate-/l*34.1%
+-commutative34.1%
unpow234.1%
sqr-neg34.1%
distribute-frac-neg34.1%
distribute-frac-neg34.1%
unpow234.1%
associate--l+42.3%
metadata-eval42.3%
+-rgt-identity42.3%
unpow242.3%
distribute-frac-neg42.3%
Simplified42.3%
Taylor expanded in k around 0 29.5%
+-commutative29.5%
fma-def29.5%
*-commutative29.5%
associate-/r*29.6%
unpow229.6%
associate-/l*29.9%
associate-*r/29.9%
times-frac31.3%
unpow231.3%
unpow231.3%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in l around 0 39.0%
unpow239.0%
associate-*r/39.0%
metadata-eval39.0%
*-commutative39.0%
sub-neg39.0%
associate-/r*39.0%
associate-*r/39.0%
metadata-eval39.0%
distribute-neg-frac39.0%
metadata-eval39.0%
unpow239.0%
associate-*l*43.5%
Simplified43.5%
Taylor expanded in k around inf 27.4%
*-commutative27.4%
unpow227.4%
Simplified27.4%
Taylor expanded in t around 0 27.4%
unpow227.4%
associate-*r*27.7%
Simplified27.7%
Final simplification27.7%
(FPCore (t l k) :precision binary64 (/ (* (* l l) -0.3333333333333333) (* k (* k t))))
double code(double t, double l, double k) {
return ((l * l) * -0.3333333333333333) / (k * (k * t));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = ((l * l) * (-0.3333333333333333d0)) / (k * (k * t))
end function
public static double code(double t, double l, double k) {
return ((l * l) * -0.3333333333333333) / (k * (k * t));
}
def code(t, l, k): return ((l * l) * -0.3333333333333333) / (k * (k * t))
function code(t, l, k) return Float64(Float64(Float64(l * l) * -0.3333333333333333) / Float64(k * Float64(k * t))) end
function tmp = code(t, l, k) tmp = ((l * l) * -0.3333333333333333) / (k * (k * t)); end
code[t_, l_, k_] := N[(N[(N[(l * l), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\ell \cdot \ell\right) \cdot -0.3333333333333333}{k \cdot \left(k \cdot t\right)}
\end{array}
Initial program 29.2%
associate-/r*29.3%
*-commutative29.3%
associate-/r*34.0%
associate-*r/34.9%
associate-/l*34.1%
+-commutative34.1%
unpow234.1%
sqr-neg34.1%
distribute-frac-neg34.1%
distribute-frac-neg34.1%
unpow234.1%
associate--l+42.3%
metadata-eval42.3%
+-rgt-identity42.3%
unpow242.3%
distribute-frac-neg42.3%
Simplified42.3%
Taylor expanded in k around 0 29.5%
+-commutative29.5%
fma-def29.5%
*-commutative29.5%
associate-/r*29.6%
unpow229.6%
associate-/l*29.9%
associate-*r/29.9%
times-frac31.3%
unpow231.3%
unpow231.3%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in l around 0 39.0%
unpow239.0%
associate-*r/39.0%
metadata-eval39.0%
*-commutative39.0%
sub-neg39.0%
associate-/r*39.0%
associate-*r/39.0%
metadata-eval39.0%
distribute-neg-frac39.0%
metadata-eval39.0%
unpow239.0%
associate-*l*43.5%
Simplified43.5%
Taylor expanded in k around inf 27.4%
*-commutative27.4%
unpow227.4%
Simplified27.4%
associate-*r/27.4%
associate-*r*27.7%
*-commutative27.7%
*-commutative27.7%
Applied egg-rr27.7%
Final simplification27.7%
(FPCore (t l k) :precision binary64 (/ (/ (* (* l l) -0.3333333333333333) k) (* k t)))
double code(double t, double l, double k) {
return (((l * l) * -0.3333333333333333) / k) / (k * t);
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (((l * l) * (-0.3333333333333333d0)) / k) / (k * t)
end function
public static double code(double t, double l, double k) {
return (((l * l) * -0.3333333333333333) / k) / (k * t);
}
def code(t, l, k): return (((l * l) * -0.3333333333333333) / k) / (k * t)
function code(t, l, k) return Float64(Float64(Float64(Float64(l * l) * -0.3333333333333333) / k) / Float64(k * t)) end
function tmp = code(t, l, k) tmp = (((l * l) * -0.3333333333333333) / k) / (k * t); end
code[t_, l_, k_] := N[(N[(N[(N[(l * l), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / k), $MachinePrecision] / N[(k * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\left(\ell \cdot \ell\right) \cdot -0.3333333333333333}{k}}{k \cdot t}
\end{array}
Initial program 29.2%
associate-/r*29.3%
*-commutative29.3%
associate-/r*34.0%
associate-*r/34.9%
associate-/l*34.1%
+-commutative34.1%
unpow234.1%
sqr-neg34.1%
distribute-frac-neg34.1%
distribute-frac-neg34.1%
unpow234.1%
associate--l+42.3%
metadata-eval42.3%
+-rgt-identity42.3%
unpow242.3%
distribute-frac-neg42.3%
Simplified42.3%
Taylor expanded in k around 0 29.5%
+-commutative29.5%
fma-def29.5%
*-commutative29.5%
associate-/r*29.6%
unpow229.6%
associate-/l*29.9%
associate-*r/29.9%
times-frac31.3%
unpow231.3%
unpow231.3%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in l around 0 39.0%
unpow239.0%
associate-*r/39.0%
metadata-eval39.0%
*-commutative39.0%
sub-neg39.0%
associate-/r*39.0%
associate-*r/39.0%
metadata-eval39.0%
distribute-neg-frac39.0%
metadata-eval39.0%
unpow239.0%
associate-*l*43.5%
Simplified43.5%
Taylor expanded in k around inf 27.4%
*-commutative27.4%
unpow227.4%
Simplified27.4%
Taylor expanded in l around 0 27.4%
unpow227.4%
unpow227.4%
associate-*r*27.7%
associate-*r/27.7%
associate-/r*28.0%
Simplified28.0%
Final simplification28.0%
herbie shell --seed 2023278
(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))))