
(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 16 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 (/ (sqrt 2.0) k))
(t_3 (* (sin k) (tan k)))
(t_4 (sqrt (/ 1.0 t_m))))
(*
t_s
(if (<= t_m 3.4e-222)
(pow (/ (* t_4 (* l t_2)) (sqrt t_3)) 2.0)
(if (<= t_m 1.22e+203)
(* (pow (* l (* t_2 (/ t_m (pow t_m 1.5)))) 2.0) (pow t_3 -1.0))
(pow (/ (* t_4 (/ (* l (sqrt 2.0)) k)) 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 t_2 = sqrt(2.0) / k;
double t_3 = sin(k) * tan(k);
double t_4 = sqrt((1.0 / t_m));
double tmp;
if (t_m <= 3.4e-222) {
tmp = pow(((t_4 * (l * t_2)) / sqrt(t_3)), 2.0);
} else if (t_m <= 1.22e+203) {
tmp = pow((l * (t_2 * (t_m / pow(t_m, 1.5)))), 2.0) * pow(t_3, -1.0);
} else {
tmp = pow(((t_4 * ((l * sqrt(2.0)) / k)) / 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) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = sqrt(2.0d0) / k
t_3 = sin(k) * tan(k)
t_4 = sqrt((1.0d0 / t_m))
if (t_m <= 3.4d-222) then
tmp = ((t_4 * (l * t_2)) / sqrt(t_3)) ** 2.0d0
else if (t_m <= 1.22d+203) then
tmp = ((l * (t_2 * (t_m / (t_m ** 1.5d0)))) ** 2.0d0) * (t_3 ** (-1.0d0))
else
tmp = ((t_4 * ((l * sqrt(2.0d0)) / k)) / 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 t_2 = Math.sqrt(2.0) / k;
double t_3 = Math.sin(k) * Math.tan(k);
double t_4 = Math.sqrt((1.0 / t_m));
double tmp;
if (t_m <= 3.4e-222) {
tmp = Math.pow(((t_4 * (l * t_2)) / Math.sqrt(t_3)), 2.0);
} else if (t_m <= 1.22e+203) {
tmp = Math.pow((l * (t_2 * (t_m / Math.pow(t_m, 1.5)))), 2.0) * Math.pow(t_3, -1.0);
} else {
tmp = Math.pow(((t_4 * ((l * Math.sqrt(2.0)) / k)) / 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): t_2 = math.sqrt(2.0) / k t_3 = math.sin(k) * math.tan(k) t_4 = math.sqrt((1.0 / t_m)) tmp = 0 if t_m <= 3.4e-222: tmp = math.pow(((t_4 * (l * t_2)) / math.sqrt(t_3)), 2.0) elif t_m <= 1.22e+203: tmp = math.pow((l * (t_2 * (t_m / math.pow(t_m, 1.5)))), 2.0) * math.pow(t_3, -1.0) else: tmp = math.pow(((t_4 * ((l * math.sqrt(2.0)) / k)) / 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) t_2 = Float64(sqrt(2.0) / k) t_3 = Float64(sin(k) * tan(k)) t_4 = sqrt(Float64(1.0 / t_m)) tmp = 0.0 if (t_m <= 3.4e-222) tmp = Float64(Float64(t_4 * Float64(l * t_2)) / sqrt(t_3)) ^ 2.0; elseif (t_m <= 1.22e+203) tmp = Float64((Float64(l * Float64(t_2 * Float64(t_m / (t_m ^ 1.5)))) ^ 2.0) * (t_3 ^ -1.0)); else tmp = Float64(Float64(t_4 * Float64(Float64(l * sqrt(2.0)) / k)) / 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) t_2 = sqrt(2.0) / k; t_3 = sin(k) * tan(k); t_4 = sqrt((1.0 / t_m)); tmp = 0.0; if (t_m <= 3.4e-222) tmp = ((t_4 * (l * t_2)) / sqrt(t_3)) ^ 2.0; elseif (t_m <= 1.22e+203) tmp = ((l * (t_2 * (t_m / (t_m ^ 1.5)))) ^ 2.0) * (t_3 ^ -1.0); else tmp = ((t_4 * ((l * sqrt(2.0)) / k)) / 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_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.4e-222], N[Power[N[(N[(t$95$4 * N[(l * t$95$2), $MachinePrecision]), $MachinePrecision] / N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 1.22e+203], N[(N[Power[N[(l * N[(t$95$2 * N[(t$95$m / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$3, -1.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(t$95$4 * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $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 := \sin k \cdot \tan k\\
t_4 := \sqrt{\frac{1}{t\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.4 \cdot 10^{-222}:\\
\;\;\;\;{\left(\frac{t\_4 \cdot \left(\ell \cdot t\_2\right)}{\sqrt{t\_3}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 1.22 \cdot 10^{+203}:\\
\;\;\;\;{\left(\ell \cdot \left(t\_2 \cdot \frac{t\_m}{{t\_m}^{1.5}}\right)\right)}^{2} \cdot {t\_3}^{-1}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_4 \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 3.4000000000000001e-222Initial program 30.8%
*-commutative30.8%
associate-/r*30.8%
Simplified36.5%
add-sqr-sqrt17.0%
Applied egg-rr4.9%
unpow24.9%
associate-/r*4.9%
associate-/r/4.9%
Simplified4.9%
Taylor expanded in k around 0 11.1%
*-commutative11.1%
associate-/l*11.1%
Simplified11.1%
if 3.4000000000000001e-222 < t < 1.21999999999999992e203Initial program 44.3%
*-commutative44.3%
associate-/r*44.3%
Simplified54.8%
add-sqr-sqrt54.6%
Applied egg-rr70.6%
unpow270.6%
associate-/r*70.6%
associate-/r/70.6%
Simplified70.6%
div-inv70.7%
unpow-prod-down70.7%
associate-/l*71.8%
pow1/271.8%
pow-flip71.9%
metadata-eval71.9%
Applied egg-rr71.9%
associate-*r/70.7%
associate-/r/74.2%
*-commutative74.2%
associate-/l*75.3%
unpow275.3%
pow-sqr96.0%
metadata-eval96.0%
Simplified96.0%
if 1.21999999999999992e203 < t Initial program 3.2%
*-commutative3.2%
associate-/r*3.2%
Simplified22.6%
add-sqr-sqrt22.6%
Applied egg-rr20.1%
unpow220.1%
associate-/r*20.1%
associate-/r/20.1%
Simplified20.1%
Taylor expanded in k around 0 43.2%
Taylor expanded in k around 0 84.4%
Final simplification47.2%
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 (/ 1.0 t_m))))
(*
t_s
(if (<= l 2.6e-92)
(pow (/ (* t_2 (/ (* l (sqrt 2.0)) k)) k) 2.0)
(if (<= l 6.2e+118)
(*
(* 2.0 (pow (sin k) -2.0))
(* (/ (cos k) t_m) (/ (pow l 2.0) (pow k 2.0))))
(pow
(/ (* t_2 (* l (/ (sqrt 2.0) k))) (sqrt (* (sin k) (tan 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 t_2 = sqrt((1.0 / t_m));
double tmp;
if (l <= 2.6e-92) {
tmp = pow(((t_2 * ((l * sqrt(2.0)) / k)) / k), 2.0);
} else if (l <= 6.2e+118) {
tmp = (2.0 * pow(sin(k), -2.0)) * ((cos(k) / t_m) * (pow(l, 2.0) / pow(k, 2.0)));
} else {
tmp = pow(((t_2 * (l * (sqrt(2.0) / k))) / sqrt((sin(k) * tan(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) :: t_2
real(8) :: tmp
t_2 = sqrt((1.0d0 / t_m))
if (l <= 2.6d-92) then
tmp = ((t_2 * ((l * sqrt(2.0d0)) / k)) / k) ** 2.0d0
else if (l <= 6.2d+118) then
tmp = (2.0d0 * (sin(k) ** (-2.0d0))) * ((cos(k) / t_m) * ((l ** 2.0d0) / (k ** 2.0d0)))
else
tmp = ((t_2 * (l * (sqrt(2.0d0) / k))) / sqrt((sin(k) * tan(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 t_2 = Math.sqrt((1.0 / t_m));
double tmp;
if (l <= 2.6e-92) {
tmp = Math.pow(((t_2 * ((l * Math.sqrt(2.0)) / k)) / k), 2.0);
} else if (l <= 6.2e+118) {
tmp = (2.0 * Math.pow(Math.sin(k), -2.0)) * ((Math.cos(k) / t_m) * (Math.pow(l, 2.0) / Math.pow(k, 2.0)));
} else {
tmp = Math.pow(((t_2 * (l * (Math.sqrt(2.0) / k))) / Math.sqrt((Math.sin(k) * Math.tan(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): t_2 = math.sqrt((1.0 / t_m)) tmp = 0 if l <= 2.6e-92: tmp = math.pow(((t_2 * ((l * math.sqrt(2.0)) / k)) / k), 2.0) elif l <= 6.2e+118: tmp = (2.0 * math.pow(math.sin(k), -2.0)) * ((math.cos(k) / t_m) * (math.pow(l, 2.0) / math.pow(k, 2.0))) else: tmp = math.pow(((t_2 * (l * (math.sqrt(2.0) / k))) / math.sqrt((math.sin(k) * math.tan(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) t_2 = sqrt(Float64(1.0 / t_m)) tmp = 0.0 if (l <= 2.6e-92) tmp = Float64(Float64(t_2 * Float64(Float64(l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif (l <= 6.2e+118) tmp = Float64(Float64(2.0 * (sin(k) ^ -2.0)) * Float64(Float64(cos(k) / t_m) * Float64((l ^ 2.0) / (k ^ 2.0)))); else tmp = Float64(Float64(t_2 * Float64(l * Float64(sqrt(2.0) / k))) / sqrt(Float64(sin(k) * tan(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) t_2 = sqrt((1.0 / t_m)); tmp = 0.0; if (l <= 2.6e-92) tmp = ((t_2 * ((l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif (l <= 6.2e+118) tmp = (2.0 * (sin(k) ^ -2.0)) * ((cos(k) / t_m) * ((l ^ 2.0) / (k ^ 2.0))); else tmp = ((t_2 * (l * (sqrt(2.0) / k))) / sqrt((sin(k) * tan(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_] := Block[{t$95$2 = N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 2.6e-92], N[Power[N[(N[(t$95$2 * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[l, 6.2e+118], N[(N[(2.0 * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(t$95$2 * N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{\frac{1}{t\_m}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2.6 \cdot 10^{-92}:\\
\;\;\;\;{\left(\frac{t\_2 \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+118}:\\
\;\;\;\;\left(2 \cdot {\sin k}^{-2}\right) \cdot \left(\frac{\cos k}{t\_m} \cdot \frac{{\ell}^{2}}{{k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_2 \cdot \left(\ell \cdot \frac{\sqrt{2}}{k}\right)}{\sqrt{\sin k \cdot \tan k}}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if l < 2.6e-92Initial program 30.0%
*-commutative30.0%
associate-/r*30.0%
Simplified39.9%
add-sqr-sqrt31.3%
Applied egg-rr30.9%
unpow230.9%
associate-/r*30.9%
associate-/r/30.9%
Simplified30.9%
Taylor expanded in k around 0 35.1%
Taylor expanded in k around 0 44.1%
if 2.6e-92 < l < 6.19999999999999973e118Initial program 37.3%
Simplified48.5%
Taylor expanded in t around 0 77.7%
associate-*r/77.7%
associate-*r*77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in k around inf 77.7%
associate-*r*77.7%
*-commutative77.7%
associate-/r*77.8%
associate-/l*77.8%
associate-*l/77.7%
associate-/r*77.9%
associate-*r/77.6%
Simplified77.6%
associate-*l/82.3%
div-inv82.3%
pow-flip82.3%
metadata-eval82.3%
pow282.3%
Applied egg-rr82.3%
associate-/l*81.5%
associate-*l*81.7%
Simplified81.7%
if 6.19999999999999973e118 < l Initial program 36.3%
*-commutative36.3%
associate-/r*36.3%
Simplified36.3%
add-sqr-sqrt16.2%
Applied egg-rr19.9%
unpow219.9%
associate-/r*20.0%
associate-/r/20.0%
Simplified20.0%
Taylor expanded in k around 0 19.9%
*-commutative19.9%
associate-/l*19.9%
Simplified19.9%
Final simplification46.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 (/ (cos k) t_m)))
(*
t_s
(if (<= (* l l) 2e-184)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) k)) k) 2.0)
(if (<= (* l l) 2e+236)
(* (* 2.0 (pow (sin k) -2.0)) (* t_2 (/ (pow l 2.0) (pow k 2.0))))
(pow (* (sqrt t_2) (* (sqrt 2.0) (/ l (* (sin k) (- 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 t_2 = cos(k) / t_m;
double tmp;
if ((l * l) <= 2e-184) {
tmp = pow(((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k), 2.0);
} else if ((l * l) <= 2e+236) {
tmp = (2.0 * pow(sin(k), -2.0)) * (t_2 * (pow(l, 2.0) / pow(k, 2.0)));
} else {
tmp = pow((sqrt(t_2) * (sqrt(2.0) * (l / (sin(k) * -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) :: t_2
real(8) :: tmp
t_2 = cos(k) / t_m
if ((l * l) <= 2d-184) then
tmp = ((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / k)) / k) ** 2.0d0
else if ((l * l) <= 2d+236) then
tmp = (2.0d0 * (sin(k) ** (-2.0d0))) * (t_2 * ((l ** 2.0d0) / (k ** 2.0d0)))
else
tmp = (sqrt(t_2) * (sqrt(2.0d0) * (l / (sin(k) * -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 t_2 = Math.cos(k) / t_m;
double tmp;
if ((l * l) <= 2e-184) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / k)) / k), 2.0);
} else if ((l * l) <= 2e+236) {
tmp = (2.0 * Math.pow(Math.sin(k), -2.0)) * (t_2 * (Math.pow(l, 2.0) / Math.pow(k, 2.0)));
} else {
tmp = Math.pow((Math.sqrt(t_2) * (Math.sqrt(2.0) * (l / (Math.sin(k) * -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): t_2 = math.cos(k) / t_m tmp = 0 if (l * l) <= 2e-184: tmp = math.pow(((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / k)) / k), 2.0) elif (l * l) <= 2e+236: tmp = (2.0 * math.pow(math.sin(k), -2.0)) * (t_2 * (math.pow(l, 2.0) / math.pow(k, 2.0))) else: tmp = math.pow((math.sqrt(t_2) * (math.sqrt(2.0) * (l / (math.sin(k) * -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) t_2 = Float64(cos(k) / t_m) tmp = 0.0 if (Float64(l * l) <= 2e-184) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif (Float64(l * l) <= 2e+236) tmp = Float64(Float64(2.0 * (sin(k) ^ -2.0)) * Float64(t_2 * Float64((l ^ 2.0) / (k ^ 2.0)))); else tmp = Float64(sqrt(t_2) * Float64(sqrt(2.0) * Float64(l / Float64(sin(k) * Float64(-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) t_2 = cos(k) / t_m; tmp = 0.0; if ((l * l) <= 2e-184) tmp = ((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif ((l * l) <= 2e+236) tmp = (2.0 * (sin(k) ^ -2.0)) * (t_2 * ((l ^ 2.0) / (k ^ 2.0))); else tmp = (sqrt(t_2) * (sqrt(2.0) * (l / (sin(k) * -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_] := Block[{t$95$2 = N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-184], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+236], N[(N[(2.0 * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[t$95$2], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * (-k)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\cos k}{t\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-184}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+236}:\\
\;\;\;\;\left(2 \cdot {\sin k}^{-2}\right) \cdot \left(t\_2 \cdot \frac{{\ell}^{2}}{{k}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{t\_2} \cdot \left(\sqrt{2} \cdot \frac{\ell}{\sin k \cdot \left(-k\right)}\right)\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 2.0000000000000001e-184Initial program 18.5%
*-commutative18.5%
associate-/r*18.5%
Simplified32.5%
add-sqr-sqrt29.7%
Applied egg-rr29.4%
unpow229.4%
associate-/r*29.4%
associate-/r/29.4%
Simplified29.4%
Taylor expanded in k around 0 36.8%
Taylor expanded in k around 0 51.3%
if 2.0000000000000001e-184 < (*.f64 l l) < 2.00000000000000011e236Initial program 48.4%
Simplified57.3%
Taylor expanded in t around 0 86.8%
associate-*r/86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in k around inf 86.8%
associate-*r*86.8%
*-commutative86.8%
associate-/r*86.9%
associate-/l*86.9%
associate-*l/86.8%
associate-/r*86.9%
associate-*r/86.8%
Simplified86.8%
associate-*l/89.0%
div-inv89.0%
pow-flip89.0%
metadata-eval89.0%
pow289.0%
Applied egg-rr89.0%
associate-/l*88.6%
associate-*l*89.9%
Simplified89.9%
if 2.00000000000000011e236 < (*.f64 l l) Initial program 33.8%
*-commutative33.8%
associate-/r*33.8%
Simplified33.8%
add-sqr-sqrt19.0%
Applied egg-rr26.6%
unpow226.6%
associate-/r*26.6%
associate-/r/26.7%
Simplified26.7%
Taylor expanded in t around -inf 49.7%
mul-1-neg49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
*-commutative49.7%
*-commutative49.7%
associate-/l*49.7%
*-commutative49.7%
Simplified49.7%
Final simplification62.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 (/ (cos k) t_m)))
(*
t_s
(if (<= (* l l) 1e-104)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) k)) k) 2.0)
(if (<= (* l l) 2e+198)
(* 2.0 (/ (* t_2 (pow l 2.0)) (pow (* k (sin k)) 2.0)))
(pow (* (sqrt t_2) (* (sqrt 2.0) (/ l (* (sin k) (- 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 t_2 = cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = pow(((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_2 * pow(l, 2.0)) / pow((k * sin(k)), 2.0));
} else {
tmp = pow((sqrt(t_2) * (sqrt(2.0) * (l / (sin(k) * -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) :: t_2
real(8) :: tmp
t_2 = cos(k) / t_m
if ((l * l) <= 1d-104) then
tmp = ((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / k)) / k) ** 2.0d0
else if ((l * l) <= 2d+198) then
tmp = 2.0d0 * ((t_2 * (l ** 2.0d0)) / ((k * sin(k)) ** 2.0d0))
else
tmp = (sqrt(t_2) * (sqrt(2.0d0) * (l / (sin(k) * -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 t_2 = Math.cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_2 * Math.pow(l, 2.0)) / Math.pow((k * Math.sin(k)), 2.0));
} else {
tmp = Math.pow((Math.sqrt(t_2) * (Math.sqrt(2.0) * (l / (Math.sin(k) * -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): t_2 = math.cos(k) / t_m tmp = 0 if (l * l) <= 1e-104: tmp = math.pow(((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / k)) / k), 2.0) elif (l * l) <= 2e+198: tmp = 2.0 * ((t_2 * math.pow(l, 2.0)) / math.pow((k * math.sin(k)), 2.0)) else: tmp = math.pow((math.sqrt(t_2) * (math.sqrt(2.0) * (l / (math.sin(k) * -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) t_2 = Float64(cos(k) / t_m) tmp = 0.0 if (Float64(l * l) <= 1e-104) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif (Float64(l * l) <= 2e+198) tmp = Float64(2.0 * Float64(Float64(t_2 * (l ^ 2.0)) / (Float64(k * sin(k)) ^ 2.0))); else tmp = Float64(sqrt(t_2) * Float64(sqrt(2.0) * Float64(l / Float64(sin(k) * Float64(-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) t_2 = cos(k) / t_m; tmp = 0.0; if ((l * l) <= 1e-104) tmp = ((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k) ^ 2.0; elseif ((l * l) <= 2e+198) tmp = 2.0 * ((t_2 * (l ^ 2.0)) / ((k * sin(k)) ^ 2.0)); else tmp = (sqrt(t_2) * (sqrt(2.0) * (l / (sin(k) * -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_] := Block[{t$95$2 = N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-104], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+198], N[(2.0 * N[(N[(t$95$2 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[t$95$2], $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * (-k)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{\cos k}{t\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-104}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{t\_2 \cdot {\ell}^{2}}{{\left(k \cdot \sin k\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{t\_2} \cdot \left(\sqrt{2} \cdot \frac{\ell}{\sin k \cdot \left(-k\right)}\right)\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.99999999999999927e-105Initial program 23.3%
*-commutative23.3%
associate-/r*23.3%
Simplified35.6%
add-sqr-sqrt32.4%
Applied egg-rr28.8%
unpow228.8%
associate-/r*28.8%
associate-/r/28.8%
Simplified28.8%
Taylor expanded in k around 0 38.5%
Taylor expanded in k around 0 51.2%
if 9.99999999999999927e-105 < (*.f64 l l) < 2.00000000000000004e198Initial program 46.1%
Simplified58.3%
Taylor expanded in t around 0 86.7%
associate-*r/86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
associate-/l*86.8%
associate-*r*85.2%
pow-prod-down85.2%
Applied egg-rr85.2%
times-frac87.7%
associate-*l/88.2%
*-commutative88.2%
Simplified88.2%
if 2.00000000000000004e198 < (*.f64 l l) Initial program 35.2%
*-commutative35.2%
associate-/r*35.2%
Simplified35.2%
add-sqr-sqrt20.2%
Applied egg-rr27.1%
unpow227.1%
associate-/r*27.2%
associate-/r/27.2%
Simplified27.2%
Taylor expanded in t around -inf 49.7%
mul-1-neg49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
*-commutative49.7%
*-commutative49.7%
associate-/l*49.7%
*-commutative49.7%
Simplified49.7%
Final simplification59.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 (* k (sin k))) (t_3 (* l (sqrt 2.0))) (t_4 (/ (cos k) t_m)))
(*
t_s
(if (<= (* l l) 1e-104)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ t_3 k)) k) 2.0)
(if (<= (* l l) 2e+198)
(* 2.0 (/ (* t_4 (pow l 2.0)) (pow t_2 2.0)))
(pow (* (sqrt t_4) (/ t_3 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 = k * sin(k);
double t_3 = l * sqrt(2.0);
double t_4 = cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = pow(((sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_4 * pow(l, 2.0)) / pow(t_2, 2.0));
} else {
tmp = pow((sqrt(t_4) * (t_3 / 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = k * sin(k)
t_3 = l * sqrt(2.0d0)
t_4 = cos(k) / t_m
if ((l * l) <= 1d-104) then
tmp = ((sqrt((1.0d0 / t_m)) * (t_3 / k)) / k) ** 2.0d0
else if ((l * l) <= 2d+198) then
tmp = 2.0d0 * ((t_4 * (l ** 2.0d0)) / (t_2 ** 2.0d0))
else
tmp = (sqrt(t_4) * (t_3 / 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 = k * Math.sin(k);
double t_3 = l * Math.sqrt(2.0);
double t_4 = Math.cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_4 * Math.pow(l, 2.0)) / Math.pow(t_2, 2.0));
} else {
tmp = Math.pow((Math.sqrt(t_4) * (t_3 / 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 = k * math.sin(k) t_3 = l * math.sqrt(2.0) t_4 = math.cos(k) / t_m tmp = 0 if (l * l) <= 1e-104: tmp = math.pow(((math.sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0) elif (l * l) <= 2e+198: tmp = 2.0 * ((t_4 * math.pow(l, 2.0)) / math.pow(t_2, 2.0)) else: tmp = math.pow((math.sqrt(t_4) * (t_3 / 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(k * sin(k)) t_3 = Float64(l * sqrt(2.0)) t_4 = Float64(cos(k) / t_m) tmp = 0.0 if (Float64(l * l) <= 1e-104) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(t_3 / k)) / k) ^ 2.0; elseif (Float64(l * l) <= 2e+198) tmp = Float64(2.0 * Float64(Float64(t_4 * (l ^ 2.0)) / (t_2 ^ 2.0))); else tmp = Float64(sqrt(t_4) * Float64(t_3 / 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 = k * sin(k); t_3 = l * sqrt(2.0); t_4 = cos(k) / t_m; tmp = 0.0; if ((l * l) <= 1e-104) tmp = ((sqrt((1.0 / t_m)) * (t_3 / k)) / k) ^ 2.0; elseif ((l * l) <= 2e+198) tmp = 2.0 * ((t_4 * (l ^ 2.0)) / (t_2 ^ 2.0)); else tmp = (sqrt(t_4) * (t_3 / 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[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-104], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(t$95$3 / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+198], N[(2.0 * N[(N[(t$95$4 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[t$95$4], $MachinePrecision] * N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := k \cdot \sin k\\
t_3 := \ell \cdot \sqrt{2}\\
t_4 := \frac{\cos k}{t\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-104}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{t\_3}{k}}{k}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{t\_4 \cdot {\ell}^{2}}{{t\_2}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{t\_4} \cdot \frac{t\_3}{t\_2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.99999999999999927e-105Initial program 23.3%
*-commutative23.3%
associate-/r*23.3%
Simplified35.6%
add-sqr-sqrt32.4%
Applied egg-rr28.8%
unpow228.8%
associate-/r*28.8%
associate-/r/28.8%
Simplified28.8%
Taylor expanded in k around 0 38.5%
Taylor expanded in k around 0 51.2%
if 9.99999999999999927e-105 < (*.f64 l l) < 2.00000000000000004e198Initial program 46.1%
Simplified58.3%
Taylor expanded in t around 0 86.7%
associate-*r/86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
associate-/l*86.8%
associate-*r*85.2%
pow-prod-down85.2%
Applied egg-rr85.2%
times-frac87.7%
associate-*l/88.2%
*-commutative88.2%
Simplified88.2%
if 2.00000000000000004e198 < (*.f64 l l) Initial program 35.2%
*-commutative35.2%
associate-/r*35.2%
Simplified35.2%
add-sqr-sqrt20.2%
Applied egg-rr27.1%
unpow227.1%
associate-/r*27.2%
associate-/r/27.2%
Simplified27.2%
Taylor expanded in k around inf 49.7%
Final simplification59.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 (* k (sin k))) (t_3 (* l (sqrt 2.0))) (t_4 (/ (cos k) t_m)))
(*
t_s
(if (<= (* l l) 1e-104)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ t_3 k)) k) 2.0)
(if (<= (* l l) 2e+198)
(* 2.0 (/ (* t_4 (pow l 2.0)) (pow t_2 2.0)))
(pow (* t_3 (/ (sqrt 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 = k * sin(k);
double t_3 = l * sqrt(2.0);
double t_4 = cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = pow(((sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_4 * pow(l, 2.0)) / pow(t_2, 2.0));
} else {
tmp = pow((t_3 * (sqrt(t_4) / 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_2 = k * sin(k)
t_3 = l * sqrt(2.0d0)
t_4 = cos(k) / t_m
if ((l * l) <= 1d-104) then
tmp = ((sqrt((1.0d0 / t_m)) * (t_3 / k)) / k) ** 2.0d0
else if ((l * l) <= 2d+198) then
tmp = 2.0d0 * ((t_4 * (l ** 2.0d0)) / (t_2 ** 2.0d0))
else
tmp = (t_3 * (sqrt(t_4) / 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 = k * Math.sin(k);
double t_3 = l * Math.sqrt(2.0);
double t_4 = Math.cos(k) / t_m;
double tmp;
if ((l * l) <= 1e-104) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0);
} else if ((l * l) <= 2e+198) {
tmp = 2.0 * ((t_4 * Math.pow(l, 2.0)) / Math.pow(t_2, 2.0));
} else {
tmp = Math.pow((t_3 * (Math.sqrt(t_4) / 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 = k * math.sin(k) t_3 = l * math.sqrt(2.0) t_4 = math.cos(k) / t_m tmp = 0 if (l * l) <= 1e-104: tmp = math.pow(((math.sqrt((1.0 / t_m)) * (t_3 / k)) / k), 2.0) elif (l * l) <= 2e+198: tmp = 2.0 * ((t_4 * math.pow(l, 2.0)) / math.pow(t_2, 2.0)) else: tmp = math.pow((t_3 * (math.sqrt(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 = Float64(k * sin(k)) t_3 = Float64(l * sqrt(2.0)) t_4 = Float64(cos(k) / t_m) tmp = 0.0 if (Float64(l * l) <= 1e-104) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(t_3 / k)) / k) ^ 2.0; elseif (Float64(l * l) <= 2e+198) tmp = Float64(2.0 * Float64(Float64(t_4 * (l ^ 2.0)) / (t_2 ^ 2.0))); else tmp = Float64(t_3 * Float64(sqrt(t_4) / 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 = k * sin(k); t_3 = l * sqrt(2.0); t_4 = cos(k) / t_m; tmp = 0.0; if ((l * l) <= 1e-104) tmp = ((sqrt((1.0 / t_m)) * (t_3 / k)) / k) ^ 2.0; elseif ((l * l) <= 2e+198) tmp = 2.0 * ((t_4 * (l ^ 2.0)) / (t_2 ^ 2.0)); else tmp = (t_3 * (sqrt(t_4) / 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[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 1e-104], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(t$95$3 / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+198], N[(2.0 * N[(N[(t$95$4 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$3 * N[(N[Sqrt[t$95$4], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := k \cdot \sin k\\
t_3 := \ell \cdot \sqrt{2}\\
t_4 := \frac{\cos k}{t\_m}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-104}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{t\_3}{k}}{k}\right)}^{2}\\
\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+198}:\\
\;\;\;\;2 \cdot \frac{t\_4 \cdot {\ell}^{2}}{{t\_2}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(t\_3 \cdot \frac{\sqrt{t\_4}}{t\_2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if (*.f64 l l) < 9.99999999999999927e-105Initial program 23.3%
*-commutative23.3%
associate-/r*23.3%
Simplified35.6%
add-sqr-sqrt32.4%
Applied egg-rr28.8%
unpow228.8%
associate-/r*28.8%
associate-/r/28.8%
Simplified28.8%
Taylor expanded in k around 0 38.5%
Taylor expanded in k around 0 51.2%
if 9.99999999999999927e-105 < (*.f64 l l) < 2.00000000000000004e198Initial program 46.1%
Simplified58.3%
Taylor expanded in t around 0 86.7%
associate-*r/86.8%
associate-*r*86.8%
*-commutative86.8%
Simplified86.8%
associate-/l*86.8%
associate-*r*85.2%
pow-prod-down85.2%
Applied egg-rr85.2%
times-frac87.7%
associate-*l/88.2%
*-commutative88.2%
Simplified88.2%
if 2.00000000000000004e198 < (*.f64 l l) Initial program 35.2%
*-commutative35.2%
associate-/r*35.2%
Simplified35.2%
add-sqr-sqrt20.2%
Applied egg-rr27.1%
unpow227.1%
associate-/r*27.2%
associate-/r/27.2%
Simplified27.2%
Taylor expanded in k around inf 49.7%
associate-*l/47.1%
*-commutative47.1%
associate-/l*47.1%
*-commutative47.1%
Simplified47.1%
Final simplification58.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
(if (<= k 6.5e-26)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) k)) k) 2.0)
(*
(* l l)
(/ (* 2.0 (cos k)) (* (pow (sin k) 2.0) (* t_m (pow 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 (k <= 6.5e-26) {
tmp = pow(((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k), 2.0);
} else {
tmp = (l * l) * ((2.0 * cos(k)) / (pow(sin(k), 2.0) * (t_m * pow(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 (k <= 6.5d-26) then
tmp = ((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / k)) / k) ** 2.0d0
else
tmp = (l * l) * ((2.0d0 * cos(k)) / ((sin(k) ** 2.0d0) * (t_m * (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 (k <= 6.5e-26) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / k)) / k), 2.0);
} else {
tmp = (l * l) * ((2.0 * Math.cos(k)) / (Math.pow(Math.sin(k), 2.0) * (t_m * Math.pow(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 k <= 6.5e-26: tmp = math.pow(((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / k)) / k), 2.0) else: tmp = (l * l) * ((2.0 * math.cos(k)) / (math.pow(math.sin(k), 2.0) * (t_m * math.pow(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 (k <= 6.5e-26) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / k)) / k) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64((sin(k) ^ 2.0) * Float64(t_m * (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 (k <= 6.5e-26) tmp = ((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k) ^ 2.0; else tmp = (l * l) * ((2.0 * cos(k)) / ((sin(k) ^ 2.0) * (t_m * (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[k, 6.5e-26], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m * N[Power[k, 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 \begin{array}{l}
\mathbf{if}\;k \leq 6.5 \cdot 10^{-26}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{{\sin k}^{2} \cdot \left(t\_m \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 6.5e-26Initial program 33.7%
*-commutative33.7%
associate-/r*33.7%
Simplified42.7%
add-sqr-sqrt28.3%
Applied egg-rr30.0%
unpow230.0%
associate-/r*30.0%
associate-/r/30.0%
Simplified30.0%
Taylor expanded in k around 0 33.0%
Taylor expanded in k around 0 41.7%
if 6.5e-26 < k Initial program 25.9%
Simplified37.3%
Taylor expanded in t around 0 74.3%
associate-*r/74.3%
associate-*r*74.3%
*-commutative74.3%
Simplified74.3%
Final simplification49.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
(if (<= k 6.5e-26)
(pow (/ (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) k)) k) 2.0)
(* (* l l) (/ (* 2.0 (cos k)) (* t_m (pow (* 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 (k <= 6.5e-26) {
tmp = pow(((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k), 2.0);
} else {
tmp = (l * l) * ((2.0 * cos(k)) / (t_m * pow((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 (k <= 6.5d-26) then
tmp = ((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / k)) / k) ** 2.0d0
else
tmp = (l * l) * ((2.0d0 * cos(k)) / (t_m * ((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 (k <= 6.5e-26) {
tmp = Math.pow(((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / k)) / k), 2.0);
} else {
tmp = (l * l) * ((2.0 * Math.cos(k)) / (t_m * Math.pow((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 k <= 6.5e-26: tmp = math.pow(((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / k)) / k), 2.0) else: tmp = (l * l) * ((2.0 * math.cos(k)) / (t_m * math.pow((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 (k <= 6.5e-26) tmp = Float64(Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / k)) / k) ^ 2.0; else tmp = Float64(Float64(l * l) * Float64(Float64(2.0 * cos(k)) / Float64(t_m * (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 (k <= 6.5e-26) tmp = ((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / k) ^ 2.0; else tmp = (l * l) * ((2.0 * cos(k)) / (t_m * ((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[k, 6.5e-26], N[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $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}\;k \leq 6.5 \cdot 10^{-26}:\\
\;\;\;\;{\left(\frac{\sqrt{\frac{1}{t\_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \frac{2 \cdot \cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\
\end{array}
\end{array}
if k < 6.5e-26Initial program 33.7%
*-commutative33.7%
associate-/r*33.7%
Simplified42.7%
add-sqr-sqrt28.3%
Applied egg-rr30.0%
unpow230.0%
associate-/r*30.0%
associate-/r/30.0%
Simplified30.0%
Taylor expanded in k around 0 33.0%
Taylor expanded in k around 0 41.7%
if 6.5e-26 < k Initial program 25.9%
Simplified37.3%
Taylor expanded in t around 0 74.3%
associate-*r/74.3%
associate-*r*74.3%
*-commutative74.3%
Simplified74.3%
pow174.3%
associate-*r*74.3%
pow-prod-down74.3%
Applied egg-rr74.3%
unpow174.3%
*-commutative74.3%
*-commutative74.3%
Simplified74.3%
Final simplification49.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 (pow (/ (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) k)) 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 * pow(((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / 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 * (((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / k)) / 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 * Math.pow(((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / k)) / 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 * math.pow(((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / k)) / 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(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / k)) / 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 * (((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / k)) / 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[Power[N[(N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / k), $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{\frac{1}{t\_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k}}{k}\right)}^{2}
\end{array}
Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified40.7%
add-sqr-sqrt29.7%
Applied egg-rr27.8%
unpow227.8%
associate-/r*27.8%
associate-/r/27.8%
Simplified27.8%
Taylor expanded in k around 0 32.2%
Taylor expanded in k around 0 40.4%
Final simplification40.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 (/ (* (/ (* l (sqrt 2.0)) k) (pow t_m -0.5)) 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 * pow(((((l * sqrt(2.0)) / k) * pow(t_m, -0.5)) / 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 * sqrt(2.0d0)) / k) * (t_m ** (-0.5d0))) / 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 * Math.pow(((((l * Math.sqrt(2.0)) / k) * Math.pow(t_m, -0.5)) / 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 * math.pow(((((l * math.sqrt(2.0)) / k) * math.pow(t_m, -0.5)) / 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(Float64(Float64(l * sqrt(2.0)) / k) * (t_m ^ -0.5)) / 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 * sqrt(2.0)) / k) * (t_m ^ -0.5)) / 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[Power[N[(N[(N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * N[Power[t$95$m, -0.5], $MachinePrecision]), $MachinePrecision] / k), $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{\frac{\ell \cdot \sqrt{2}}{k} \cdot {t\_m}^{-0.5}}{k}\right)}^{2}
\end{array}
Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified40.7%
add-sqr-sqrt29.7%
Applied egg-rr27.8%
unpow227.8%
associate-/r*27.8%
associate-/r/27.8%
Simplified27.8%
Taylor expanded in k around 0 32.2%
Taylor expanded in k around 0 40.4%
*-un-lft-identity40.4%
pow1/240.4%
inv-pow40.4%
pow-pow40.4%
metadata-eval40.4%
Applied egg-rr40.4%
*-lft-identity40.4%
Simplified40.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 (/ (* l (* (/ (sqrt 2.0) k) (pow t_m -0.5))) 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 * pow(((l * ((sqrt(2.0) / k) * pow(t_m, -0.5))) / 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 * ((sqrt(2.0d0) / k) * (t_m ** (-0.5d0)))) / 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 * Math.pow(((l * ((Math.sqrt(2.0) / k) * Math.pow(t_m, -0.5))) / 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 * math.pow(((l * ((math.sqrt(2.0) / k) * math.pow(t_m, -0.5))) / 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 * Float64(Float64(sqrt(2.0) / k) * (t_m ^ -0.5))) / 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 * ((sqrt(2.0) / k) * (t_m ^ -0.5))) / 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[Power[N[(N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[Power[t$95$m, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $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{\ell \cdot \left(\frac{\sqrt{2}}{k} \cdot {t\_m}^{-0.5}\right)}{k}\right)}^{2}
\end{array}
Initial program 31.8%
*-commutative31.8%
associate-/r*31.8%
Simplified40.7%
add-sqr-sqrt29.7%
Applied egg-rr27.8%
unpow227.8%
associate-/r*27.8%
associate-/r/27.8%
Simplified27.8%
Taylor expanded in k around 0 32.2%
Taylor expanded in k around 0 40.4%
associate-*l/38.9%
*-commutative38.9%
pow1/238.9%
inv-pow38.9%
pow-pow38.9%
metadata-eval38.9%
Applied egg-rr38.9%
associate-*l/40.4%
*-commutative40.4%
associate-*r/40.4%
associate-*l*40.4%
Simplified40.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 (* t_m (pow k 2.0))) (pow 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 / (t_m * pow(k, 2.0))) / pow(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 / (t_m * (k ** 2.0d0))) / (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 / (t_m * Math.pow(k, 2.0))) / Math.pow(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 / (t_m * math.pow(k, 2.0))) / math.pow(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 / Float64(t_m * (k ^ 2.0))) / (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 / (t_m * (k ^ 2.0))) / (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[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.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 \frac{\frac{2}{t\_m \cdot {k}^{2}}}{{k}^{2}}\right)
\end{array}
Initial program 31.8%
Simplified40.8%
Taylor expanded in t around 0 69.7%
associate-*r/69.7%
associate-*r*69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in k around inf 69.7%
associate-*r*69.7%
*-commutative69.7%
associate-/r*69.7%
associate-/l*69.7%
associate-*l/69.7%
associate-/r*69.7%
associate-*r/69.6%
Simplified69.6%
Taylor expanded in k around 0 63.9%
Final simplification63.9%
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) (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 * (2.0 * ((pow(l, 2.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 * (2.0d0 * (((l ** 2.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 * (2.0 * ((Math.pow(l, 2.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 * (2.0 * ((math.pow(l, 2.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(2.0 * Float64(Float64((l ^ 2.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 * (2.0 * (((l ^ 2.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[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / 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(2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t\_m}\right)
\end{array}
Initial program 31.8%
Simplified40.8%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
associate-/r*61.3%
Simplified61.3%
div-inv60.9%
pow-flip60.9%
metadata-eval60.9%
Applied egg-rr60.9%
pow260.9%
pow160.9%
associate-*l*61.3%
Applied egg-rr61.3%
unpow161.3%
associate-*l/61.4%
associate-/l*61.4%
*-commutative61.4%
Simplified61.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 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 \frac{\frac{2}{t\_m}}{{k}^{4}}\right)
\end{array}
Initial program 31.8%
Simplified40.8%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
associate-/r*61.3%
Simplified61.3%
Final simplification61.3%
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 31.8%
Simplified40.8%
Taylor expanded in k around 0 61.3%
Final simplification61.3%
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) (* (pow k -4.0) (/ 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) * (pow(k, -4.0) * (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) * ((k ** (-4.0d0)) * (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) * (Math.pow(k, -4.0) * (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) * (math.pow(k, -4.0) * (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((k ^ -4.0) * Float64(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) * ((k ^ -4.0) * (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[(N[Power[k, -4.0], $MachinePrecision] * N[(2.0 / 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({k}^{-4} \cdot \frac{2}{t\_m}\right)\right)
\end{array}
Initial program 31.8%
Simplified40.8%
Taylor expanded in k around 0 61.3%
*-commutative61.3%
associate-/r*61.3%
Simplified61.3%
div-inv60.9%
pow-flip60.9%
metadata-eval60.9%
Applied egg-rr60.9%
Final simplification60.9%
herbie shell --seed 2024148
(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))))