
(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 31 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}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (sin k) 2.0)))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) t_2)))
k)
(/
(*
(/
(* (sqrt 2.0) t_m)
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (/ t_2 (cos k))))) 2.0))
(*
(/ (sqrt 2.0) k)
(/ (pow (cbrt l) 2.0) (cbrt (* (sin k) (tan k))))))
k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(sin(k), 2.0);
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * t_2))) / k;
} else {
tmp = (((sqrt(2.0) * t_m) / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((t_2 / cos(k))))), 2.0)) * ((sqrt(2.0) / k) * (pow(cbrt(l), 2.0) / cbrt((sin(k) * tan(k)))))) / k;
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.sin(k), 2.0);
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * t_2))) / k;
} else {
tmp = (((Math.sqrt(2.0) * t_m) / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((t_2 / Math.cos(k))))), 2.0)) * ((Math.sqrt(2.0) / k) * (Math.pow(Math.cbrt(l), 2.0) / Math.cbrt((Math.sin(k) * Math.tan(k)))))) / k;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = sin(k) ^ 2.0 tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * t_2))) / k); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) * t_m) / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(t_2 / cos(k))))) ^ 2.0)) * Float64(Float64(sqrt(2.0) / k) * Float64((cbrt(l) ^ 2.0) / cbrt(Float64(sin(k) * tan(k)))))) / k); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\sin k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot t\_2}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt{2} \cdot t\_m}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\frac{t\_2}{\cos k}}\right)\right)}^{2}} \cdot \left(\frac{\sqrt{2}}{k} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\sin k \cdot \tan k}}\right)}{k}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in l around -inf 98.4%
*-commutative98.4%
associate-/l*98.4%
associate-*r*98.4%
unpow298.4%
rem-square-sqrt98.7%
associate-*r*98.8%
Simplified98.8%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt34.4%
add-cube-cbrt34.4%
times-frac34.4%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/84.4%
Simplified84.4%
frac-times77.5%
associate-*l/77.5%
associate-/r/77.5%
associate-*l/77.5%
div-inv77.5%
pow-flip77.5%
metadata-eval77.5%
Applied egg-rr77.5%
associate-/r*77.5%
associate-*l/77.5%
associate-*l/84.4%
associate-*r/84.5%
Simplified90.2%
Taylor expanded in k around inf 90.4%
Final simplification79.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 9.2e-101)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= l 9e+153)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(/
(*
(/
(* (sqrt 2.0) t_m)
(pow (* t_m (* (pow (cbrt l) -2.0) (cbrt (* (sin k) (tan k))))) 2.0))
(*
(/ (sqrt 2.0) k)
(/ (pow (cbrt l) 2.0) (* (cbrt (tan k)) (cbrt (sin k))))))
k)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 9.2e-101) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if (l <= 9e+153) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = (((sqrt(2.0) * t_m) / pow((t_m * (pow(cbrt(l), -2.0) * cbrt((sin(k) * tan(k))))), 2.0)) * ((sqrt(2.0) / k) * (pow(cbrt(l), 2.0) / (cbrt(tan(k)) * cbrt(sin(k)))))) / k;
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 9.2e-101) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if (l <= 9e+153) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = (((Math.sqrt(2.0) * t_m) / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * Math.cbrt((Math.sin(k) * Math.tan(k))))), 2.0)) * ((Math.sqrt(2.0) / k) * (Math.pow(Math.cbrt(l), 2.0) / (Math.cbrt(Math.tan(k)) * Math.cbrt(Math.sin(k)))))) / k;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 9.2e-101) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (l <= 9e+153) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) * t_m) / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * cbrt(Float64(sin(k) * tan(k))))) ^ 2.0)) * Float64(Float64(sqrt(2.0) / k) * Float64((cbrt(l) ^ 2.0) / Float64(cbrt(tan(k)) * cbrt(sin(k)))))) / k); end return Float64(t_s * tmp) end
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_, k_] := N[(t$95$s * If[LessEqual[l, 9.2e-101], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 9e+153], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \leq 9 \cdot 10^{+153}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt{2} \cdot t\_m}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)\right)}^{2}} \cdot \left(\frac{\sqrt{2}}{k} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{\sqrt[3]{\tan k} \cdot \sqrt[3]{\sin k}}\right)}{k}\\
\end{array}
\end{array}
if l < 9.1999999999999998e-101Initial program 35.3%
*-commutative35.3%
associate-/r*35.3%
Simplified41.6%
add-sqr-sqrt31.0%
Applied egg-rr30.0%
unpow230.0%
associate-/l/30.0%
associate-*l/29.5%
associate-*l/30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in k around 0 37.5%
associate-/l*37.5%
Simplified37.5%
if 9.1999999999999998e-101 < l < 9.0000000000000002e153Initial program 45.0%
*-commutative45.0%
associate-/r*45.0%
Simplified50.1%
add-sqr-sqrt50.1%
add-cube-cbrt50.0%
times-frac50.0%
Applied egg-rr79.9%
associate-/r/79.9%
associate-/r*79.9%
associate-/r/81.6%
Simplified81.6%
frac-times81.4%
associate-*l/81.4%
associate-/r/81.5%
associate-*l/81.5%
div-inv81.5%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
associate-/r*81.5%
associate-*l/81.5%
associate-*l/81.7%
associate-*r/81.6%
Simplified81.9%
Taylor expanded in l around -inf 98.0%
*-commutative98.0%
associate-/l*98.0%
associate-*r*98.0%
unpow298.0%
rem-square-sqrt98.2%
associate-*r*98.2%
Simplified98.2%
if 9.0000000000000002e153 < l Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified31.8%
add-sqr-sqrt31.8%
add-cube-cbrt31.8%
times-frac31.8%
Applied egg-rr86.0%
associate-/r/86.0%
associate-/r*86.0%
associate-/r/85.9%
Simplified85.9%
frac-times79.6%
associate-*l/79.6%
associate-/r/79.6%
associate-*l/79.6%
div-inv79.6%
pow-flip79.6%
metadata-eval79.6%
Applied egg-rr79.6%
associate-/r*79.6%
associate-*l/79.6%
associate-*l/86.0%
associate-*r/86.0%
Simplified88.5%
*-commutative88.5%
cbrt-prod88.6%
Applied egg-rr88.6%
Final simplification60.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (* (sin k) (tan k)))))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 5e+277)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(/
(*
(* (/ (sqrt 2.0) k) (/ (pow (cbrt l) 2.0) t_2))
(*
(* (sqrt 2.0) t_m)
(pow (* t_m (* (pow (cbrt l) -2.0) t_2)) -2.0)))
k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 5e+277) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = (((sqrt(2.0) / k) * (pow(cbrt(l), 2.0) / t_2)) * ((sqrt(2.0) * t_m) * pow((t_m * (pow(cbrt(l), -2.0) * t_2)), -2.0))) / k;
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 5e+277) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = (((Math.sqrt(2.0) / k) * (Math.pow(Math.cbrt(l), 2.0) / t_2)) * ((Math.sqrt(2.0) * t_m) * Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * t_2)), -2.0))) / k;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 5e+277) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) / k) * Float64((cbrt(l) ^ 2.0) / t_2)) * Float64(Float64(sqrt(2.0) * t_m) * (Float64(t_m * Float64((cbrt(l) ^ -2.0) * t_2)) ^ -2.0))) / k); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+277], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] * N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+277}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\frac{\sqrt{2}}{k} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\right) \cdot \left(\left(\sqrt{2} \cdot t\_m\right) \cdot {\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot t\_2\right)\right)}^{-2}\right)}{k}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 4.99999999999999982e277Initial program 46.8%
*-commutative46.8%
associate-/r*46.8%
Simplified53.8%
add-sqr-sqrt53.8%
add-cube-cbrt53.7%
times-frac53.7%
Applied egg-rr78.7%
associate-/r/78.7%
associate-/r*78.7%
associate-/r/79.8%
Simplified79.8%
frac-times78.5%
associate-*l/78.4%
associate-/r/78.5%
associate-*l/78.5%
div-inv78.5%
pow-flip78.5%
metadata-eval78.5%
Applied egg-rr78.5%
associate-/r*78.5%
associate-*l/78.5%
associate-*l/79.8%
associate-*r/79.8%
Simplified81.1%
Taylor expanded in l around -inf 99.3%
*-commutative99.3%
associate-/l*99.3%
associate-*r*99.3%
unpow299.3%
rem-square-sqrt99.7%
associate-*r*99.7%
Simplified99.7%
if 4.99999999999999982e277 < (*.f64 l l) Initial program 33.5%
*-commutative33.5%
associate-/r*33.5%
Simplified33.5%
add-sqr-sqrt33.5%
add-cube-cbrt33.5%
times-frac33.5%
Applied egg-rr82.7%
associate-/r/82.7%
associate-/r*82.7%
associate-/r/83.5%
Simplified83.5%
frac-times76.8%
associate-*l/76.8%
associate-/r/76.8%
associate-*l/76.8%
div-inv76.8%
pow-flip76.8%
metadata-eval76.8%
Applied egg-rr76.8%
associate-/r*76.8%
associate-*l/76.8%
associate-*l/83.6%
associate-*r/83.6%
Simplified89.2%
div-inv88.2%
pow-flip89.2%
metadata-eval89.2%
Applied egg-rr89.2%
Final simplification79.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (* (sin k) (tan k)))))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(/
(*
(* (/ (sqrt 2.0) k) (/ (pow (cbrt l) 2.0) t_2))
(* t_m (/ (sqrt 2.0) (pow (* t_2 (* t_m (pow (cbrt l) -2.0))) 2.0))))
k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = (((sqrt(2.0) / k) * (pow(cbrt(l), 2.0) / t_2)) * (t_m * (sqrt(2.0) / pow((t_2 * (t_m * pow(cbrt(l), -2.0))), 2.0)))) / k;
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = (((Math.sqrt(2.0) / k) * (Math.pow(Math.cbrt(l), 2.0) / t_2)) * (t_m * (Math.sqrt(2.0) / Math.pow((t_2 * (t_m * Math.pow(Math.cbrt(l), -2.0))), 2.0)))) / k;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) / k) * Float64((cbrt(l) ^ 2.0) / t_2)) * Float64(t_m * Float64(sqrt(2.0) / (Float64(t_2 * Float64(t_m * (cbrt(l) ^ -2.0))) ^ 2.0)))) / k); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[N[(t$95$2 * N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\frac{\sqrt{2}}{k} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\right) \cdot \left(t\_m \cdot \frac{\sqrt{2}}{{\left(t\_2 \cdot \left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{2}}\right)}{k}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in l around -inf 98.4%
*-commutative98.4%
associate-/l*98.4%
associate-*r*98.4%
unpow298.4%
rem-square-sqrt98.7%
associate-*r*98.8%
Simplified98.8%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt34.4%
add-cube-cbrt34.4%
times-frac34.4%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/84.4%
Simplified84.4%
frac-times77.5%
associate-*l/77.5%
associate-/r/77.5%
associate-*l/77.5%
div-inv77.5%
pow-flip77.5%
metadata-eval77.5%
Applied egg-rr77.5%
associate-/r*77.5%
associate-*l/77.5%
associate-*l/84.4%
associate-*r/84.5%
Simplified90.2%
associate-*l/84.1%
associate-*r/84.0%
Applied egg-rr84.0%
associate-*l/90.2%
*-commutative90.2%
associate-/l*89.1%
associate-*r*89.1%
*-commutative89.1%
associate-/l*89.1%
Simplified89.1%
Final simplification78.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (sqrt 2.0) k)) (t_3 (cbrt (* (sin k) (tan k)))))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(*
(/ (* t_m t_2) (pow (* t_3 (/ t_m (pow (cbrt l) 2.0))) 2.0))
(/ (/ t_2 (pow (cbrt l) -2.0)) t_3)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = sqrt(2.0) / k;
double t_3 = cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = ((t_m * t_2) / pow((t_3 * (t_m / pow(cbrt(l), 2.0))), 2.0)) * ((t_2 / pow(cbrt(l), -2.0)) / t_3);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.sqrt(2.0) / k;
double t_3 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = ((t_m * t_2) / Math.pow((t_3 * (t_m / Math.pow(Math.cbrt(l), 2.0))), 2.0)) * ((t_2 / Math.pow(Math.cbrt(l), -2.0)) / t_3);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(sqrt(2.0) / k) t_3 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(t_m * t_2) / (Float64(t_3 * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 2.0)) * Float64(Float64(t_2 / (cbrt(l) ^ -2.0)) / t_3)); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(t$95$m * t$95$2), $MachinePrecision] / N[Power[N[(t$95$3 * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\sqrt{2}}{k}\\
t_3 := \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m \cdot t\_2}{{\left(t\_3 \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{2}} \cdot \frac{\frac{t\_2}{{\left(\sqrt[3]{\ell}\right)}^{-2}}}{t\_3}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in l around -inf 98.4%
*-commutative98.4%
associate-/l*98.4%
associate-*r*98.4%
unpow298.4%
rem-square-sqrt98.7%
associate-*r*98.8%
Simplified98.8%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt34.4%
add-cube-cbrt34.4%
times-frac34.4%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/84.4%
Simplified84.4%
*-un-lft-identity84.4%
associate-/l/84.4%
associate-*l/84.4%
*-commutative84.4%
div-inv84.4%
pow-flip84.4%
metadata-eval84.4%
Applied egg-rr84.4%
*-lft-identity84.4%
associate-/r*84.4%
associate-*l/84.4%
associate-*r/84.4%
*-commutative84.4%
associate-/r*84.4%
*-inverses84.4%
associate-*l/84.4%
*-lft-identity84.4%
Simplified84.4%
Final simplification77.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (cbrt l) 2.0))
(t_3 (/ (sqrt 2.0) k))
(t_4 (cbrt (* (sin k) (tan k)))))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(*
(/ (* t_m t_3) (pow (* t_4 (/ t_m t_2)) 2.0))
(/ (* t_3 t_2) t_4)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(cbrt(l), 2.0);
double t_3 = sqrt(2.0) / k;
double t_4 = cbrt((sin(k) * tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = ((t_m * t_3) / pow((t_4 * (t_m / t_2)), 2.0)) * ((t_3 * t_2) / t_4);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(Math.cbrt(l), 2.0);
double t_3 = Math.sqrt(2.0) / k;
double t_4 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = ((t_m * t_3) / Math.pow((t_4 * (t_m / t_2)), 2.0)) * ((t_3 * t_2) / t_4);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(l) ^ 2.0 t_3 = Float64(sqrt(2.0) / k) t_4 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(t_m * t_3) / (Float64(t_4 * Float64(t_m / t_2)) ^ 2.0)) * Float64(Float64(t_3 * t_2) / t_4)); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(t$95$m * t$95$3), $MachinePrecision] / N[Power[N[(t$95$4 * N[(t$95$m / t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$3 * t$95$2), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_m \cdot t\_3}{{\left(t\_4 \cdot \frac{t\_m}{t\_2}\right)}^{2}} \cdot \frac{t\_3 \cdot t\_2}{t\_4}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in l around -inf 98.4%
*-commutative98.4%
associate-/l*98.4%
associate-*r*98.4%
unpow298.4%
rem-square-sqrt98.7%
associate-*r*98.8%
Simplified98.8%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt34.4%
add-cube-cbrt34.4%
times-frac34.4%
Applied egg-rr83.6%
associate-/r/83.6%
associate-/r*83.6%
associate-/r/84.4%
Simplified84.4%
*-un-lft-identity84.4%
associate-/r/84.4%
associate-*l/84.4%
Applied egg-rr84.4%
*-lft-identity84.4%
associate-/l/71.1%
*-commutative71.1%
times-frac84.4%
*-inverses84.4%
*-lft-identity84.4%
Simplified84.4%
Final simplification77.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (* (sin k) (tan k)))))
(*
t_s
(if (<= l 9.2e-101)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= l 6.2e+150)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(/
(*
(* (/ (sqrt 2.0) k) (/ (pow (cbrt l) 2.0) t_2))
(/ (* (sqrt 2.0) t_m) (pow (* t_m (* (pow (cbrt l) -2.0) t_2)) 2.0)))
k))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt((sin(k) * tan(k)));
double tmp;
if (l <= 9.2e-101) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if (l <= 6.2e+150) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = (((sqrt(2.0) / k) * (pow(cbrt(l), 2.0) / t_2)) * ((sqrt(2.0) * t_m) / pow((t_m * (pow(cbrt(l), -2.0) * t_2)), 2.0))) / k;
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double tmp;
if (l <= 9.2e-101) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if (l <= 6.2e+150) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = (((Math.sqrt(2.0) / k) * (Math.pow(Math.cbrt(l), 2.0) / t_2)) * ((Math.sqrt(2.0) * t_m) / Math.pow((t_m * (Math.pow(Math.cbrt(l), -2.0) * t_2)), 2.0))) / k;
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(Float64(sin(k) * tan(k))) tmp = 0.0 if (l <= 9.2e-101) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (l <= 6.2e+150) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(Float64(Float64(sqrt(2.0) / k) * Float64((cbrt(l) ^ 2.0) / t_2)) * Float64(Float64(sqrt(2.0) * t_m) / (Float64(t_m * Float64((cbrt(l) ^ -2.0) * t_2)) ^ 2.0))) / k); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 9.2e-101], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 6.2e+150], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Power[N[(t$95$m * N[(N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+150}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(\frac{\sqrt{2}}{k} \cdot \frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_2}\right) \cdot \frac{\sqrt{2} \cdot t\_m}{{\left(t\_m \cdot \left({\left(\sqrt[3]{\ell}\right)}^{-2} \cdot t\_2\right)\right)}^{2}}}{k}\\
\end{array}
\end{array}
\end{array}
if l < 9.1999999999999998e-101Initial program 35.3%
*-commutative35.3%
associate-/r*35.3%
Simplified41.6%
add-sqr-sqrt31.0%
Applied egg-rr30.0%
unpow230.0%
associate-/l/30.0%
associate-*l/29.5%
associate-*l/30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in k around 0 37.5%
associate-/l*37.5%
Simplified37.5%
if 9.1999999999999998e-101 < l < 6.20000000000000028e150Initial program 45.7%
*-commutative45.7%
associate-/r*45.8%
Simplified50.9%
add-sqr-sqrt50.9%
add-cube-cbrt50.9%
times-frac50.9%
Applied egg-rr81.3%
associate-/r/81.3%
associate-/r*81.2%
associate-/r/83.0%
Simplified83.0%
frac-times82.8%
associate-*l/82.8%
associate-/r/82.8%
associate-*l/82.8%
div-inv82.9%
pow-flip82.9%
metadata-eval82.9%
Applied egg-rr82.9%
associate-/r*82.8%
associate-*l/82.8%
associate-*l/83.0%
associate-*r/83.0%
Simplified83.2%
Taylor expanded in l around -inf 99.6%
*-commutative99.6%
associate-/l*99.5%
associate-*r*99.5%
unpow299.5%
rem-square-sqrt99.8%
associate-*r*99.8%
Simplified99.8%
if 6.20000000000000028e150 < l Initial program 31.1%
*-commutative31.1%
associate-/r*31.1%
Simplified31.1%
add-sqr-sqrt31.1%
add-cube-cbrt31.1%
times-frac31.1%
Applied egg-rr84.1%
associate-/r/84.1%
associate-/r*84.1%
associate-/r/84.0%
Simplified84.0%
frac-times77.8%
associate-*l/77.8%
associate-/r/77.8%
associate-*l/77.8%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.8%
associate-*l/77.8%
associate-*l/84.1%
associate-*r/84.1%
Simplified86.6%
Final simplification60.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (cbrt (* (sin k) (tan k))))
(t_3 (/ (sqrt 2.0) k))
(t_4 (pow (cbrt l) -2.0)))
(*
t_s
(if (<= l 1.06e-100)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= l 1.35e+154)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(*
(* t_m t_3)
(/ (/ (/ t_3 t_4) t_2) (pow (* t_m (* t_4 t_2)) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = cbrt((sin(k) * tan(k)));
double t_3 = sqrt(2.0) / k;
double t_4 = pow(cbrt(l), -2.0);
double tmp;
if (l <= 1.06e-100) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if (l <= 1.35e+154) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = (t_m * t_3) * (((t_3 / t_4) / t_2) / pow((t_m * (t_4 * t_2)), 2.0));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.cbrt((Math.sin(k) * Math.tan(k)));
double t_3 = Math.sqrt(2.0) / k;
double t_4 = Math.pow(Math.cbrt(l), -2.0);
double tmp;
if (l <= 1.06e-100) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if (l <= 1.35e+154) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = (t_m * t_3) * (((t_3 / t_4) / t_2) / Math.pow((t_m * (t_4 * t_2)), 2.0));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = cbrt(Float64(sin(k) * tan(k))) t_3 = Float64(sqrt(2.0) / k) t_4 = cbrt(l) ^ -2.0 tmp = 0.0 if (l <= 1.06e-100) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (l <= 1.35e+154) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(Float64(t_m * t_3) * Float64(Float64(Float64(t_3 / t_4) / t_2) / (Float64(t_m * Float64(t_4 * t_2)) ^ 2.0))); end return Float64(t_s * tmp) end
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_, k_] := Block[{t$95$2 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 1.06e-100], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 1.35e+154], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(N[(t$95$m * t$95$3), $MachinePrecision] * N[(N[(N[(t$95$3 / t$95$4), $MachinePrecision] / t$95$2), $MachinePrecision] / N[Power[N[(t$95$m * N[(t$95$4 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\sqrt{2}}{k}\\
t_4 := {\left(\sqrt[3]{\ell}\right)}^{-2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 1.06 \cdot 10^{-100}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;\left(t\_m \cdot t\_3\right) \cdot \frac{\frac{\frac{t\_3}{t\_4}}{t\_2}}{{\left(t\_m \cdot \left(t\_4 \cdot t\_2\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if l < 1.0600000000000001e-100Initial program 35.3%
*-commutative35.3%
associate-/r*35.3%
Simplified41.6%
add-sqr-sqrt31.0%
Applied egg-rr30.0%
unpow230.0%
associate-/l/30.0%
associate-*l/29.5%
associate-*l/30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in k around 0 37.5%
associate-/l*37.5%
Simplified37.5%
if 1.0600000000000001e-100 < l < 1.35000000000000003e154Initial program 45.0%
*-commutative45.0%
associate-/r*45.0%
Simplified50.1%
add-sqr-sqrt50.1%
add-cube-cbrt50.0%
times-frac50.0%
Applied egg-rr79.9%
associate-/r/79.9%
associate-/r*79.9%
associate-/r/81.6%
Simplified81.6%
frac-times81.4%
associate-*l/81.4%
associate-/r/81.5%
associate-*l/81.5%
div-inv81.5%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
associate-/r*81.5%
associate-*l/81.5%
associate-*l/81.7%
associate-*r/81.6%
Simplified81.9%
Taylor expanded in l around -inf 98.0%
*-commutative98.0%
associate-/l*98.0%
associate-*r*98.0%
unpow298.0%
rem-square-sqrt98.2%
associate-*r*98.2%
Simplified98.2%
if 1.35000000000000003e154 < l Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified31.8%
add-sqr-sqrt31.8%
add-cube-cbrt31.8%
times-frac31.8%
Applied egg-rr86.0%
associate-/r/86.0%
associate-/r*86.0%
associate-/r/85.9%
Simplified85.9%
associate-*l/79.6%
associate-*l/79.6%
associate-/l/79.5%
associate-*l/79.6%
*-commutative79.6%
div-inv79.6%
pow-flip79.6%
metadata-eval79.6%
Applied egg-rr79.5%
associate-/l*86.0%
associate-*l/86.0%
Simplified86.0%
Final simplification60.1%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 9.2e-101)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= l 1.2e+154)
(/
(*
(* 2.0 (* (pow (cbrt -1.0) 6.0) (cos k)))
(/ (pow l 2.0) (* (* k t_m) (pow (sin k) 2.0))))
k)
(pow
(* l (/ (/ (/ (sqrt 2.0) (sin k)) k) (sqrt (/ t_m (cos k)))))
2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 9.2e-101) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if (l <= 1.2e+154) {
tmp = ((2.0 * (pow(cbrt(-1.0), 6.0) * cos(k))) * (pow(l, 2.0) / ((k * t_m) * pow(sin(k), 2.0)))) / k;
} else {
tmp = pow((l * (((sqrt(2.0) / sin(k)) / k) / sqrt((t_m / cos(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 9.2e-101) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if (l <= 1.2e+154) {
tmp = ((2.0 * (Math.pow(Math.cbrt(-1.0), 6.0) * Math.cos(k))) * (Math.pow(l, 2.0) / ((k * t_m) * Math.pow(Math.sin(k), 2.0)))) / k;
} else {
tmp = Math.pow((l * (((Math.sqrt(2.0) / Math.sin(k)) / k) / Math.sqrt((t_m / Math.cos(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 9.2e-101) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (l <= 1.2e+154) tmp = Float64(Float64(Float64(2.0 * Float64((cbrt(-1.0) ^ 6.0) * cos(k))) * Float64((l ^ 2.0) / Float64(Float64(k * t_m) * (sin(k) ^ 2.0)))) / k); else tmp = Float64(l * Float64(Float64(Float64(sqrt(2.0) / sin(k)) / k) / sqrt(Float64(t_m / cos(k))))) ^ 2.0; end return Float64(t_s * tmp) end
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_, k_] := N[(t$95$s * If[LessEqual[l, 9.2e-101], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 1.2e+154], N[(N[(N[(2.0 * N[(N[Power[N[Power[-1.0, 1/3], $MachinePrecision], 6.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[Power[N[(l * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 9.2 \cdot 10^{-101}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \leq 1.2 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(2 \cdot \left({\left(\sqrt[3]{-1}\right)}^{6} \cdot \cos k\right)\right) \cdot \frac{{\ell}^{2}}{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}}{k}\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot \frac{\frac{\frac{\sqrt{2}}{\sin k}}{k}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if l < 9.1999999999999998e-101Initial program 35.3%
*-commutative35.3%
associate-/r*35.3%
Simplified41.6%
add-sqr-sqrt31.0%
Applied egg-rr30.0%
unpow230.0%
associate-/l/30.0%
associate-*l/29.5%
associate-*l/30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in k around 0 37.5%
associate-/l*37.5%
Simplified37.5%
if 9.1999999999999998e-101 < l < 1.20000000000000007e154Initial program 45.0%
*-commutative45.0%
associate-/r*45.0%
Simplified50.1%
add-sqr-sqrt50.1%
add-cube-cbrt50.0%
times-frac50.0%
Applied egg-rr79.9%
associate-/r/79.9%
associate-/r*79.9%
associate-/r/81.6%
Simplified81.6%
frac-times81.4%
associate-*l/81.4%
associate-/r/81.5%
associate-*l/81.5%
div-inv81.5%
pow-flip81.5%
metadata-eval81.5%
Applied egg-rr81.5%
associate-/r*81.5%
associate-*l/81.5%
associate-*l/81.7%
associate-*r/81.6%
Simplified81.9%
Taylor expanded in l around -inf 98.0%
*-commutative98.0%
associate-/l*98.0%
associate-*r*98.0%
unpow298.0%
rem-square-sqrt98.2%
associate-*r*98.2%
Simplified98.2%
if 1.20000000000000007e154 < l Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified31.8%
add-sqr-sqrt15.9%
Applied egg-rr34.2%
unpow234.2%
associate-/l/34.2%
associate-*l/34.2%
associate-*l/34.2%
*-commutative34.2%
Simplified34.2%
Taylor expanded in k around inf 47.5%
associate-*l/47.5%
associate-/l*47.5%
Simplified47.5%
*-un-lft-identity47.5%
associate-*r/47.5%
Applied egg-rr47.5%
*-lft-identity47.5%
associate-/r/47.5%
associate-/r*47.5%
*-commutative47.5%
associate-/r*47.6%
Simplified47.6%
Final simplification53.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/ (* (pow l 2.0) (/ (* (/ (cos k) t_m) (/ 2.0 (pow (sin k) 2.0))) k)) k)
(pow
(* l (/ (/ (/ (sqrt 2.0) (sin k)) k) (sqrt (/ t_m (cos k)))))
2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (pow(l, 2.0) * (((cos(k) / t_m) * (2.0 / pow(sin(k), 2.0))) / k)) / k;
} else {
tmp = pow((l * (((sqrt(2.0) / sin(k)) / k) / sqrt((t_m / cos(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-200) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = ((l ** 2.0d0) * (((cos(k) / t_m) * (2.0d0 / (sin(k) ** 2.0d0))) / k)) / k
else
tmp = (l * (((sqrt(2.0d0) / sin(k)) / k) / sqrt((t_m / cos(k))))) ** 2.0d0
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (Math.pow(l, 2.0) * (((Math.cos(k) / t_m) * (2.0 / Math.pow(Math.sin(k), 2.0))) / k)) / k;
} else {
tmp = Math.pow((l * (((Math.sqrt(2.0) / Math.sin(k)) / k) / Math.sqrt((t_m / Math.cos(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-200: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (math.pow(l, 2.0) * (((math.cos(k) / t_m) * (2.0 / math.pow(math.sin(k), 2.0))) / k)) / k else: tmp = math.pow((l * (((math.sqrt(2.0) / math.sin(k)) / k) / math.sqrt((t_m / math.cos(k))))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64((l ^ 2.0) * Float64(Float64(Float64(cos(k) / t_m) * Float64(2.0 / (sin(k) ^ 2.0))) / k)) / k); else tmp = Float64(l * Float64(Float64(Float64(sqrt(2.0) / sin(k)) / k) / sqrt(Float64(t_m / cos(k))))) ^ 2.0; end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-200) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = ((l ^ 2.0) * (((cos(k) / t_m) * (2.0 / (sin(k) ^ 2.0))) / k)) / k; else tmp = (l * (((sqrt(2.0) / sin(k)) / k) / sqrt((t_m / cos(k))))) ^ 2.0; end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(2.0 / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[Power[N[(l * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t\_m} \cdot \frac{2}{{\sin k}^{2}}}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot \frac{\frac{\frac{\sqrt{2}}{\sin k}}{k}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in k around inf 80.6%
Taylor expanded in t around 0 98.4%
associate-/l*98.4%
*-commutative98.4%
associate-/r*98.4%
unpow298.4%
rem-square-sqrt98.7%
times-frac98.7%
Simplified98.7%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
*-un-lft-identity49.7%
associate-*r/49.7%
Applied egg-rr49.7%
*-lft-identity49.7%
associate-/r/49.7%
associate-/r*49.7%
*-commutative49.7%
associate-/r*49.8%
Simplified49.8%
Final simplification67.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/ (* (pow l 2.0) (/ (* (/ (cos k) t_m) (/ 2.0 (pow (sin k) 2.0))) k)) k)
(*
2.0
(pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt (/ t_m (cos k)))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (pow(l, 2.0) * (((cos(k) / t_m) * (2.0 / pow(sin(k), 2.0))) / k)) / k;
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-200) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = ((l ** 2.0d0) * (((cos(k) / t_m) * (2.0d0 / (sin(k) ** 2.0d0))) / k)) / k
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (Math.pow(l, 2.0) * (((Math.cos(k) / t_m) * (2.0 / Math.pow(Math.sin(k), 2.0))) / k)) / k;
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-200: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (math.pow(l, 2.0) * (((math.cos(k) / t_m) * (2.0 / math.pow(math.sin(k), 2.0))) / k)) / k else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64((l ^ 2.0) * Float64(Float64(Float64(cos(k) / t_m) * Float64(2.0 / (sin(k) ^ 2.0))) / k)) / k); else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-200) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = ((l ^ 2.0) * (((cos(k) / t_m) * (2.0 / (sin(k) ^ 2.0))) / k)) / k; else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(2.0 / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \frac{\frac{\cos k}{t\_m} \cdot \frac{2}{{\sin k}^{2}}}{k}}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
*-commutative45.8%
associate-/r*45.8%
Simplified52.7%
add-sqr-sqrt52.7%
add-cube-cbrt52.7%
times-frac52.6%
Applied egg-rr78.1%
associate-/r/78.2%
associate-/r*78.1%
associate-/r/79.2%
Simplified79.2%
frac-times77.9%
associate-*l/77.9%
associate-/r/77.9%
associate-*l/77.9%
div-inv77.9%
pow-flip77.9%
metadata-eval77.9%
Applied egg-rr77.9%
associate-/r*77.9%
associate-*l/77.9%
associate-*l/79.2%
associate-*r/79.2%
Simplified80.6%
Taylor expanded in k around inf 80.6%
Taylor expanded in t around 0 98.4%
associate-/l*98.4%
*-commutative98.4%
associate-/r*98.4%
unpow298.4%
rem-square-sqrt98.7%
times-frac98.7%
Simplified98.7%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
div-inv49.7%
unpow-prod-down49.7%
pow249.7%
pow1/249.7%
pow1/249.7%
pow-prod-up49.8%
metadata-eval49.8%
metadata-eval49.8%
associate-*r/49.8%
Applied egg-rr49.8%
associate-*l/49.8%
associate-/r*49.8%
Simplified49.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-161)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(/ (* (pow l 2.0) (* (/ 2.0 (* t_m (pow (sin k) 2.0))) (/ (cos k) k))) k)
(*
2.0
(pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt (/ t_m (cos k)))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-161) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (pow(l, 2.0) * ((2.0 / (t_m * pow(sin(k), 2.0))) * (cos(k) / k))) / k;
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-161) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = ((l ** 2.0d0) * ((2.0d0 / (t_m * (sin(k) ** 2.0d0))) * (cos(k) / k))) / k
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-161) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (Math.pow(l, 2.0) * ((2.0 / (t_m * Math.pow(Math.sin(k), 2.0))) * (Math.cos(k) / k))) / k;
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-161: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (math.pow(l, 2.0) * ((2.0 / (t_m * math.pow(math.sin(k), 2.0))) * (math.cos(k) / k))) / k else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-161) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64((l ^ 2.0) * Float64(Float64(2.0 / Float64(t_m * (sin(k) ^ 2.0))) * Float64(cos(k) / k))) / k); else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-161) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = ((l ^ 2.0) * ((2.0 / (t_m * (sin(k) ^ 2.0))) * (cos(k) / k))) / k; else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-161], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(2.0 / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-161}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(\frac{2}{t\_m \cdot {\sin k}^{2}} \cdot \frac{\cos k}{k}\right)}{k}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 1.00000000000000003e-161Initial program 29.4%
*-commutative29.4%
associate-/r*29.4%
Simplified36.0%
add-sqr-sqrt30.2%
Applied egg-rr27.6%
unpow227.6%
associate-/l/27.5%
associate-*l/26.7%
associate-*l/27.8%
*-commutative27.8%
Simplified27.8%
Taylor expanded in k around 0 44.3%
associate-/l*44.3%
Simplified44.3%
if 1.00000000000000003e-161 < (*.f64 l l) < 1e308Initial program 46.0%
*-commutative46.0%
associate-/r*46.1%
Simplified53.5%
add-sqr-sqrt53.4%
add-cube-cbrt53.4%
times-frac53.4%
Applied egg-rr78.6%
associate-/r/78.7%
associate-/r*78.6%
associate-/r/79.8%
Simplified79.8%
frac-times78.4%
associate-*l/78.4%
associate-/r/78.4%
associate-*l/78.4%
div-inv78.4%
pow-flip78.4%
metadata-eval78.4%
Applied egg-rr78.4%
associate-/r*78.4%
associate-*l/78.4%
associate-*l/79.8%
associate-*r/79.8%
Simplified80.1%
Taylor expanded in t around 0 98.3%
associate-/l*98.3%
*-commutative98.3%
unpow298.3%
rem-square-sqrt98.6%
*-commutative98.6%
times-frac98.6%
Simplified98.6%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
div-inv49.7%
unpow-prod-down49.7%
pow249.7%
pow1/249.7%
pow1/249.7%
pow-prod-up49.8%
metadata-eval49.8%
metadata-eval49.8%
associate-*r/49.8%
Applied egg-rr49.8%
associate-*l/49.8%
associate-/r*49.8%
Simplified49.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ t_m (cos k))))
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(* (* l l) (/ 2.0 (* (pow k 2.0) (* (pow (sin k) 2.0) t_2))))
(* 2.0 (pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt t_2)) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m / cos(k);
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 / (pow(k, 2.0) * (pow(sin(k), 2.0) * t_2)));
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt(t_2)), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = t_m / cos(k)
if ((l * l) <= 1d-200) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = (l * l) * (2.0d0 / ((k ** 2.0d0) * ((sin(k) ** 2.0d0) * t_2)))
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt(t_2)) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = t_m / Math.cos(k);
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 / (Math.pow(k, 2.0) * (Math.pow(Math.sin(k), 2.0) * t_2)));
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt(t_2)), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = t_m / math.cos(k) tmp = 0 if (l * l) <= 1e-200: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (l * l) * (2.0 / (math.pow(k, 2.0) * (math.pow(math.sin(k), 2.0) * t_2))) else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt(t_2)), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(t_m / cos(k)) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 2.0) * Float64((sin(k) ^ 2.0) * t_2)))); else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(t_2)) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = t_m / cos(k); tmp = 0.0; if ((l * l) <= 1e-200) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = (l * l) * (2.0 / ((k ^ 2.0) * ((sin(k) ^ 2.0) * t_2))); else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt(t_2)) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := Block[{t$95$2 = N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m}{\cos k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\_2\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{t\_2}}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
Simplified51.9%
Taylor expanded in t around 0 89.4%
associate-/l*89.4%
*-commutative89.4%
associate-/l*89.4%
Simplified89.4%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
div-inv49.7%
unpow-prod-down49.7%
pow249.7%
pow1/249.7%
pow1/249.7%
pow-prod-up49.8%
metadata-eval49.8%
metadata-eval49.8%
associate-*r/49.8%
Applied egg-rr49.8%
associate-*l/49.8%
associate-/r*49.8%
Simplified49.8%
Final simplification63.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(* (* l l) (* 2.0 (/ (cos k) (* (pow k 2.0) (* t_m (pow (sin k) 2.0))))))
(*
2.0
(pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt (/ t_m (cos k)))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 * (cos(k) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-200) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = (l * l) * (2.0d0 * (cos(k) / ((k ** 2.0d0) * (t_m * (sin(k) ** 2.0d0)))))
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 * (Math.cos(k) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-200: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (l * l) * (2.0 * (math.cos(k) / (math.pow(k, 2.0) * (t_m * math.pow(math.sin(k), 2.0))))) else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(cos(k) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-200) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = (l * l) * (2.0 * (cos(k) / ((k ^ 2.0) * (t_m * (sin(k) ^ 2.0))))); else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
Simplified51.9%
Taylor expanded in t around 0 89.4%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
div-inv49.7%
unpow-prod-down49.7%
pow249.7%
pow1/249.7%
pow1/249.7%
pow-prod-up49.8%
metadata-eval49.8%
metadata-eval49.8%
associate-*r/49.8%
Applied egg-rr49.8%
associate-*l/49.8%
associate-/r*49.8%
Simplified49.8%
Final simplification63.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 1e-200)
(pow (* (* l (/ (sqrt 2.0) (pow k 2.0))) (sqrt (/ 1.0 t_m))) 2.0)
(if (<= (* l l) 1e+308)
(*
(* l l)
(* 2.0 (* (/ (pow k -2.0) t_m) (/ (cos k) (pow (sin k) 2.0)))))
(*
2.0
(pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt (/ t_m (cos k)))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = pow(((l * (sqrt(2.0) / pow(k, 2.0))) * sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 * ((pow(k, -2.0) / t_m) * (cos(k) / pow(sin(k), 2.0))));
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-200) then
tmp = ((l * (sqrt(2.0d0) / (k ** 2.0d0))) * sqrt((1.0d0 / t_m))) ** 2.0d0
else if ((l * l) <= 1d+308) then
tmp = (l * l) * (2.0d0 * (((k ** (-2.0d0)) / t_m) * (cos(k) / (sin(k) ** 2.0d0))))
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 1e-200) {
tmp = Math.pow(((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))) * Math.sqrt((1.0 / t_m))), 2.0);
} else if ((l * l) <= 1e+308) {
tmp = (l * l) * (2.0 * ((Math.pow(k, -2.0) / t_m) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0))));
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 1e-200: tmp = math.pow(((l * (math.sqrt(2.0) / math.pow(k, 2.0))) * math.sqrt((1.0 / t_m))), 2.0) elif (l * l) <= 1e+308: tmp = (l * l) * (2.0 * ((math.pow(k, -2.0) / t_m) * (math.cos(k) / math.pow(math.sin(k), 2.0)))) else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-200) tmp = Float64(Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) * sqrt(Float64(1.0 / t_m))) ^ 2.0; elseif (Float64(l * l) <= 1e+308) tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64((k ^ -2.0) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0))))); else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 1e-200) tmp = ((l * (sqrt(2.0) / (k ^ 2.0))) * sqrt((1.0 / t_m))) ^ 2.0; elseif ((l * l) <= 1e+308) tmp = (l * l) * (2.0 * (((k ^ -2.0) / t_m) * (cos(k) / (sin(k) ^ 2.0)))); else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-200], N[Power[N[(N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 1e+308], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Power[k, -2.0], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-200}:\\
\;\;\;\;{\left(\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right) \cdot \sqrt{\frac{1}{t\_m}}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 10^{+308}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \left(\frac{{k}^{-2}}{t\_m} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-201Initial program 28.2%
*-commutative28.2%
associate-/r*28.2%
Simplified35.4%
add-sqr-sqrt31.6%
Applied egg-rr28.8%
unpow228.8%
associate-/l/28.7%
associate-*l/27.8%
associate-*l/29.0%
*-commutative29.0%
Simplified29.0%
Taylor expanded in k around 0 43.1%
associate-/l*43.1%
Simplified43.1%
if 9.9999999999999998e-201 < (*.f64 l l) < 1e308Initial program 45.8%
Simplified51.9%
Taylor expanded in t around 0 89.4%
associate-/r*89.4%
Simplified89.4%
div-inv89.3%
div-inv89.3%
pow-flip89.3%
metadata-eval89.3%
Applied egg-rr89.3%
associate-*r/89.4%
*-rgt-identity89.4%
*-commutative89.4%
times-frac89.4%
Simplified89.4%
if 1e308 < (*.f64 l l) Initial program 34.4%
*-commutative34.4%
associate-/r*34.4%
Simplified34.4%
add-sqr-sqrt18.5%
Applied egg-rr32.9%
unpow232.9%
associate-/l/32.9%
associate-*l/32.9%
associate-*l/33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in k around inf 49.7%
associate-*l/49.7%
associate-/l*49.7%
Simplified49.7%
div-inv49.7%
unpow-prod-down49.7%
pow249.7%
pow1/249.7%
pow1/249.7%
pow-prod-up49.8%
metadata-eval49.8%
metadata-eval49.8%
associate-*r/49.8%
Applied egg-rr49.8%
associate-*l/49.8%
associate-/r*49.8%
Simplified49.8%
Final simplification63.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 3e+19)
(pow (/ (sqrt 2.0) (* (/ (pow k 2.0) l) (sqrt t_m))) 2.0)
(* 2.0 (pow (/ (/ 1.0 (/ (* k (sin k)) l)) (sqrt (/ t_m (cos k)))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3e+19) {
tmp = pow((sqrt(2.0) / ((pow(k, 2.0) / l) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * pow(((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3d+19) then
tmp = (sqrt(2.0d0) / (((k ** 2.0d0) / l) * sqrt(t_m))) ** 2.0d0
else
tmp = 2.0d0 * (((1.0d0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3e+19) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(k, 2.0) / l) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * Math.pow(((1.0 / ((k * Math.sin(k)) / l)) / Math.sqrt((t_m / Math.cos(k)))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 3e+19: tmp = math.pow((math.sqrt(2.0) / ((math.pow(k, 2.0) / l) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 * math.pow(((1.0 / ((k * math.sin(k)) / l)) / math.sqrt((t_m / math.cos(k)))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 3e+19) tmp = Float64(sqrt(2.0) / Float64(Float64((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = Float64(2.0 * (Float64(Float64(1.0 / Float64(Float64(k * sin(k)) / l)) / sqrt(Float64(t_m / cos(k)))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 3e+19) tmp = (sqrt(2.0) / (((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = 2.0 * (((1.0 / ((k * sin(k)) / l)) / sqrt((t_m / cos(k)))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[l, 3e+19], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[Power[N[(N[(1.0 / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3 \cdot 10^{+19}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{\frac{1}{\frac{k \cdot \sin k}{\ell}}}{\sqrt{\frac{t\_m}{\cos k}}}\right)}^{2}\\
\end{array}
\end{array}
if l < 3e19Initial program 37.3%
*-commutative37.3%
associate-/r*37.3%
Simplified43.7%
add-sqr-sqrt31.9%
Applied egg-rr29.4%
unpow229.4%
associate-/l/29.4%
associate-*l/28.9%
associate-*l/29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in k around 0 37.5%
if 3e19 < l Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified37.7%
add-sqr-sqrt23.4%
Applied egg-rr35.0%
unpow235.0%
associate-/l/35.0%
associate-*l/35.0%
associate-*l/35.1%
*-commutative35.1%
Simplified35.1%
Taylor expanded in k around inf 50.4%
associate-*l/50.4%
associate-/l*50.3%
Simplified50.3%
div-inv50.3%
unpow-prod-down50.4%
pow250.4%
pow1/250.4%
pow1/250.4%
pow-prod-up50.4%
metadata-eval50.4%
metadata-eval50.4%
associate-*r/50.4%
Applied egg-rr50.4%
associate-*l/50.4%
associate-/r*50.4%
Simplified50.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 3.35e+19)
(pow (/ (sqrt 2.0) (* (/ (pow k 2.0) l) (sqrt t_m))) 2.0)
(* 2.0 (pow (/ 1.0 (/ (* (sqrt (/ t_m (cos k))) (* k (sin k))) l)) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.35e+19) {
tmp = pow((sqrt(2.0) / ((pow(k, 2.0) / l) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * pow((1.0 / ((sqrt((t_m / cos(k))) * (k * sin(k))) / l)), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3.35d+19) then
tmp = (sqrt(2.0d0) / (((k ** 2.0d0) / l) * sqrt(t_m))) ** 2.0d0
else
tmp = 2.0d0 * ((1.0d0 / ((sqrt((t_m / cos(k))) * (k * sin(k))) / l)) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.35e+19) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(k, 2.0) / l) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * Math.pow((1.0 / ((Math.sqrt((t_m / Math.cos(k))) * (k * Math.sin(k))) / l)), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 3.35e+19: tmp = math.pow((math.sqrt(2.0) / ((math.pow(k, 2.0) / l) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 * math.pow((1.0 / ((math.sqrt((t_m / math.cos(k))) * (k * math.sin(k))) / l)), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 3.35e+19) tmp = Float64(sqrt(2.0) / Float64(Float64((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = Float64(2.0 * (Float64(1.0 / Float64(Float64(sqrt(Float64(t_m / cos(k))) * Float64(k * sin(k))) / l)) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 3.35e+19) tmp = (sqrt(2.0) / (((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = 2.0 * ((1.0 / ((sqrt((t_m / cos(k))) * (k * sin(k))) / l)) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[l, 3.35e+19], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[Power[N[(1.0 / N[(N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.35 \cdot 10^{+19}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\frac{1}{\frac{\sqrt{\frac{t\_m}{\cos k}} \cdot \left(k \cdot \sin k\right)}{\ell}}\right)}^{2}\\
\end{array}
\end{array}
if l < 3.35e19Initial program 37.3%
*-commutative37.3%
associate-/r*37.3%
Simplified43.7%
add-sqr-sqrt31.9%
Applied egg-rr29.4%
unpow229.4%
associate-/l/29.4%
associate-*l/28.9%
associate-*l/29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in k around 0 37.5%
if 3.35e19 < l Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified37.7%
add-sqr-sqrt23.4%
Applied egg-rr35.0%
unpow235.0%
associate-/l/35.0%
associate-*l/35.0%
associate-*l/35.1%
*-commutative35.1%
Simplified35.1%
Taylor expanded in k around inf 50.4%
associate-*l/50.4%
associate-/l*50.3%
Simplified50.3%
div-inv50.3%
unpow-prod-down50.4%
pow250.4%
pow1/250.4%
pow1/250.4%
pow-prod-up50.4%
metadata-eval50.4%
metadata-eval50.4%
associate-*r/50.4%
Applied egg-rr50.4%
Final simplification41.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 3.8e+19)
(pow (/ (sqrt 2.0) (* (/ (pow k 2.0) l) (sqrt t_m))) 2.0)
(* 2.0 (pow (* l (/ 1.0 (* (sqrt (/ t_m (cos k))) (* k (sin k))))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.8e+19) {
tmp = pow((sqrt(2.0) / ((pow(k, 2.0) / l) * sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * pow((l * (1.0 / (sqrt((t_m / cos(k))) * (k * sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 3.8d+19) then
tmp = (sqrt(2.0d0) / (((k ** 2.0d0) / l) * sqrt(t_m))) ** 2.0d0
else
tmp = 2.0d0 * ((l * (1.0d0 / (sqrt((t_m / cos(k))) * (k * sin(k))))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 3.8e+19) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(k, 2.0) / l) * Math.sqrt(t_m))), 2.0);
} else {
tmp = 2.0 * Math.pow((l * (1.0 / (Math.sqrt((t_m / Math.cos(k))) * (k * Math.sin(k))))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 3.8e+19: tmp = math.pow((math.sqrt(2.0) / ((math.pow(k, 2.0) / l) * math.sqrt(t_m))), 2.0) else: tmp = 2.0 * math.pow((l * (1.0 / (math.sqrt((t_m / math.cos(k))) * (k * math.sin(k))))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 3.8e+19) tmp = Float64(sqrt(2.0) / Float64(Float64((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = Float64(2.0 * (Float64(l * Float64(1.0 / Float64(sqrt(Float64(t_m / cos(k))) * Float64(k * sin(k))))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 3.8e+19) tmp = (sqrt(2.0) / (((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = 2.0 * ((l * (1.0 / (sqrt((t_m / cos(k))) * (k * sin(k))))) ^ 2.0); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[l, 3.8e+19], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[Power[N[(l * N[(1.0 / N[(N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 3.8 \cdot 10^{+19}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\ell \cdot \frac{1}{\sqrt{\frac{t\_m}{\cos k}} \cdot \left(k \cdot \sin k\right)}\right)}^{2}\\
\end{array}
\end{array}
if l < 3.8e19Initial program 37.3%
*-commutative37.3%
associate-/r*37.3%
Simplified43.7%
add-sqr-sqrt31.9%
Applied egg-rr29.4%
unpow229.4%
associate-/l/29.4%
associate-*l/28.9%
associate-*l/29.5%
*-commutative29.5%
Simplified29.5%
Taylor expanded in k around 0 37.5%
if 3.8e19 < l Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified37.7%
add-sqr-sqrt23.4%
Applied egg-rr35.0%
unpow235.0%
associate-/l/35.0%
associate-*l/35.0%
associate-*l/35.1%
*-commutative35.1%
Simplified35.1%
Taylor expanded in k around inf 50.4%
associate-*l/50.4%
associate-/l*50.3%
Simplified50.3%
div-inv50.3%
unpow-prod-down50.4%
pow250.4%
pow1/250.4%
pow1/250.4%
pow-prod-up50.4%
metadata-eval50.4%
metadata-eval50.4%
associate-*r/50.4%
Applied egg-rr50.4%
associate-/r/50.4%
Simplified50.4%
Final simplification41.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 4.5e+172)
(pow (/ (sqrt 2.0) (* (/ (pow k 2.0) l) (sqrt t_m))) 2.0)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* (pow k 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 4.5e+172) {
tmp = pow((sqrt(2.0) / ((pow(k, 2.0) / l) * sqrt(t_m))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 4.5d+172) then
tmp = (sqrt(2.0d0) / (((k ** 2.0d0) / l) * sqrt(t_m))) ** 2.0d0
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / ((k ** 2.0d0) * t_m)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 4.5e+172) {
tmp = Math.pow((Math.sqrt(2.0) / ((Math.pow(k, 2.0) / l) * Math.sqrt(t_m))), 2.0);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (Math.pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 4.5e+172: tmp = math.pow((math.sqrt(2.0) / ((math.pow(k, 2.0) / l) * math.sqrt(t_m))), 2.0) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (math.pow(k, 2.0) * t_m))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 4.5e+172) tmp = Float64(sqrt(2.0) / Float64(Float64((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64((k ^ 2.0) * t_m)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 4.5e+172) tmp = (sqrt(2.0) / (((k ^ 2.0) / l) * sqrt(t_m))) ^ 2.0; else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / ((k ^ 2.0) * t_m))); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[l, 4.5e+172], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 4.5 \cdot 10^{+172}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{{k}^{2}}{\ell} \cdot \sqrt{t\_m}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{{k}^{2} \cdot t\_m}\right)\\
\end{array}
\end{array}
if l < 4.5000000000000002e172Initial program 37.3%
*-commutative37.3%
associate-/r*37.3%
Simplified43.1%
add-sqr-sqrt31.5%
Applied egg-rr30.8%
unpow230.8%
associate-/l/30.8%
associate-*l/30.5%
associate-*l/30.9%
*-commutative30.9%
Simplified30.9%
Taylor expanded in k around 0 38.1%
if 4.5000000000000002e172 < l Initial program 35.1%
Simplified35.1%
Taylor expanded in t around 0 67.7%
associate-/r*67.7%
Simplified67.7%
Taylor expanded in k around 0 67.6%
Final simplification42.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (pow (/ (sqrt 2.0) (* (* k (sin k)) (/ (sqrt t_m) l))) 2.0)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * pow((sqrt(2.0) / ((k * sin(k)) * (sqrt(t_m) / l))), 2.0);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((sqrt(2.0d0) / ((k * sin(k)) * (sqrt(t_m) / l))) ** 2.0d0)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * Math.pow((Math.sqrt(2.0) / ((k * Math.sin(k)) * (Math.sqrt(t_m) / l))), 2.0);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * math.pow((math.sqrt(2.0) / ((k * math.sin(k)) * (math.sqrt(t_m) / l))), 2.0)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * (Float64(sqrt(2.0) / Float64(Float64(k * sin(k)) * Float64(sqrt(t_m) / l))) ^ 2.0)) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((sqrt(2.0) / ((k * sin(k)) * (sqrt(t_m) / l))) ^ 2.0); end
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_, k_] := N[(t$95$s * N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[t$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot {\left(\frac{\sqrt{2}}{\left(k \cdot \sin k\right) \cdot \frac{\sqrt{t\_m}}{\ell}}\right)}^{2}
\end{array}
Initial program 37.0%
*-commutative37.0%
associate-/r*37.0%
Simplified41.9%
add-sqr-sqrt29.3%
Applied egg-rr31.1%
unpow231.1%
associate-/l/31.1%
associate-*l/30.8%
associate-*l/31.2%
*-commutative31.2%
Simplified31.2%
Taylor expanded in k around inf 50.2%
associate-*l/50.2%
associate-/l*50.1%
Simplified50.1%
Taylor expanded in k around 0 39.0%
associate-*l/39.0%
*-lft-identity39.0%
Simplified39.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 7.7e-136)
(pow (/ (sqrt 2.0) (/ (* (* k (pow t_m 1.5)) (/ k t_m)) l)) 2.0)
(* (* l l) (* 2.0 (/ (/ (cos k) (pow k 2.0)) (* (pow k 2.0) t_m)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 7.7e-136) {
tmp = pow((sqrt(2.0) / (((k * pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0);
} else {
tmp = (l * l) * (2.0 * ((cos(k) / pow(k, 2.0)) / (pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 7.7d-136) then
tmp = (sqrt(2.0d0) / (((k * (t_m ** 1.5d0)) * (k / t_m)) / l)) ** 2.0d0
else
tmp = (l * l) * (2.0d0 * ((cos(k) / (k ** 2.0d0)) / ((k ** 2.0d0) * t_m)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 7.7e-136) {
tmp = Math.pow((Math.sqrt(2.0) / (((k * Math.pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0);
} else {
tmp = (l * l) * (2.0 * ((Math.cos(k) / Math.pow(k, 2.0)) / (Math.pow(k, 2.0) * t_m)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 7.7e-136: tmp = math.pow((math.sqrt(2.0) / (((k * math.pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0) else: tmp = (l * l) * (2.0 * ((math.cos(k) / math.pow(k, 2.0)) / (math.pow(k, 2.0) * t_m))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 7.7e-136) tmp = Float64(sqrt(2.0) / Float64(Float64(Float64(k * (t_m ^ 1.5)) * Float64(k / t_m)) / l)) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(cos(k) / (k ^ 2.0)) / Float64((k ^ 2.0) * t_m)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 7.7e-136) tmp = (sqrt(2.0) / (((k * (t_m ^ 1.5)) * (k / t_m)) / l)) ^ 2.0; else tmp = (l * l) * (2.0 * ((cos(k) / (k ^ 2.0)) / ((k ^ 2.0) * t_m))); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[l, 7.7e-136], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 7.7 \cdot 10^{-136}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{\left(k \cdot {t\_m}^{1.5}\right) \cdot \frac{k}{t\_m}}{\ell}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{\cos k}{{k}^{2}}}{{k}^{2} \cdot t\_m}\right)\\
\end{array}
\end{array}
if l < 7.6999999999999993e-136Initial program 34.2%
*-commutative34.2%
associate-/r*34.2%
Simplified39.9%
add-sqr-sqrt29.2%
Applied egg-rr28.6%
unpow228.6%
associate-/l/28.6%
associate-*l/28.0%
associate-*l/28.7%
*-commutative28.7%
Simplified28.7%
Taylor expanded in k around 0 28.7%
if 7.6999999999999993e-136 < l Initial program 40.4%
Simplified44.0%
Taylor expanded in t around 0 81.8%
associate-/r*81.7%
Simplified81.7%
Taylor expanded in k around 0 71.4%
Final simplification47.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= (* l l) 0.0)
(pow (/ (sqrt 2.0) (/ (* (* k (pow t_m 1.5)) (/ k t_m)) l)) 2.0)
(* (* l l) (/ (* 2.0 (pow k -2.0)) (* t_m (pow (sin k) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = pow((sqrt(2.0) / (((k * pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0);
} else {
tmp = (l * l) * ((2.0 * pow(k, -2.0)) / (t_m * pow(sin(k), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 0.0d0) then
tmp = (sqrt(2.0d0) / (((k * (t_m ** 1.5d0)) * (k / t_m)) / l)) ** 2.0d0
else
tmp = (l * l) * ((2.0d0 * (k ** (-2.0d0))) / (t_m * (sin(k) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if ((l * l) <= 0.0) {
tmp = Math.pow((Math.sqrt(2.0) / (((k * Math.pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0);
} else {
tmp = (l * l) * ((2.0 * Math.pow(k, -2.0)) / (t_m * Math.pow(Math.sin(k), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if (l * l) <= 0.0: tmp = math.pow((math.sqrt(2.0) / (((k * math.pow(t_m, 1.5)) * (k / t_m)) / l)), 2.0) else: tmp = (l * l) * ((2.0 * math.pow(k, -2.0)) / (t_m * math.pow(math.sin(k), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (Float64(l * l) <= 0.0) tmp = Float64(sqrt(2.0) / Float64(Float64(Float64(k * (t_m ^ 1.5)) * Float64(k / t_m)) / l)) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * (k ^ -2.0)) / Float64(t_m * (sin(k) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if ((l * l) <= 0.0) tmp = (sqrt(2.0) / (((k * (t_m ^ 1.5)) * (k / t_m)) / l)) ^ 2.0; else tmp = (l * l) * ((2.0 * (k ^ -2.0)) / (t_m * (sin(k) ^ 2.0))); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 0.0], N[Power[N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 0:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\frac{\left(k \cdot {t\_m}^{1.5}\right) \cdot \frac{k}{t\_m}}{\ell}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot {k}^{-2}}{t\_m \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if (*.f64 l l) < 0.0Initial program 24.3%
*-commutative24.3%
associate-/r*24.3%
Simplified31.8%
add-sqr-sqrt31.8%
Applied egg-rr24.1%
unpow224.1%
associate-/l/24.0%
associate-*l/23.8%
associate-*l/23.8%
*-commutative23.8%
Simplified23.8%
Taylor expanded in k around 0 33.1%
if 0.0 < (*.f64 l l) Initial program 40.4%
Simplified45.4%
Taylor expanded in t around 0 79.0%
associate-/r*79.0%
Simplified79.0%
Taylor expanded in k around 0 68.6%
associate-*r/68.6%
pow-flip68.7%
metadata-eval68.7%
Applied egg-rr68.7%
Final simplification61.2%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ (* 2.0 (pow k -2.0)) (* t_m (pow (sin k) 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * ((2.0 * pow(k, -2.0)) / (t_m * pow(sin(k), 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * ((2.0d0 * (k ** (-2.0d0))) / (t_m * (sin(k) ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * ((2.0 * Math.pow(k, -2.0)) / (t_m * Math.pow(Math.sin(k), 2.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * ((2.0 * math.pow(k, -2.0)) / (t_m * math.pow(math.sin(k), 2.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(Float64(2.0 * (k ^ -2.0)) / Float64(t_m * (sin(k) ^ 2.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * ((2.0 * (k ^ -2.0)) / (t_m * (sin(k) ^ 2.0)))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, -2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot {k}^{-2}}{t\_m \cdot {\sin k}^{2}}\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in k around 0 66.4%
associate-*r/66.4%
pow-flip66.5%
metadata-eval66.5%
Applied egg-rr66.5%
Final simplification66.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ 2.0 (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 / ((k ** 2.0d0) * (t_m * (sin(k) ** 2.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 / (math.pow(k, 2.0) * (t_m * math.pow(math.sin(k), 2.0)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 / ((k ^ 2.0) * (t_m * (sin(k) ^ 2.0))))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in k around 0 66.4%
Taylor expanded in k around inf 66.4%
Final simplification66.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (* 2.0 (/ (* (/ 1.0 k) (/ 1.0 k)) (* t_m (pow (sin k) 2.0)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * (((1.0 / k) * (1.0 / k)) / (t_m * pow(sin(k), 2.0)))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 * (((1.0d0 / k) * (1.0d0 / k)) / (t_m * (sin(k) ** 2.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * (((1.0 / k) * (1.0 / k)) / (t_m * Math.pow(Math.sin(k), 2.0)))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 * (((1.0 / k) * (1.0 / k)) / (t_m * math.pow(math.sin(k), 2.0)))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(Float64(1.0 / k) * Float64(1.0 / k)) / Float64(t_m * (sin(k) ^ 2.0)))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 * (((1.0 / k) * (1.0 / k)) / (t_m * (sin(k) ^ 2.0))))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(N[(1.0 / k), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{k} \cdot \frac{1}{k}}{t\_m \cdot {\sin k}^{2}}\right)\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in k around 0 66.4%
inv-pow66.4%
unpow266.4%
unpow-prod-down66.4%
inv-pow66.4%
inv-pow66.4%
Applied egg-rr66.4%
Final simplification66.4%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (* 2.0 (/ (/ 1.0 (pow k 2.0)) (* (pow k 2.0) t_m))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * ((1.0 / pow(k, 2.0)) / (pow(k, 2.0) * t_m))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 * ((1.0d0 / (k ** 2.0d0)) / ((k ** 2.0d0) * t_m))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * ((1.0 / Math.pow(k, 2.0)) / (Math.pow(k, 2.0) * t_m))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 * ((1.0 / math.pow(k, 2.0)) / (math.pow(k, 2.0) * t_m))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(1.0 / (k ^ 2.0)) / Float64((k ^ 2.0) * t_m))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 * ((1.0 / (k ^ 2.0)) / ((k ^ 2.0) * t_m)))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{{k}^{2}}}{{k}^{2} \cdot t\_m}\right)\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in k around 0 66.4%
Taylor expanded in k around 0 65.8%
Final simplification65.8%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (* 2.0 (/ (pow l 2.0) (* t_m (pow k 3.0)))) k)))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 * (pow(l, 2.0) / (t_m * pow(k, 3.0)))) / k);
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 3.0d0)))) / k)
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 3.0)))) / k);
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 3.0)))) / k)
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 3.0)))) / k)) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((2.0 * ((l ^ 2.0) / (t_m * (k ^ 3.0)))) / k); end
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_, k_] := N[(t$95$s * N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{3}}}{k}
\end{array}
Initial program 37.0%
*-commutative37.0%
associate-/r*37.0%
Simplified41.9%
add-sqr-sqrt41.9%
add-cube-cbrt41.9%
times-frac41.9%
Applied egg-rr82.3%
associate-/r/82.3%
associate-/r*82.3%
associate-/r/83.0%
Simplified83.0%
frac-times79.7%
associate-*l/79.7%
associate-/r/79.7%
associate-*l/79.7%
div-inv79.7%
pow-flip79.7%
metadata-eval79.7%
Applied egg-rr79.7%
associate-/r*79.7%
associate-*l/79.7%
associate-*l/83.0%
associate-*r/83.0%
Simplified86.5%
Taylor expanded in k around 0 64.6%
*-commutative64.6%
unpow264.6%
rem-square-sqrt64.6%
associate-/l*64.6%
*-commutative64.6%
Simplified64.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (* 2.0 (/ (/ 1.0 (pow k 4.0)) t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * ((1.0 / pow(k, 4.0)) / t_m)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 * ((1.0d0 / (k ** 4.0d0)) / t_m)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 * ((1.0 / Math.pow(k, 4.0)) / t_m)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 * ((1.0 / math.pow(k, 4.0)) / t_m)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 * Float64(Float64(1.0 / (k ^ 4.0)) / t_m)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 * ((1.0 / (k ^ 4.0)) / t_m))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 * N[(N[(1.0 / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\frac{1}{{k}^{4}}}{t\_m}\right)\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in t around 0 74.6%
associate-/r*74.6%
Simplified74.6%
Taylor expanded in k around 0 63.8%
associate-/r*63.8%
Simplified63.8%
Final simplification63.8%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ 2.0 (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * (2.0d0 / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (2.0 / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (2.0 / (t_m * math.pow(k, 4.0))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(2.0 / Float64(t_m * (k ^ 4.0))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (2.0 / (t_m * (k ^ 4.0)))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{2}{t\_m \cdot {k}^{4}}\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in k around 0 63.8%
Final simplification63.8%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (* (/ 2.0 t_m) (pow k -4.0)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * ((2.0 / t_m) * pow(k, -4.0)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * ((2.0d0 / t_m) * (k ** (-4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * ((2.0 / t_m) * Math.pow(k, -4.0)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * ((2.0 / t_m) * math.pow(k, -4.0)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(Float64(2.0 / t_m) * (k ^ -4.0)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * ((2.0 / t_m) * (k ^ -4.0))); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t\_m} \cdot {k}^{-4}\right)\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in k around 0 63.8%
*-commutative63.8%
associate-/r*63.8%
Simplified63.8%
div-inv63.8%
pow-flip63.8%
metadata-eval63.8%
Applied egg-rr63.8%
Final simplification63.8%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* (* l l) (/ -0.11666666666666667 t_m))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (-0.11666666666666667 / t_m));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l * l) * ((-0.11666666666666667d0) / t_m))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * ((l * l) * (-0.11666666666666667 / t_m));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * ((l * l) * (-0.11666666666666667 / t_m))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(Float64(l * l) * Float64(-0.11666666666666667 / t_m))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l * l) * (-0.11666666666666667 / t_m)); end
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_, k_] := N[(t$95$s * N[(N[(l * l), $MachinePrecision] * N[(-0.11666666666666667 / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{-0.11666666666666667}{t\_m}\right)
\end{array}
Initial program 37.0%
Simplified42.5%
Taylor expanded in k around 0 46.0%
Taylor expanded in k around inf 17.7%
Final simplification17.7%
herbie shell --seed 2024174
(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))))