
(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 11 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}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (/ l_m (sin k))) (t_3 (/ (cos k) t_m)))
(*
t_s
(if (<= l_m 3.8e-169)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(if (<= l_m 2.7e+222)
(* (* 2.0 (pow k -2.0)) (* (pow t_2 2.0) t_3))
(if (<= l_m 5.5e+240)
(pow (* (sqrt t_3) (* t_2 (/ (sqrt 2.0) k))) 2.0)
(/
2.0
(*
(* (* (sin k) (pow (/ (pow t_m 1.5) l_m) 2.0)) (tan k))
(* (/ k t_m) (/ k t_m))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = l_m / sin(k);
double t_3 = cos(k) / t_m;
double tmp;
if (l_m <= 3.8e-169) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if (l_m <= 2.7e+222) {
tmp = (2.0 * pow(k, -2.0)) * (pow(t_2, 2.0) * t_3);
} else if (l_m <= 5.5e+240) {
tmp = pow((sqrt(t_3) * (t_2 * (sqrt(2.0) / k))), 2.0);
} else {
tmp = 2.0 / (((sin(k) * pow((pow(t_m, 1.5) / l_m), 2.0)) * tan(k)) * ((k / t_m) * (k / t_m)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_2 = l_m / sin(k)
t_3 = cos(k) / t_m
if (l_m <= 3.8d-169) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else if (l_m <= 2.7d+222) then
tmp = (2.0d0 * (k ** (-2.0d0))) * ((t_2 ** 2.0d0) * t_3)
else if (l_m <= 5.5d+240) then
tmp = (sqrt(t_3) * (t_2 * (sqrt(2.0d0) / k))) ** 2.0d0
else
tmp = 2.0d0 / (((sin(k) * (((t_m ** 1.5d0) / l_m) ** 2.0d0)) * tan(k)) * ((k / t_m) * (k / t_m)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = l_m / Math.sin(k);
double t_3 = Math.cos(k) / t_m;
double tmp;
if (l_m <= 3.8e-169) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if (l_m <= 2.7e+222) {
tmp = (2.0 * Math.pow(k, -2.0)) * (Math.pow(t_2, 2.0) * t_3);
} else if (l_m <= 5.5e+240) {
tmp = Math.pow((Math.sqrt(t_3) * (t_2 * (Math.sqrt(2.0) / k))), 2.0);
} else {
tmp = 2.0 / (((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l_m), 2.0)) * Math.tan(k)) * ((k / t_m) * (k / t_m)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = l_m / math.sin(k) t_3 = math.cos(k) / t_m tmp = 0 if l_m <= 3.8e-169: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif l_m <= 2.7e+222: tmp = (2.0 * math.pow(k, -2.0)) * (math.pow(t_2, 2.0) * t_3) elif l_m <= 5.5e+240: tmp = math.pow((math.sqrt(t_3) * (t_2 * (math.sqrt(2.0) / k))), 2.0) else: tmp = 2.0 / (((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l_m), 2.0)) * math.tan(k)) * ((k / t_m) * (k / t_m))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = Float64(l_m / sin(k)) t_3 = Float64(cos(k) / t_m) tmp = 0.0 if (l_m <= 3.8e-169) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); elseif (l_m <= 2.7e+222) tmp = Float64(Float64(2.0 * (k ^ -2.0)) * Float64((t_2 ^ 2.0) * t_3)); elseif (l_m <= 5.5e+240) tmp = Float64(sqrt(t_3) * Float64(t_2 * Float64(sqrt(2.0) / k))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l_m) ^ 2.0)) * tan(k)) * Float64(Float64(k / t_m) * Float64(k / t_m)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = l_m / sin(k); t_3 = cos(k) / t_m; tmp = 0.0; if (l_m <= 3.8e-169) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); elseif (l_m <= 2.7e+222) tmp = (2.0 * (k ^ -2.0)) * ((t_2 ^ 2.0) * t_3); elseif (l_m <= 5.5e+240) tmp = (sqrt(t_3) * (t_2 * (sqrt(2.0) / k))) ^ 2.0; else tmp = 2.0 / (((sin(k) * (((t_m ^ 1.5) / l_m) ^ 2.0)) * tan(k)) * ((k / t_m) * (k / t_m))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l$95$m, 3.8e-169], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 2.7e+222], N[(N[(2.0 * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$2, 2.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 5.5e+240], N[Power[N[(N[Sqrt[t$95$3], $MachinePrecision] * N[(t$95$2 * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{l_m}{\sin k}\\
t_3 := \frac{\cos k}{t_m}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 3.8 \cdot 10^{-169}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{elif}\;l_m \leq 2.7 \cdot 10^{+222}:\\
\;\;\;\;\left(2 \cdot {k}^{-2}\right) \cdot \left({t_2}^{2} \cdot t_3\right)\\
\mathbf{elif}\;l_m \leq 5.5 \cdot 10^{+240}:\\
\;\;\;\;{\left(\sqrt{t_3} \cdot \left(t_2 \cdot \frac{\sqrt{2}}{k}\right)\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{l_m}\right)}^{2}\right) \cdot \tan k\right) \cdot \left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right)}\\
\end{array}
\end{array}
\end{array}
if l < 3.8e-169Initial program 29.2%
associate-/r*29.2%
*-commutative29.2%
associate-*l*29.2%
associate-*l/29.8%
+-commutative29.8%
unpow229.8%
sqr-neg29.8%
distribute-frac-neg29.8%
distribute-frac-neg29.8%
unpow229.8%
associate--l+36.0%
metadata-eval36.0%
+-rgt-identity36.0%
unpow236.0%
distribute-frac-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
Taylor expanded in k around 0 56.2%
add-sqr-sqrt38.8%
pow238.8%
sqrt-div24.8%
unpow224.8%
sqrt-prod4.9%
add-sqr-sqrt28.2%
sqrt-prod28.7%
sqrt-pow131.1%
metadata-eval31.1%
Applied egg-rr31.1%
if 3.8e-169 < l < 2.70000000000000013e222Initial program 28.8%
associate-/r*28.8%
*-commutative28.8%
associate-*l*28.8%
associate-*l/31.8%
+-commutative31.8%
unpow231.8%
sqr-neg31.8%
distribute-frac-neg31.8%
distribute-frac-neg31.8%
unpow231.8%
associate--l+45.6%
metadata-eval45.6%
+-rgt-identity45.6%
unpow245.6%
distribute-frac-neg45.6%
distribute-frac-neg45.6%
Simplified45.6%
Taylor expanded in k around inf 80.4%
associate-*r/80.4%
times-frac81.2%
associate-/l*81.2%
*-commutative81.2%
associate-/l*81.2%
Simplified81.2%
associate-/r/81.6%
Applied egg-rr81.6%
expm1-log1p-u43.9%
expm1-udef31.3%
Applied egg-rr33.5%
expm1-def41.3%
expm1-log1p80.5%
associate-*l*84.1%
Simplified84.1%
if 2.70000000000000013e222 < l < 5.5e240Initial program 50.0%
associate-/r*50.0%
*-commutative50.0%
associate-*l*50.0%
associate-*l/50.0%
+-commutative50.0%
unpow250.0%
sqr-neg50.0%
distribute-frac-neg50.0%
distribute-frac-neg50.0%
unpow250.0%
associate--l+50.0%
metadata-eval50.0%
+-rgt-identity50.0%
unpow250.0%
distribute-frac-neg50.0%
distribute-frac-neg50.0%
Simplified50.0%
Taylor expanded in k around inf 50.0%
associate-*r/50.0%
times-frac50.8%
associate-/l*50.8%
*-commutative50.8%
associate-/l*50.8%
Simplified50.8%
associate-/r/50.8%
Applied egg-rr50.8%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr25.0%
*-commutative25.0%
associate-*l*25.0%
Simplified25.0%
if 5.5e240 < l Initial program 60.0%
+-commutative60.0%
associate--l+60.0%
metadata-eval60.0%
+-rgt-identity60.0%
unpow260.0%
frac-2neg60.0%
frac-times30.0%
Applied egg-rr30.0%
add-sqr-sqrt0.0%
pow20.0%
sqrt-div0.0%
sqrt-pow10.0%
metadata-eval0.0%
sqrt-prod0.0%
add-sqr-sqrt0.0%
Applied egg-rr0.0%
times-frac10.0%
frac-2neg10.0%
Applied egg-rr10.0%
Final simplification46.7%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= l_m 2.55e-169)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(if (<= l_m 2.4e+229)
(* (* 2.0 (pow k -2.0)) (* (pow (/ l_m (sin k)) 2.0) (/ (cos k) t_m)))
(/
2.0
(*
(* (* (sin k) (pow (/ (pow t_m 1.5) l_m) 2.0)) (tan k))
(* (/ k t_m) (/ k t_m))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 2.55e-169) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if (l_m <= 2.4e+229) {
tmp = (2.0 * pow(k, -2.0)) * (pow((l_m / sin(k)), 2.0) * (cos(k) / t_m));
} else {
tmp = 2.0 / (((sin(k) * pow((pow(t_m, 1.5) / l_m), 2.0)) * tan(k)) * ((k / t_m) * (k / t_m)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (l_m <= 2.55d-169) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else if (l_m <= 2.4d+229) then
tmp = (2.0d0 * (k ** (-2.0d0))) * (((l_m / sin(k)) ** 2.0d0) * (cos(k) / t_m))
else
tmp = 2.0d0 / (((sin(k) * (((t_m ** 1.5d0) / l_m) ** 2.0d0)) * tan(k)) * ((k / t_m) * (k / t_m)))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 2.55e-169) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if (l_m <= 2.4e+229) {
tmp = (2.0 * Math.pow(k, -2.0)) * (Math.pow((l_m / Math.sin(k)), 2.0) * (Math.cos(k) / t_m));
} else {
tmp = 2.0 / (((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l_m), 2.0)) * Math.tan(k)) * ((k / t_m) * (k / t_m)));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if l_m <= 2.55e-169: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif l_m <= 2.4e+229: tmp = (2.0 * math.pow(k, -2.0)) * (math.pow((l_m / math.sin(k)), 2.0) * (math.cos(k) / t_m)) else: tmp = 2.0 / (((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l_m), 2.0)) * math.tan(k)) * ((k / t_m) * (k / t_m))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (l_m <= 2.55e-169) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); elseif (l_m <= 2.4e+229) tmp = Float64(Float64(2.0 * (k ^ -2.0)) * Float64((Float64(l_m / sin(k)) ^ 2.0) * Float64(cos(k) / t_m))); else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l_m) ^ 2.0)) * tan(k)) * Float64(Float64(k / t_m) * Float64(k / t_m)))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (l_m <= 2.55e-169) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); elseif (l_m <= 2.4e+229) tmp = (2.0 * (k ^ -2.0)) * (((l_m / sin(k)) ^ 2.0) * (cos(k) / t_m)); else tmp = 2.0 / (((sin(k) * (((t_m ^ 1.5) / l_m) ^ 2.0)) * tan(k)) * ((k / t_m) * (k / t_m))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[l$95$m, 2.55e-169], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 2.4e+229], N[(N[(2.0 * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 2.55 \cdot 10^{-169}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{elif}\;l_m \leq 2.4 \cdot 10^{+229}:\\
\;\;\;\;\left(2 \cdot {k}^{-2}\right) \cdot \left({\left(\frac{l_m}{\sin k}\right)}^{2} \cdot \frac{\cos k}{t_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{l_m}\right)}^{2}\right) \cdot \tan k\right) \cdot \left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right)}\\
\end{array}
\end{array}
if l < 2.54999999999999999e-169Initial program 29.2%
associate-/r*29.2%
*-commutative29.2%
associate-*l*29.2%
associate-*l/29.8%
+-commutative29.8%
unpow229.8%
sqr-neg29.8%
distribute-frac-neg29.8%
distribute-frac-neg29.8%
unpow229.8%
associate--l+36.0%
metadata-eval36.0%
+-rgt-identity36.0%
unpow236.0%
distribute-frac-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
Taylor expanded in k around 0 56.2%
add-sqr-sqrt38.8%
pow238.8%
sqrt-div24.8%
unpow224.8%
sqrt-prod4.9%
add-sqr-sqrt28.2%
sqrt-prod28.7%
sqrt-pow131.1%
metadata-eval31.1%
Applied egg-rr31.1%
if 2.54999999999999999e-169 < l < 2.4000000000000001e229Initial program 29.3%
associate-/r*29.3%
*-commutative29.3%
associate-*l*29.3%
associate-*l/32.3%
+-commutative32.3%
unpow232.3%
sqr-neg32.3%
distribute-frac-neg32.3%
distribute-frac-neg32.3%
unpow232.3%
associate--l+45.7%
metadata-eval45.7%
+-rgt-identity45.7%
unpow245.7%
distribute-frac-neg45.7%
distribute-frac-neg45.7%
Simplified45.7%
Taylor expanded in k around inf 79.7%
associate-*r/79.7%
times-frac80.5%
associate-/l*80.5%
*-commutative80.5%
associate-/l*80.5%
Simplified80.5%
associate-/r/80.9%
Applied egg-rr80.9%
expm1-log1p-u42.8%
expm1-udef30.6%
Applied egg-rr32.7%
expm1-def40.3%
expm1-log1p79.8%
associate-*l*83.3%
Simplified83.3%
if 2.4000000000000001e229 < l Initial program 58.3%
+-commutative58.3%
associate--l+58.3%
metadata-eval58.3%
+-rgt-identity58.3%
unpow258.3%
frac-2neg58.3%
frac-times25.0%
Applied egg-rr25.0%
add-sqr-sqrt0.0%
pow20.0%
sqrt-div0.0%
sqrt-pow10.0%
metadata-eval0.0%
sqrt-prod0.3%
add-sqr-sqrt0.3%
Applied egg-rr0.3%
times-frac8.6%
frac-2neg8.6%
Applied egg-rr8.6%
Final simplification46.8%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= l_m 2.4e-161)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(if (<= l_m 1.72e+208)
(* 2.0 (* (pow (/ l_m (sin k)) 2.0) (/ (cos k) (* (pow k 2.0) t_m))))
(/
2.0
(*
(* (/ k t_m) (/ k t_m))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l_m) (/ t_m l_m))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 2.4e-161) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if (l_m <= 1.72e+208) {
tmp = 2.0 * (pow((l_m / sin(k)), 2.0) * (cos(k) / (pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (l_m <= 2.4d-161) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else if (l_m <= 1.72d+208) then
tmp = 2.0d0 * (((l_m / sin(k)) ** 2.0d0) * (cos(k) / ((k ** 2.0d0) * t_m)))
else
tmp = 2.0d0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ** 2.0d0) / l_m) * (t_m / l_m)))))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 2.4e-161) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if (l_m <= 1.72e+208) {
tmp = 2.0 * (Math.pow((l_m / Math.sin(k)), 2.0) * (Math.cos(k) / (Math.pow(k, 2.0) * t_m)));
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if l_m <= 2.4e-161: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif l_m <= 1.72e+208: tmp = 2.0 * (math.pow((l_m / math.sin(k)), 2.0) * (math.cos(k) / (math.pow(k, 2.0) * t_m))) else: tmp = 2.0 / (((k / t_m) * (k / t_m)) * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l_m) * (t_m / l_m))))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (l_m <= 2.4e-161) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); elseif (l_m <= 1.72e+208) tmp = Float64(2.0 * Float64((Float64(l_m / sin(k)) ^ 2.0) * Float64(cos(k) / Float64((k ^ 2.0) * t_m)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / t_m) * Float64(k / t_m)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l_m) * Float64(t_m / l_m)))))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (l_m <= 2.4e-161) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); elseif (l_m <= 1.72e+208) tmp = 2.0 * (((l_m / sin(k)) ^ 2.0) * (cos(k) / ((k ^ 2.0) * t_m))); else tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l_m) * (t_m / l_m))))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[l$95$m, 2.4e-161], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.72e+208], N[(2.0 * N[(N[Power[N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 2.4 \cdot 10^{-161}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{elif}\;l_m \leq 1.72 \cdot 10^{+208}:\\
\;\;\;\;2 \cdot \left({\left(\frac{l_m}{\sin k}\right)}^{2} \cdot \frac{\cos k}{{k}^{2} \cdot t_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{l_m} \cdot \frac{t_m}{l_m}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 2.39999999999999999e-161Initial program 29.3%
associate-/r*29.3%
*-commutative29.3%
associate-*l*29.3%
associate-*l/29.9%
+-commutative29.9%
unpow229.9%
sqr-neg29.9%
distribute-frac-neg29.9%
distribute-frac-neg29.9%
unpow229.9%
associate--l+36.0%
metadata-eval36.0%
+-rgt-identity36.0%
unpow236.0%
distribute-frac-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
Taylor expanded in k around 0 55.7%
add-sqr-sqrt38.7%
pow238.7%
sqrt-div25.0%
unpow225.0%
sqrt-prod5.4%
add-sqr-sqrt28.3%
sqrt-prod29.4%
sqrt-pow131.7%
metadata-eval31.7%
Applied egg-rr31.7%
if 2.39999999999999999e-161 < l < 1.7199999999999999e208Initial program 29.0%
associate-/r*29.0%
*-commutative29.0%
associate-*l*29.0%
associate-*l/32.2%
+-commutative32.2%
unpow232.2%
sqr-neg32.2%
distribute-frac-neg32.2%
distribute-frac-neg32.2%
unpow232.2%
associate--l+46.7%
metadata-eval46.7%
+-rgt-identity46.7%
unpow246.7%
distribute-frac-neg46.7%
distribute-frac-neg46.7%
Simplified46.7%
Taylor expanded in k around inf 82.0%
associate-*r/82.0%
times-frac82.8%
associate-/l*82.8%
*-commutative82.8%
associate-/l*82.9%
Simplified82.9%
associate-/r/83.3%
Applied egg-rr83.3%
Taylor expanded in k around inf 82.0%
*-commutative82.0%
associate-*r*82.0%
times-frac82.0%
*-commutative82.0%
unpow282.0%
unpow282.0%
times-frac82.1%
unpow282.1%
Simplified82.1%
if 1.7199999999999999e208 < l Initial program 53.3%
+-commutative53.3%
associate--l+53.3%
metadata-eval53.3%
+-rgt-identity53.3%
unpow253.3%
frac-2neg53.3%
frac-times20.0%
Applied egg-rr20.0%
unpow320.0%
times-frac40.0%
pow240.0%
Applied egg-rr40.0%
times-frac6.9%
frac-2neg6.9%
Applied egg-rr73.6%
Final simplification49.1%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= l_m 6.3e-161)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(if (<= l_m 1.3e+208)
(* 2.0 (/ (pow (/ l_m (sin k)) 2.0) (/ (pow k 2.0) (/ (cos k) t_m))))
(/
2.0
(*
(* (/ k t_m) (/ k t_m))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l_m) (/ t_m l_m))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 6.3e-161) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else if (l_m <= 1.3e+208) {
tmp = 2.0 * (pow((l_m / sin(k)), 2.0) / (pow(k, 2.0) / (cos(k) / t_m)));
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (l_m <= 6.3d-161) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else if (l_m <= 1.3d+208) then
tmp = 2.0d0 * (((l_m / sin(k)) ** 2.0d0) / ((k ** 2.0d0) / (cos(k) / t_m)))
else
tmp = 2.0d0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ** 2.0d0) / l_m) * (t_m / l_m)))))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 6.3e-161) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else if (l_m <= 1.3e+208) {
tmp = 2.0 * (Math.pow((l_m / Math.sin(k)), 2.0) / (Math.pow(k, 2.0) / (Math.cos(k) / t_m)));
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if l_m <= 6.3e-161: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) elif l_m <= 1.3e+208: tmp = 2.0 * (math.pow((l_m / math.sin(k)), 2.0) / (math.pow(k, 2.0) / (math.cos(k) / t_m))) else: tmp = 2.0 / (((k / t_m) * (k / t_m)) * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l_m) * (t_m / l_m))))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (l_m <= 6.3e-161) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); elseif (l_m <= 1.3e+208) tmp = Float64(2.0 * Float64((Float64(l_m / sin(k)) ^ 2.0) / Float64((k ^ 2.0) / Float64(cos(k) / t_m)))); else tmp = Float64(2.0 / Float64(Float64(Float64(k / t_m) * Float64(k / t_m)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l_m) * Float64(t_m / l_m)))))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (l_m <= 6.3e-161) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); elseif (l_m <= 1.3e+208) tmp = 2.0 * (((l_m / sin(k)) ^ 2.0) / ((k ^ 2.0) / (cos(k) / t_m))); else tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l_m) * (t_m / l_m))))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[l$95$m, 6.3e-161], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.3e+208], N[(2.0 * N[(N[Power[N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 6.3 \cdot 10^{-161}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{elif}\;l_m \leq 1.3 \cdot 10^{+208}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{l_m}{\sin k}\right)}^{2}}{\frac{{k}^{2}}{\frac{\cos k}{t_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{l_m} \cdot \frac{t_m}{l_m}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 6.3000000000000001e-161Initial program 29.3%
associate-/r*29.3%
*-commutative29.3%
associate-*l*29.3%
associate-*l/29.9%
+-commutative29.9%
unpow229.9%
sqr-neg29.9%
distribute-frac-neg29.9%
distribute-frac-neg29.9%
unpow229.9%
associate--l+36.0%
metadata-eval36.0%
+-rgt-identity36.0%
unpow236.0%
distribute-frac-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
Taylor expanded in k around 0 55.7%
add-sqr-sqrt38.7%
pow238.7%
sqrt-div25.0%
unpow225.0%
sqrt-prod5.4%
add-sqr-sqrt28.3%
sqrt-prod29.4%
sqrt-pow131.7%
metadata-eval31.7%
Applied egg-rr31.7%
if 6.3000000000000001e-161 < l < 1.3e208Initial program 29.0%
+-commutative29.0%
associate--l+42.2%
metadata-eval42.2%
+-rgt-identity42.2%
unpow242.2%
frac-2neg42.2%
frac-times26.2%
Applied egg-rr26.2%
add-sqr-sqrt10.3%
pow210.3%
sqrt-div10.2%
sqrt-pow110.7%
metadata-eval10.7%
sqrt-prod12.8%
add-sqr-sqrt12.8%
Applied egg-rr12.8%
Taylor expanded in t around 0 82.0%
associate-/l*82.9%
unpow282.9%
*-commutative82.9%
times-frac83.3%
times-frac85.8%
unpow285.8%
unpow285.8%
times-frac85.7%
unpow285.7%
times-frac83.2%
unpow283.2%
Simplified83.2%
div-inv83.2%
Applied egg-rr83.2%
associate-/r/83.2%
associate-*l/83.2%
associate-*l*83.2%
*-lft-identity83.2%
associate-/l*83.0%
Simplified83.0%
if 1.3e208 < l Initial program 53.3%
+-commutative53.3%
associate--l+53.3%
metadata-eval53.3%
+-rgt-identity53.3%
unpow253.3%
frac-2neg53.3%
frac-times20.0%
Applied egg-rr20.0%
unpow320.0%
times-frac40.0%
pow240.0%
Applied egg-rr40.0%
times-frac6.9%
frac-2neg6.9%
Applied egg-rr73.6%
Final simplification49.4%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= l_m 1.7e-170)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(* (* 2.0 (pow k -2.0)) (* (pow (/ l_m (sin k)) 2.0) (/ (cos k) t_m))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 1.7e-170) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = (2.0 * pow(k, -2.0)) * (pow((l_m / sin(k)), 2.0) * (cos(k) / t_m));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (l_m <= 1.7d-170) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = (2.0d0 * (k ** (-2.0d0))) * (((l_m / sin(k)) ** 2.0d0) * (cos(k) / t_m))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 1.7e-170) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = (2.0 * Math.pow(k, -2.0)) * (Math.pow((l_m / Math.sin(k)), 2.0) * (Math.cos(k) / t_m));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if l_m <= 1.7e-170: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = (2.0 * math.pow(k, -2.0)) * (math.pow((l_m / math.sin(k)), 2.0) * (math.cos(k) / t_m)) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (l_m <= 1.7e-170) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(Float64(2.0 * (k ^ -2.0)) * Float64((Float64(l_m / sin(k)) ^ 2.0) * Float64(cos(k) / t_m))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (l_m <= 1.7e-170) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = (2.0 * (k ^ -2.0)) * (((l_m / sin(k)) ^ 2.0) * (cos(k) / t_m)); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[l$95$m, 1.7e-170], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 1.7 \cdot 10^{-170}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(2 \cdot {k}^{-2}\right) \cdot \left({\left(\frac{l_m}{\sin k}\right)}^{2} \cdot \frac{\cos k}{t_m}\right)\\
\end{array}
\end{array}
if l < 1.70000000000000006e-170Initial program 29.2%
associate-/r*29.2%
*-commutative29.2%
associate-*l*29.2%
associate-*l/29.8%
+-commutative29.8%
unpow229.8%
sqr-neg29.8%
distribute-frac-neg29.8%
distribute-frac-neg29.8%
unpow229.8%
associate--l+36.0%
metadata-eval36.0%
+-rgt-identity36.0%
unpow236.0%
distribute-frac-neg36.0%
distribute-frac-neg36.0%
Simplified36.0%
Taylor expanded in k around 0 56.2%
add-sqr-sqrt38.8%
pow238.8%
sqrt-div24.8%
unpow224.8%
sqrt-prod4.9%
add-sqr-sqrt28.2%
sqrt-prod28.7%
sqrt-pow131.1%
metadata-eval31.1%
Applied egg-rr31.1%
if 1.70000000000000006e-170 < l Initial program 33.0%
associate-/r*33.0%
*-commutative33.0%
associate-*l*33.0%
associate-*l/35.6%
+-commutative35.6%
unpow235.6%
sqr-neg35.6%
distribute-frac-neg35.6%
distribute-frac-neg35.6%
unpow235.6%
associate--l+47.3%
metadata-eval47.3%
+-rgt-identity47.3%
unpow247.3%
distribute-frac-neg47.3%
distribute-frac-neg47.3%
Simplified47.3%
Taylor expanded in k around inf 77.1%
associate-*r/77.1%
times-frac77.8%
associate-/l*77.8%
*-commutative77.8%
associate-/l*77.8%
Simplified77.8%
associate-/r/78.2%
Applied egg-rr78.2%
expm1-log1p-u39.6%
expm1-udef28.9%
Applied egg-rr30.8%
expm1-def37.4%
expm1-log1p77.2%
associate-*l*80.3%
Simplified80.3%
Final simplification49.2%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= l_m 1.25e+145)
(* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))
(/
2.0
(*
(* (/ k t_m) (/ k t_m))
(* (tan k) (* (sin k) (* (/ (pow t_m 2.0) l_m) (/ t_m l_m)))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 1.25e+145) {
tmp = 2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * ((pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (l_m <= 1.25d+145) then
tmp = 2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0)
else
tmp = 2.0d0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ** 2.0d0) / l_m) * (t_m / l_m)))))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (l_m <= 1.25e+145) {
tmp = 2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 / (((k / t_m) * (k / t_m)) * (Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l_m) * (t_m / l_m)))));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if l_m <= 1.25e+145: tmp = 2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 / (((k / t_m) * (k / t_m)) * (math.tan(k) * (math.sin(k) * ((math.pow(t_m, 2.0) / l_m) * (t_m / l_m))))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (l_m <= 1.25e+145) tmp = Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(k / t_m) * Float64(k / t_m)) * Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l_m) * Float64(t_m / l_m)))))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (l_m <= 1.25e+145) tmp = 2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0); else tmp = 2.0 / (((k / t_m) * (k / t_m)) * (tan(k) * (sin(k) * (((t_m ^ 2.0) / l_m) * (t_m / l_m))))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[l$95$m, 1.25e+145], N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 1.25 \cdot 10^{+145}:\\
\;\;\;\;2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t_m}^{2}}{l_m} \cdot \frac{t_m}{l_m}\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.24999999999999992e145Initial program 29.9%
associate-/r*29.9%
*-commutative29.9%
associate-*l*29.9%
associate-*l/31.4%
+-commutative31.4%
unpow231.4%
sqr-neg31.4%
distribute-frac-neg31.4%
distribute-frac-neg31.4%
unpow231.4%
associate--l+40.8%
metadata-eval40.8%
+-rgt-identity40.8%
unpow240.8%
distribute-frac-neg40.8%
distribute-frac-neg40.8%
Simplified40.8%
Taylor expanded in k around 0 59.5%
add-sqr-sqrt37.6%
pow237.6%
sqrt-div22.9%
unpow222.9%
sqrt-prod8.6%
add-sqr-sqrt25.4%
sqrt-prod26.2%
sqrt-pow127.9%
metadata-eval27.9%
Applied egg-rr27.9%
if 1.24999999999999992e145 < l Initial program 35.9%
+-commutative35.9%
associate--l+35.9%
metadata-eval35.9%
+-rgt-identity35.9%
unpow235.9%
frac-2neg35.9%
frac-times19.7%
Applied egg-rr19.7%
unpow319.7%
times-frac35.6%
pow235.6%
Applied egg-rr35.6%
times-frac18.4%
frac-2neg18.4%
Applied egg-rr61.2%
Final simplification31.9%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (* 2.0 (pow (/ l_m (* (pow k 2.0) (sqrt t_m))) 2.0))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * pow((l_m / (pow(k, 2.0) * sqrt(t_m))), 2.0));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l_m / ((k ** 2.0d0) * sqrt(t_m))) ** 2.0d0))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * Math.pow((l_m / (Math.pow(k, 2.0) * Math.sqrt(t_m))), 2.0));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 * math.pow((l_m / (math.pow(k, 2.0) * math.sqrt(t_m))), 2.0))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 * (Float64(l_m / Float64((k ^ 2.0) * sqrt(t_m))) ^ 2.0))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 * ((l_m / ((k ^ 2.0) * sqrt(t_m))) ^ 2.0)); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 * N[Power[N[(l$95$m / N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot {\left(\frac{l_m}{{k}^{2} \cdot \sqrt{t_m}}\right)}^{2}\right)
\end{array}
Initial program 30.6%
associate-/r*30.6%
*-commutative30.6%
associate-*l*30.6%
associate-*l/31.9%
+-commutative31.9%
unpow231.9%
sqr-neg31.9%
distribute-frac-neg31.9%
distribute-frac-neg31.9%
unpow231.9%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
unpow240.2%
distribute-frac-neg40.2%
distribute-frac-neg40.2%
Simplified40.2%
Taylor expanded in k around 0 57.4%
add-sqr-sqrt33.8%
pow233.8%
sqrt-div21.0%
unpow221.0%
sqrt-prod8.5%
add-sqr-sqrt23.2%
sqrt-prod23.9%
sqrt-pow125.4%
metadata-eval25.4%
Applied egg-rr25.4%
Final simplification25.4%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (* 2.0 (/ (/ (pow l_m 2.0) t_m) (pow k 4.0)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * ((pow(l_m, 2.0) / t_m) / pow(k, 4.0)));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l_m ** 2.0d0) / t_m) / (k ** 4.0d0)))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * ((Math.pow(l_m, 2.0) / t_m) / Math.pow(k, 4.0)));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 * ((math.pow(l_m, 2.0) / t_m) / math.pow(k, 4.0)))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l_m ^ 2.0) / t_m) / (k ^ 4.0)))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 * (((l_m ^ 2.0) / t_m) / (k ^ 4.0))); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot \frac{\frac{{l_m}^{2}}{t_m}}{{k}^{4}}\right)
\end{array}
Initial program 30.6%
associate-/r*30.6%
*-commutative30.6%
associate-*l*30.6%
associate-*l/31.9%
+-commutative31.9%
unpow231.9%
sqr-neg31.9%
distribute-frac-neg31.9%
distribute-frac-neg31.9%
unpow231.9%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
unpow240.2%
distribute-frac-neg40.2%
distribute-frac-neg40.2%
Simplified40.2%
Taylor expanded in k around 0 57.4%
*-commutative57.4%
associate-/r*56.6%
Simplified56.6%
Final simplification56.6%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (* 2.0 (/ (pow l_m 2.0) (* t_m (pow k 4.0))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * (pow(l_m, 2.0) / (t_m * pow(k, 4.0))));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 * ((l_m ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 * (Math.pow(l_m, 2.0) / (t_m * Math.pow(k, 4.0))));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 * (math.pow(l_m, 2.0) / (t_m * math.pow(k, 4.0))))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 * Float64((l_m ^ 2.0) / Float64(t_m * (k ^ 4.0))))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 * ((l_m ^ 2.0) / (t_m * (k ^ 4.0)))); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot \frac{{l_m}^{2}}{t_m \cdot {k}^{4}}\right)
\end{array}
Initial program 30.6%
associate-/r*30.6%
*-commutative30.6%
associate-*l*30.6%
associate-*l/31.9%
+-commutative31.9%
unpow231.9%
sqr-neg31.9%
distribute-frac-neg31.9%
distribute-frac-neg31.9%
unpow231.9%
associate--l+40.2%
metadata-eval40.2%
+-rgt-identity40.2%
unpow240.2%
distribute-frac-neg40.2%
distribute-frac-neg40.2%
Simplified40.2%
Taylor expanded in k around 0 57.4%
Final simplification57.4%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (* (/ 2.0 t_m) (* (pow l_m 2.0) (pow k -4.0)))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * ((2.0 / t_m) * (pow(l_m, 2.0) * pow(k, -4.0)));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * ((2.0d0 / t_m) * ((l_m ** 2.0d0) * (k ** (-4.0d0))))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * ((2.0 / t_m) * (Math.pow(l_m, 2.0) * Math.pow(k, -4.0)));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * ((2.0 / t_m) * (math.pow(l_m, 2.0) * math.pow(k, -4.0)))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(Float64(2.0 / t_m) * Float64((l_m ^ 2.0) * (k ^ -4.0)))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * ((2.0 / t_m) * ((l_m ^ 2.0) * (k ^ -4.0))); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(\frac{2}{t_m} \cdot \left({l_m}^{2} \cdot {k}^{-4}\right)\right)
\end{array}
Initial program 30.6%
Taylor expanded in k around 0 57.4%
*-commutative57.4%
associate-/l*57.9%
Simplified57.9%
associate-/r/57.9%
div-inv57.8%
pow-flip57.8%
metadata-eval57.8%
Applied egg-rr57.8%
Final simplification57.8%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (/ 2.0 (/ t_m (/ (pow l_m 2.0) (pow k 4.0))))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / (t_m / (pow(l_m, 2.0) / pow(k, 4.0))));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 / (t_m / ((l_m ** 2.0d0) / (k ** 4.0d0))))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / (t_m / (Math.pow(l_m, 2.0) / Math.pow(k, 4.0))));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 / (t_m / (math.pow(l_m, 2.0) / math.pow(k, 4.0))))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 / Float64(t_m / Float64((l_m ^ 2.0) / (k ^ 4.0))))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 / (t_m / ((l_m ^ 2.0) / (k ^ 4.0)))); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 / N[(t$95$m / N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{\frac{t_m}{\frac{{l_m}^{2}}{{k}^{4}}}}
\end{array}
Initial program 30.6%
Taylor expanded in k around 0 57.4%
*-commutative57.4%
associate-/l*57.9%
Simplified57.9%
Final simplification57.9%
herbie shell --seed 2023319
(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))))