
(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 22 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
(*
t_s
(if (<= t_m 1.6e-213)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 6.9e-65)
(/
2.0
(*
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)) 2.0)
(* (sin k) (tan k))))
(/
2.0
(pow
(*
(* (/ t_m (cbrt l)) (cbrt (/ 1.0 l)))
(* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt (sin k))))
3.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 (t_m <= 1.6e-213) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 6.9e-65) {
tmp = 2.0 / (pow((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)), 2.0) * (sin(k) * tan(k)));
} else {
tmp = 2.0 / pow((((t_m / cbrt(l)) * cbrt((1.0 / l))) * (cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(sin(k)))), 3.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 (t_m <= 1.6e-213) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 6.9e-65) {
tmp = 2.0 / (Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)), 2.0) * (Math.sin(k) * Math.tan(k)));
} else {
tmp = 2.0 / Math.pow((((t_m / Math.cbrt(l)) * Math.cbrt((1.0 / l))) * (Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(Math.sin(k)))), 3.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 (t_m <= 1.6e-213) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 6.9e-65) tmp = Float64(2.0 / Float64((Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(sin(k) * tan(k)))); else tmp = Float64(2.0 / (Float64(Float64(Float64(t_m / cbrt(l)) * cbrt(Float64(1.0 / l))) * Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(sin(k)))) ^ 3.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[t$95$m, 1.6e-213], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.9e-65], N[(2.0 / N[(N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.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}\;t\_m \leq 1.6 \cdot 10^{-213}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 6.9 \cdot 10^{-65}:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\frac{1}{\ell}}\right) \cdot \left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\sin k}\right)\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.59999999999999986e-213Initial program 49.4%
div-inv49.4%
add-sqr-sqrt10.2%
pow210.2%
Applied egg-rr4.1%
associate-*r/4.1%
metadata-eval4.1%
Simplified4.1%
Taylor expanded in k around inf 23.0%
if 1.59999999999999986e-213 < t < 6.89999999999999991e-65Initial program 38.6%
div-inv38.6%
add-sqr-sqrt33.1%
pow233.1%
Applied egg-rr67.4%
associate-*r/67.4%
metadata-eval67.4%
Simplified67.4%
associate-*r*67.3%
unpow-prod-down67.3%
pow267.3%
add-sqr-sqrt88.0%
Applied egg-rr88.0%
if 6.89999999999999991e-65 < t Initial program 58.6%
Simplified62.0%
sqr-pow62.0%
*-un-lft-identity62.0%
times-frac70.0%
metadata-eval70.0%
metadata-eval70.0%
Applied egg-rr70.0%
add-cube-cbrt69.7%
pow369.7%
Applied egg-rr81.3%
*-commutative81.3%
cbrt-prod90.5%
Applied egg-rr90.5%
add-cbrt-cube71.4%
unpow371.4%
unpow271.4%
cbrt-prod58.6%
unpow258.6%
cbrt-div58.4%
unpow258.4%
associate-/l/64.8%
div-inv64.8%
cbrt-prod68.7%
cbrt-div71.3%
unpow371.3%
add-cbrt-cube90.5%
Applied egg-rr90.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 (pow (/ k t_m) 2.0))
(t_3
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_3 2e+299)
(/
2.0
(* (pow (/ (pow t_m 1.5) l) 2.0) (* (* (sin k) (tan k)) (+ 2.0 t_2))))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (cbrt (* 2.0 k))))
3.0))
(/ 2.0 (pow (* (/ (* 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 t_2 = pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * ((sin(k) * tan(k)) * (2.0 + t_2)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / pow((((k * sin(k)) / l) * 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * ((Math.sin(k) * Math.tan(k)) * (2.0 + t_2)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / Math.pow((((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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_3 <= 2e+299) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + t_2)))); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(2.0 * k)))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2e+299], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + t\_2\right)\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 2.0000000000000001e299Initial program 80.4%
Simplified81.4%
add-sqr-sqrt29.5%
pow229.5%
associate-/r*28.7%
sqrt-div28.7%
sqrt-pow130.2%
metadata-eval30.2%
sqrt-prod17.4%
add-sqr-sqrt30.9%
Applied egg-rr30.9%
if 2.0000000000000001e299 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 70.2%
Simplified69.6%
sqr-pow45.8%
*-un-lft-identity45.8%
times-frac48.3%
metadata-eval48.3%
metadata-eval48.3%
Applied egg-rr48.3%
add-cube-cbrt48.1%
pow348.1%
Applied egg-rr79.0%
*-commutative79.0%
cbrt-prod93.2%
Applied egg-rr93.2%
Taylor expanded in k around 0 88.5%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
div-inv0.0%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr24.7%
associate-*r/24.7%
metadata-eval24.7%
Simplified24.7%
Taylor expanded in k around inf 41.9%
Final simplification43.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 (pow (/ k t_m) 2.0))
(t_3
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_3 2e+299)
(/
2.0
(* (pow (/ (pow t_m 1.5) l) 2.0) (* (* (sin k) (tan k)) (+ 2.0 t_2))))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* (* t_m (cbrt 2.0)) (/ (pow (cbrt k) 2.0) (pow (cbrt l) 2.0)))
3.0))
(/ 2.0 (pow (* (/ (* 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 t_2 = pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * ((sin(k) * tan(k)) * (2.0 + t_2)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow(((t_m * cbrt(2.0)) * (pow(cbrt(k), 2.0) / pow(cbrt(l), 2.0))), 3.0);
} else {
tmp = 2.0 / pow((((k * sin(k)) / l) * 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * ((Math.sin(k) * Math.tan(k)) * (2.0 + t_2)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow(((t_m * Math.cbrt(2.0)) * (Math.pow(Math.cbrt(k), 2.0) / Math.pow(Math.cbrt(l), 2.0))), 3.0);
} else {
tmp = 2.0 / Math.pow((((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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_3 <= 2e+299) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + t_2)))); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(Float64(t_m * cbrt(2.0)) * Float64((cbrt(k) ^ 2.0) / (cbrt(l) ^ 2.0))) ^ 3.0)); else tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2e+299], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + t\_2\right)\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(\left(t\_m \cdot \sqrt[3]{2}\right) \cdot \frac{{\left(\sqrt[3]{k}\right)}^{2}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 2.0000000000000001e299Initial program 80.4%
Simplified81.4%
add-sqr-sqrt29.5%
pow229.5%
associate-/r*28.7%
sqrt-div28.7%
sqrt-pow130.2%
metadata-eval30.2%
sqrt-prod17.4%
add-sqr-sqrt30.9%
Applied egg-rr30.9%
if 2.0000000000000001e299 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 70.2%
Simplified69.6%
sqr-pow45.8%
*-un-lft-identity45.8%
times-frac48.3%
metadata-eval48.3%
metadata-eval48.3%
Applied egg-rr48.3%
add-cube-cbrt48.1%
pow348.1%
Applied egg-rr79.0%
Taylor expanded in k around 0 69.6%
*-commutative69.6%
Simplified69.6%
pow269.6%
pow269.6%
cbrt-div74.2%
cbrt-prod80.0%
pow280.0%
cbrt-prod90.7%
unpow290.7%
Applied egg-rr90.7%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
div-inv0.0%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr24.7%
associate-*r/24.7%
metadata-eval24.7%
Simplified24.7%
Taylor expanded in k around inf 41.9%
Final simplification44.1%
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 (/ k t_m) 2.0))
(t_3
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_3 2e+299)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 t_2))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l)))
2.0))
(/ 2.0 (pow (* (/ (* 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 t_2 = pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + t_2)) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / pow((((k * sin(k)) / l) * 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + t_2)) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow((((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): t_2 = math.pow((k / t_m), 2.0) t_3 = (1.0 + (1.0 + t_2)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) tmp = 0 if t_3 <= 2e+299: tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + t_2)) * ((math.pow(t_m, 2.0) / l) * (t_m / l))) elif t_3 <= math.inf: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 / math.pow((((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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_3 <= 2e+299) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + t_2)) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(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) t_2 = (k / t_m) ^ 2.0; t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); tmp = 0.0; if (t_3 <= 2e+299) tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + t_2)) * (((t_m ^ 2.0) / l) * (t_m / l))); elseif (t_3 <= Inf) tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2e+299], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + t\_2\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 2.0000000000000001e299Initial program 80.4%
Simplified81.4%
associate-/r*78.7%
unpow378.6%
times-frac83.2%
pow283.2%
Applied egg-rr83.2%
if 2.0000000000000001e299 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 70.2%
div-inv70.2%
add-sqr-sqrt70.2%
pow270.2%
Applied egg-rr59.9%
associate-*r/59.9%
metadata-eval59.9%
Simplified59.9%
Taylor expanded in k around 0 62.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
div-inv0.0%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr24.7%
associate-*r/24.7%
metadata-eval24.7%
Simplified24.7%
Taylor expanded in k around inf 41.9%
Final simplification65.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 (pow (/ k t_m) 2.0))
(t_3
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))
(*
t_s
(if (<= t_3 2e+299)
(/ 2.0 (* (* (* (sin k) (tan k)) (+ 2.0 t_2)) (/ (/ (pow t_m 3.0) l) l)))
(if (<= t_3 INFINITY)
(/
2.0
(pow
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l)))
2.0))
(/ 2.0 (pow (* (/ (* 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 t_2 = pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + t_2)) * ((pow(t_m, 3.0) / l) / l));
} else if (t_3 <= ((double) INFINITY)) {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / pow((((k * sin(k)) / l) * 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 t_2 = Math.pow((k / t_m), 2.0);
double t_3 = (1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
double tmp;
if (t_3 <= 2e+299) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + t_2)) * ((Math.pow(t_m, 3.0) / l) / l));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = 2.0 / Math.pow((((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): t_2 = math.pow((k / t_m), 2.0) t_3 = (1.0 + (1.0 + t_2)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) tmp = 0 if t_3 <= 2e+299: tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + t_2)) * ((math.pow(t_m, 3.0) / l) / l)) elif t_3 <= math.inf: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = 2.0 / math.pow((((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) t_2 = Float64(k / t_m) ^ 2.0 t_3 = Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) tmp = 0.0 if (t_3 <= 2e+299) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + t_2)) * Float64(Float64((t_m ^ 3.0) / l) / l))); elseif (t_3 <= Inf) tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(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) t_2 = (k / t_m) ^ 2.0; t_3 = (1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); tmp = 0.0; if (t_3 <= 2e+299) tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + t_2)) * (((t_m ^ 3.0) / l) / l)); elseif (t_3 <= Inf) tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = 2.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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$3, 2e+299], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $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)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_3 := \left(1 + \left(1 + t\_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + t\_2\right)\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 2.0000000000000001e299Initial program 80.4%
Simplified81.4%
if 2.0000000000000001e299 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0Initial program 70.2%
div-inv70.2%
add-sqr-sqrt70.2%
pow270.2%
Applied egg-rr59.9%
associate-*r/59.9%
metadata-eval59.9%
Simplified59.9%
Taylor expanded in k around 0 62.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) Initial program 0.0%
div-inv0.0%
add-sqr-sqrt0.0%
pow20.0%
Applied egg-rr24.7%
associate-*r/24.7%
metadata-eval24.7%
Simplified24.7%
Taylor expanded in k around inf 41.9%
Final simplification64.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 (<= t_m 7.2e-213)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 4.7e-64)
(/
2.0
(*
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)) 2.0)
(* (sin k) (tan k))))
(/
2.0
(pow
(*
(* (cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))) (cbrt (sin k)))
(/ t_m (pow (cbrt l) 2.0)))
3.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 (t_m <= 7.2e-213) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 4.7e-64) {
tmp = 2.0 / (pow((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)), 2.0) * (sin(k) * tan(k)));
} else {
tmp = 2.0 / pow(((cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0)))) * cbrt(sin(k))) * (t_m / pow(cbrt(l), 2.0))), 3.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 (t_m <= 7.2e-213) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 4.7e-64) {
tmp = 2.0 / (Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)), 2.0) * (Math.sin(k) * Math.tan(k)));
} else {
tmp = 2.0 / Math.pow(((Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))) * Math.cbrt(Math.sin(k))) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.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 (t_m <= 7.2e-213) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 4.7e-64) tmp = Float64(2.0 / Float64((Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(sin(k) * tan(k)))); else tmp = Float64(2.0 / (Float64(Float64(cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))) * cbrt(sin(k))) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.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[t$95$m, 7.2e-213], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.7e-64], N[(2.0 / N[(N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.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}\;t\_m \leq 7.2 \cdot 10^{-213}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 4.7 \cdot 10^{-64}:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)} \cdot \sqrt[3]{\sin k}\right) \cdot \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 7.2000000000000002e-213Initial program 49.4%
div-inv49.4%
add-sqr-sqrt10.2%
pow210.2%
Applied egg-rr4.1%
associate-*r/4.1%
metadata-eval4.1%
Simplified4.1%
Taylor expanded in k around inf 23.0%
if 7.2000000000000002e-213 < t < 4.6999999999999998e-64Initial program 38.6%
div-inv38.6%
add-sqr-sqrt33.1%
pow233.1%
Applied egg-rr67.4%
associate-*r/67.4%
metadata-eval67.4%
Simplified67.4%
associate-*r*67.3%
unpow-prod-down67.3%
pow267.3%
add-sqr-sqrt88.0%
Applied egg-rr88.0%
if 4.6999999999999998e-64 < t Initial program 58.6%
Simplified62.0%
sqr-pow62.0%
*-un-lft-identity62.0%
times-frac70.0%
metadata-eval70.0%
metadata-eval70.0%
Applied egg-rr70.0%
add-cube-cbrt69.7%
pow369.7%
Applied egg-rr81.3%
*-commutative81.3%
cbrt-prod90.5%
Applied egg-rr90.5%
Final simplification50.4%
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 (/ 1.0 l))))
(*
t_s
(if (<= t_m 1.12e-212)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 6.5e+37)
(/
2.0
(*
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)) 2.0)
(* (sin k) (tan k))))
(/
2.0
(*
(* (tan k) (pow (* (cbrt (sin k)) (* t_m (* t_2 t_2))) 3.0))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 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((1.0 / l));
double tmp;
if (t_m <= 1.12e-212) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 6.5e+37) {
tmp = 2.0 / (pow((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)), 2.0) * (sin(k) * tan(k)));
} else {
tmp = 2.0 / ((tan(k) * pow((cbrt(sin(k)) * (t_m * (t_2 * t_2))), 3.0)) * (1.0 + (1.0 + pow((k / t_m), 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((1.0 / l));
double tmp;
if (t_m <= 1.12e-212) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 6.5e+37) {
tmp = 2.0 / (Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)), 2.0) * (Math.sin(k) * Math.tan(k)));
} else {
tmp = 2.0 / ((Math.tan(k) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m * (t_2 * t_2))), 3.0)) * (1.0 + (1.0 + Math.pow((k / t_m), 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(1.0 / l)) tmp = 0.0 if (t_m <= 1.12e-212) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 6.5e+37) tmp = Float64(2.0 / Float64((Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(sin(k) * tan(k)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * (Float64(cbrt(sin(k)) * Float64(t_m * Float64(t_2 * t_2))) ^ 3.0)) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 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[(1.0 / l), $MachinePrecision], 1/3], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.12e-212], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6.5e+37], N[(2.0 / N[(N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $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)
\\
\begin{array}{l}
t_2 := \sqrt[3]{\frac{1}{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.12 \cdot 10^{-212}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+37}:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot {\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot \left(t\_2 \cdot t\_2\right)\right)\right)}^{3}\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.12e-212Initial program 49.4%
div-inv49.4%
add-sqr-sqrt10.2%
pow210.2%
Applied egg-rr4.1%
associate-*r/4.1%
metadata-eval4.1%
Simplified4.1%
Taylor expanded in k around inf 23.0%
if 1.12e-212 < t < 6.4999999999999998e37Initial program 48.6%
div-inv48.6%
add-sqr-sqrt38.0%
pow238.0%
Applied egg-rr62.4%
associate-*r/62.4%
metadata-eval62.4%
Simplified62.4%
associate-*r*62.3%
unpow-prod-down60.7%
pow260.7%
add-sqr-sqrt85.8%
Applied egg-rr85.8%
if 6.4999999999999998e37 < t Initial program 56.2%
add-cube-cbrt56.2%
pow356.2%
associate-/r*65.2%
*-commutative65.2%
cbrt-prod65.2%
associate-/r*56.2%
div-inv56.2%
cbrt-prod56.2%
rem-cbrt-cube66.2%
pow266.2%
pow-flip67.6%
metadata-eval67.6%
Applied egg-rr67.6%
pow1/366.7%
sqr-pow66.7%
metadata-eval66.7%
inv-pow66.7%
metadata-eval66.7%
inv-pow66.7%
unpow-prod-down53.1%
Applied egg-rr53.1%
unpow1/353.4%
unpow1/391.1%
Simplified91.1%
Final simplification49.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 (<= k 9.5e-99)
(/
2.0
(pow
(* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt (sin k)) (cbrt (* 2.0 k))))
3.0))
(/
2.0
(*
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l)) 2.0)
(* (sin k) (tan 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 (k <= 9.5e-99) {
tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (pow((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)), 2.0) * (sin(k) * tan(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 (k <= 9.5e-99) {
tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt((2.0 * k)))), 3.0);
} else {
tmp = 2.0 / (Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)), 2.0) * (Math.sin(k) * Math.tan(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 (k <= 9.5e-99) tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(2.0 * k)))) ^ 3.0)); else tmp = Float64(2.0 / Float64((Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) ^ 2.0) * Float64(sin(k) * tan(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[k, 9.5e-99], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(2.0 * k), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $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 9.5 \cdot 10^{-99}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{2 \cdot k}\right)\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\
\end{array}
\end{array}
if k < 9.5000000000000008e-99Initial program 49.5%
Simplified54.4%
sqr-pow25.9%
*-un-lft-identity25.9%
times-frac29.5%
metadata-eval29.5%
metadata-eval29.5%
Applied egg-rr29.5%
add-cube-cbrt29.4%
pow329.4%
Applied egg-rr73.7%
*-commutative73.7%
cbrt-prod82.4%
Applied egg-rr82.4%
Taylor expanded in k around 0 65.1%
if 9.5000000000000008e-99 < k Initial program 52.9%
div-inv52.9%
add-sqr-sqrt23.5%
pow223.5%
Applied egg-rr21.6%
associate-*r/21.6%
metadata-eval21.6%
Simplified21.6%
associate-*r*21.6%
unpow-prod-down21.7%
pow221.7%
add-sqr-sqrt32.1%
Applied egg-rr32.1%
Final simplification54.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
(if (<= k 350.0)
(/
2.0
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l))) 2.0))
(*
(pow l 2.0)
(/ (/ (/ (* 2.0 (cos k)) t_m) (pow (sin 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) {
double tmp;
if (k <= 350.0) {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = pow(l, 2.0) * ((((2.0 * cos(k)) / t_m) / pow(sin(k), 2.0)) / pow(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 (k <= 350.0) {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = Math.pow(l, 2.0) * ((((2.0 * Math.cos(k)) / t_m) / Math.pow(Math.sin(k), 2.0)) / 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 <= 350.0: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = math.pow(l, 2.0) * ((((2.0 * math.cos(k)) / t_m) / math.pow(math.sin(k), 2.0)) / 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 <= 350.0) tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64((l ^ 2.0) * Float64(Float64(Float64(Float64(2.0 * cos(k)) / t_m) / (sin(k) ^ 2.0)) / (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 <= 350.0) tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = (l ^ 2.0) * ((((2.0 * cos(k)) / t_m) / (sin(k) ^ 2.0)) / (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, 350.0], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[(N[(2.0 * N[Cos[k], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 350:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{2} \cdot \frac{\frac{\frac{2 \cdot \cos k}{t\_m}}{{\sin k}^{2}}}{{k}^{2}}\\
\end{array}
\end{array}
if k < 350Initial program 50.4%
div-inv50.4%
add-sqr-sqrt20.7%
pow220.7%
Applied egg-rr30.1%
associate-*r/30.1%
metadata-eval30.1%
Simplified30.1%
Taylor expanded in k around 0 33.5%
if 350 < k Initial program 51.0%
Simplified50.9%
add-cube-cbrt50.8%
add-sqr-sqrt50.8%
times-frac50.8%
Applied egg-rr58.8%
associate-*l/58.8%
Simplified65.9%
Taylor expanded in k around inf 66.6%
times-frac61.3%
rem-cube-cbrt61.5%
Simplified61.5%
associate-*l/64.7%
associate-/r*64.7%
Applied egg-rr64.7%
associate-/l*67.0%
Simplified67.0%
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 (<= k 1050.0)
(/
2.0
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l))) 2.0))
(*
(/ 2.0 (* t_m (pow k 2.0)))
(/ (* (cos k) (pow l 2.0)) (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 (k <= 1050.0) {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = (2.0 / (t_m * pow(k, 2.0))) * ((cos(k) * pow(l, 2.0)) / pow(sin(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 (k <= 1050.0) {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l, 2.0)) / 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 k <= 1050.0: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = (2.0 / (t_m * math.pow(k, 2.0))) * ((math.cos(k) * math.pow(l, 2.0)) / 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 (k <= 1050.0) tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64(Float64(cos(k) * (l ^ 2.0)) / (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 <= 1050.0) tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = (2.0 / (t_m * (k ^ 2.0))) * ((cos(k) * (l ^ 2.0)) / (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, 1050.0], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 1050:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\sin k}^{2}}\\
\end{array}
\end{array}
if k < 1050Initial program 50.4%
div-inv50.4%
add-sqr-sqrt20.7%
pow220.7%
Applied egg-rr30.1%
associate-*r/30.1%
metadata-eval30.1%
Simplified30.1%
Taylor expanded in k around 0 33.5%
if 1050 < k Initial program 51.0%
Taylor expanded in t around 0 66.9%
associate-*r/66.9%
associate-*r*66.9%
times-frac66.9%
Simplified66.9%
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 (<= t_m 1.85e-26)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 5.5e+102)
(*
(* l (/ (/ 2.0 (tan k)) (* (sin k) (pow t_m 3.0))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/
2.0
(pow
(* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) 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 (t_m <= 1.85e-26) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 5.5e+102) {
tmp = (l * ((2.0 / tan(k)) / (sin(k) * pow(t_m, 3.0)))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 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 (t_m <= 1.85e-26) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 5.5e+102) {
tmp = (l * ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow(t_m, 3.0)))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / 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 t_m <= 1.85e-26: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 5.5e+102: tmp = (l * ((2.0 / math.tan(k)) / (math.sin(k) * math.pow(t_m, 3.0)))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / 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 (t_m <= 1.85e-26) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 5.5e+102) tmp = Float64(Float64(l * Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (t_m ^ 3.0)))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / 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 (t_m <= 1.85e-26) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 5.5e+102) tmp = (l * ((2.0 / tan(k)) / (sin(k) * (t_m ^ 3.0)))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / 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[t$95$m, 1.85e-26], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(N[(l * N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $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}\;t\_m \leq 1.85 \cdot 10^{-26}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\left(\ell \cdot \frac{\frac{2}{\tan k}}{\sin k \cdot {t\_m}^{3}}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.8499999999999999e-26Initial program 47.7%
div-inv47.7%
add-sqr-sqrt15.6%
pow215.6%
Applied egg-rr17.4%
associate-*r/17.4%
metadata-eval17.4%
Simplified17.4%
Taylor expanded in k around inf 34.0%
if 1.8499999999999999e-26 < t < 5.49999999999999981e102Initial program 64.0%
Simplified60.5%
associate-*r*74.4%
*-un-lft-identity74.4%
times-frac78.5%
div-inv78.5%
frac-times78.3%
metadata-eval78.3%
Applied egg-rr78.3%
/-rgt-identity78.3%
*-commutative78.3%
associate-/r*78.5%
*-commutative78.5%
Simplified78.5%
if 5.49999999999999981e102 < t Initial program 54.8%
div-inv54.8%
add-sqr-sqrt39.1%
pow239.1%
Applied egg-rr61.6%
associate-*r/61.6%
metadata-eval61.6%
Simplified61.6%
Taylor expanded in k around 0 78.3%
Final simplification45.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 (<= k 7.5e-8)
(/ 2.0 (pow (* (* k (/ (sqrt 2.0) l)) (sqrt (pow t_m 3.0))) 2.0))
(if (<= k 3.9e+86)
(/ 2.0 (* 2.0 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
(*
2.0
(pow (* t_m (cbrt (* 2.0 (* (pow k 2.0) (pow l -2.0))))) -3.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 <= 7.5e-8) {
tmp = 2.0 / pow(((k * (sqrt(2.0) / l)) * sqrt(pow(t_m, 3.0))), 2.0);
} else if (k <= 3.9e+86) {
tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))));
} else {
tmp = 2.0 * pow((t_m * cbrt((2.0 * (pow(k, 2.0) * pow(l, -2.0))))), -3.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 (k <= 7.5e-8) {
tmp = 2.0 / Math.pow(((k * (Math.sqrt(2.0) / l)) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else if (k <= 3.9e+86) {
tmp = 2.0 / (2.0 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))));
} else {
tmp = 2.0 * Math.pow((t_m * Math.cbrt((2.0 * (Math.pow(k, 2.0) * Math.pow(l, -2.0))))), -3.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 <= 7.5e-8) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 2.0)); elseif (k <= 3.9e+86) tmp = Float64(2.0 / Float64(2.0 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))))); else tmp = Float64(2.0 * (Float64(t_m * cbrt(Float64(2.0 * Float64((k ^ 2.0) * (l ^ -2.0))))) ^ -3.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[k, 7.5e-8], N[(2.0 / N[Power[N[(N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.9e+86], N[(2.0 / N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(t$95$m * N[Power[N[(2.0 * N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], -3.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}\;k \leq 7.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{elif}\;k \leq 3.9 \cdot 10^{+86}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(t\_m \cdot \sqrt[3]{2 \cdot \left({k}^{2} \cdot {\ell}^{-2}\right)}\right)}^{-3}\\
\end{array}
\end{array}
if k < 7.4999999999999997e-8Initial program 50.1%
div-inv50.1%
add-sqr-sqrt20.5%
pow220.5%
Applied egg-rr30.1%
associate-*r/30.1%
metadata-eval30.1%
Simplified30.1%
Taylor expanded in k around 0 29.2%
associate-/l*29.2%
Simplified29.2%
if 7.4999999999999997e-8 < k < 3.9000000000000002e86Initial program 61.9%
Taylor expanded in k around 0 62.8%
if 3.9000000000000002e86 < k Initial program 46.6%
Simplified49.6%
sqr-pow24.5%
*-un-lft-identity24.5%
times-frac26.8%
metadata-eval26.8%
metadata-eval26.8%
Applied egg-rr26.8%
add-cube-cbrt26.7%
pow326.6%
Applied egg-rr64.5%
Taylor expanded in k around 0 51.1%
*-commutative51.1%
Simplified51.1%
div-inv51.1%
pow-flip51.1%
associate-*l*51.1%
pow251.1%
pow251.1%
cbrt-unprod51.1%
div-inv51.1%
pow251.1%
pow251.1%
pow-flip51.1%
metadata-eval51.1%
metadata-eval51.1%
Applied egg-rr51.1%
Final simplification35.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 680.0)
(/
2.0
(pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l))) 2.0))
(*
(/ (pow l 2.0) (* k k))
(/ (* 2.0 (cos 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) {
double tmp;
if (k <= 680.0) {
tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = (pow(l, 2.0) / (k * k)) * ((2.0 * cos(k)) / (t_m * pow(sin(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 (k <= 680.0) {
tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 2.0);
} else {
tmp = (Math.pow(l, 2.0) / (k * k)) * ((2.0 * Math.cos(k)) / (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 k <= 680.0: tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 2.0) else: tmp = (math.pow(l, 2.0) / (k * k)) * ((2.0 * math.cos(k)) / (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 (k <= 680.0) tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0)); else tmp = Float64(Float64((l ^ 2.0) / Float64(k * k)) * Float64(Float64(2.0 * cos(k)) / 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 (k <= 680.0) tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 2.0); else tmp = ((l ^ 2.0) / (k * k)) * ((2.0 * cos(k)) / (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[k, 680.0], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Cos[k], $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}\;k \leq 680:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{k \cdot k} \cdot \frac{2 \cdot \cos k}{t\_m \cdot {\sin k}^{2}}\\
\end{array}
\end{array}
if k < 680Initial program 50.4%
div-inv50.4%
add-sqr-sqrt20.7%
pow220.7%
Applied egg-rr30.1%
associate-*r/30.1%
metadata-eval30.1%
Simplified30.1%
Taylor expanded in k around 0 33.5%
if 680 < k Initial program 51.0%
Simplified50.9%
add-cube-cbrt50.8%
add-sqr-sqrt50.8%
times-frac50.8%
Applied egg-rr58.8%
associate-*l/58.8%
Simplified65.9%
Taylor expanded in k around inf 66.6%
times-frac61.3%
rem-cube-cbrt61.5%
Simplified61.5%
unpow261.5%
Applied egg-rr61.5%
Final simplification40.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 (<= t_m 3.4e-44)
(/ 2.0 (pow (* (/ (* k (sin k)) l) (sqrt (/ t_m (cos k)))) 2.0))
(/ 2.0 (pow (* (* k (/ (sqrt 2.0) l)) (sqrt (pow t_m 3.0))) 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 (t_m <= 3.4e-44) {
tmp = 2.0 / pow((((k * sin(k)) / l) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / pow(((k * (sqrt(2.0) / l)) * sqrt(pow(t_m, 3.0))), 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 (t_m <= 3.4d-44) then
tmp = 2.0d0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 / (((k * (sqrt(2.0d0) / l)) * sqrt((t_m ** 3.0d0))) ** 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 (t_m <= 3.4e-44) {
tmp = 2.0 / Math.pow((((k * Math.sin(k)) / l) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / Math.pow(((k * (Math.sqrt(2.0) / l)) * Math.sqrt(Math.pow(t_m, 3.0))), 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 t_m <= 3.4e-44: tmp = 2.0 / math.pow((((k * math.sin(k)) / l) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 / math.pow(((k * (math.sqrt(2.0) / l)) * math.sqrt(math.pow(t_m, 3.0))), 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 (t_m <= 3.4e-44) tmp = Float64(2.0 / (Float64(Float64(Float64(k * sin(k)) / l) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64(k * Float64(sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 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 (t_m <= 3.4e-44) tmp = 2.0 / ((((k * sin(k)) / l) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / (((k * (sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 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[t$95$m, 3.4e-44], N[(2.0 / N[Power[N[(N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $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}\;t\_m \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;\frac{2}{{\left(\frac{k \cdot \sin k}{\ell} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.40000000000000016e-44Initial program 48.0%
div-inv48.0%
add-sqr-sqrt15.7%
pow215.7%
Applied egg-rr17.0%
associate-*r/17.0%
metadata-eval17.0%
Simplified17.0%
Taylor expanded in k around inf 33.6%
if 3.40000000000000016e-44 < t Initial program 57.7%
div-inv57.7%
add-sqr-sqrt39.5%
pow239.5%
Applied egg-rr56.9%
associate-*r/56.9%
metadata-eval56.9%
Simplified56.9%
Taylor expanded in k around 0 63.9%
associate-/l*63.9%
Simplified63.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
(if (<= k 6.5e-6)
(/ 2.0 (pow (* (* k (/ (sqrt 2.0) l)) (sqrt (pow t_m 3.0))) 2.0))
(if (<= k 1.75e+107)
(/ 2.0 (* 2.0 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
(* (/ 2.0 (* t_m (pow k 2.0))) (/ (pow l 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) {
double tmp;
if (k <= 6.5e-6) {
tmp = 2.0 / pow(((k * (sqrt(2.0) / l)) * sqrt(pow(t_m, 3.0))), 2.0);
} else if (k <= 1.75e+107) {
tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))));
} else {
tmp = (2.0 / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / 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-6) then
tmp = 2.0d0 / (((k * (sqrt(2.0d0) / l)) * sqrt((t_m ** 3.0d0))) ** 2.0d0)
else if (k <= 1.75d+107) then
tmp = 2.0d0 / (2.0d0 * (tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))))
else
tmp = (2.0d0 / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (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-6) {
tmp = 2.0 / Math.pow(((k * (Math.sqrt(2.0) / l)) * Math.sqrt(Math.pow(t_m, 3.0))), 2.0);
} else if (k <= 1.75e+107) {
tmp = 2.0 / (2.0 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))));
} else {
tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / 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-6: tmp = 2.0 / math.pow(((k * (math.sqrt(2.0) / l)) * math.sqrt(math.pow(t_m, 3.0))), 2.0) elif k <= 1.75e+107: tmp = 2.0 / (2.0 * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) else: tmp = (2.0 / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / 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-6) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 2.0)); elseif (k <= 1.75e+107) tmp = Float64(2.0 / Float64(2.0 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))))); else tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (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-6) tmp = 2.0 / (((k * (sqrt(2.0) / l)) * sqrt((t_m ^ 3.0))) ^ 2.0); elseif (k <= 1.75e+107) tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))); else tmp = (2.0 / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (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-6], N[(2.0 / N[Power[N[(N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.75e+107], N[(2.0 / N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 6.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sqrt{2}}{\ell}\right) \cdot \sqrt{{t\_m}^{3}}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.75 \cdot 10^{+107}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{k}^{2}}\\
\end{array}
\end{array}
if k < 6.4999999999999996e-6Initial program 50.1%
div-inv50.1%
add-sqr-sqrt20.5%
pow220.5%
Applied egg-rr30.1%
associate-*r/30.1%
metadata-eval30.1%
Simplified30.1%
Taylor expanded in k around 0 29.2%
associate-/l*29.2%
Simplified29.2%
if 6.4999999999999996e-6 < k < 1.7499999999999999e107Initial program 61.9%
Taylor expanded in k around 0 55.2%
if 1.7499999999999999e107 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification35.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 (<= k 0.000185)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(if (<= k 3.5e+108)
(/ 2.0 (* 2.0 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
(* (/ 2.0 (* t_m (pow k 2.0))) (/ (pow l 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) {
double tmp;
if (k <= 0.000185) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else if (k <= 3.5e+108) {
tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))));
} else {
tmp = (2.0 / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / 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 <= 0.000185d0) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else if (k <= 3.5d+108) then
tmp = 2.0d0 / (2.0d0 * (tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))))
else
tmp = (2.0d0 / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (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 <= 0.000185) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else if (k <= 3.5e+108) {
tmp = 2.0 / (2.0 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))));
} else {
tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / 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 <= 0.000185: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) elif k <= 3.5e+108: tmp = 2.0 / (2.0 * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) else: tmp = (2.0 / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / 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 <= 0.000185) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); elseif (k <= 3.5e+108) tmp = Float64(2.0 / Float64(2.0 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))))); else tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (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 <= 0.000185) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); elseif (k <= 3.5e+108) tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))); else tmp = (2.0 / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (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, 0.000185], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e+108], N[(2.0 / N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 0.000185:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{elif}\;k \leq 3.5 \cdot 10^{+108}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{k}^{2}}\\
\end{array}
\end{array}
if k < 1.85e-4Initial program 50.1%
Simplified55.1%
Taylor expanded in k around 0 52.6%
unpow257.0%
Applied egg-rr52.6%
add-sqr-sqrt25.3%
pow225.3%
associate-/r*21.5%
sqrt-div21.5%
sqrt-pow124.6%
metadata-eval24.6%
sqrt-prod16.1%
add-sqr-sqrt30.8%
Applied egg-rr27.9%
if 1.85e-4 < k < 3.5000000000000002e108Initial program 61.9%
Taylor expanded in k around 0 55.2%
if 3.5000000000000002e108 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification34.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 (<= k 1.35e+107)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(* (/ 2.0 (* t_m (pow k 2.0))) (/ (pow l 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) {
double tmp;
if (k <= 1.35e+107) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = (2.0 / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / 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 <= 1.35d+107) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else
tmp = (2.0d0 / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (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 <= 1.35e+107) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / 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 <= 1.35e+107: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) else: tmp = (2.0 / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / 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 <= 1.35e+107) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (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 <= 1.35e+107) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); else tmp = (2.0 / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (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, 1.35e+107], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $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 \begin{array}{l}
\mathbf{if}\;k \leq 1.35 \cdot 10^{+107}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{k}^{2}}\\
\end{array}
\end{array}
if k < 1.3500000000000001e107Initial program 51.5%
Simplified56.5%
Taylor expanded in k around 0 51.7%
unpow257.9%
Applied egg-rr51.7%
add-sqr-sqrt25.1%
pow225.1%
associate-/r*21.2%
sqrt-div21.2%
sqrt-pow124.4%
metadata-eval24.4%
sqrt-prod17.0%
add-sqr-sqrt30.3%
Applied egg-rr26.0%
if 1.3500000000000001e107 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification30.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 (<= k 2.8e+105)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(* 2.0 (/ (pow l 2.0) (* (pow k 3.0) (* t_m (sin 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 (k <= 2.8e+105) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (pow(l, 2.0) / (pow(k, 3.0) * (t_m * sin(k))));
}
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 <= 2.8d+105) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 * ((l ** 2.0d0) / ((k ** 3.0d0) * (t_m * sin(k))))
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 <= 2.8e+105) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 3.0) * (t_m * Math.sin(k))));
}
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 <= 2.8e+105: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) else: tmp = 2.0 * (math.pow(l, 2.0) / (math.pow(k, 3.0) * (t_m * math.sin(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 (k <= 2.8e+105) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 3.0) * Float64(t_m * sin(k))))); 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 <= 2.8e+105) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); else tmp = 2.0 * ((l ^ 2.0) / ((k ^ 3.0) * (t_m * sin(k)))); 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, 2.8e+105], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 3.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $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 2.8 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{3} \cdot \left(t\_m \cdot \sin k\right)}\\
\end{array}
\end{array}
if k < 2.8000000000000001e105Initial program 51.5%
Simplified56.5%
Taylor expanded in k around 0 51.7%
unpow257.9%
Applied egg-rr51.7%
add-sqr-sqrt25.1%
pow225.1%
associate-/r*21.2%
sqrt-div21.2%
sqrt-pow124.4%
metadata-eval24.4%
sqrt-prod17.0%
add-sqr-sqrt30.3%
Applied egg-rr26.0%
if 2.8000000000000001e105 < k Initial program 44.4%
Simplified44.4%
Taylor expanded in k around 0 41.8%
Taylor expanded in k around inf 54.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 2.6e+108)
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k k))))
(* 2.0 (/ (pow 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) {
double tmp;
if (k <= 2.6e+108) {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.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 <= 2.6d+108) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.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 <= 2.6e+108) {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.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 <= 2.6e+108: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * k))) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.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 <= 2.6e+108) tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.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 <= 2.6e+108) tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * k))); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.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, 2.6e+108], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;k \leq 2.6 \cdot 10^{+108}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 2.6000000000000002e108Initial program 51.5%
Simplified56.5%
Taylor expanded in k around 0 51.7%
unpow257.9%
Applied egg-rr51.7%
add-sqr-sqrt25.1%
pow225.1%
associate-/r*21.2%
sqrt-div21.2%
sqrt-pow124.4%
metadata-eval24.4%
sqrt-prod17.0%
add-sqr-sqrt30.3%
Applied egg-rr26.0%
if 2.6000000000000002e108 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification30.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 (<= k 5.8e+106)
(/ 2.0 (* (/ (pow t_m 3.0) l) (/ (* 2.0 (pow k 2.0)) l)))
(* 2.0 (/ (pow 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) {
double tmp;
if (k <= 5.8e+106) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * ((2.0 * pow(k, 2.0)) / l));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.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 <= 5.8d+106) then
tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * ((2.0d0 * (k ** 2.0d0)) / l))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.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 <= 5.8e+106) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * ((2.0 * Math.pow(k, 2.0)) / l));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.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 <= 5.8e+106: tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * ((2.0 * math.pow(k, 2.0)) / l)) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.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 <= 5.8e+106) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.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 <= 5.8e+106) tmp = 2.0 / (((t_m ^ 3.0) / l) * ((2.0 * (k ^ 2.0)) / l)); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.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, 5.8e+106], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;k \leq 5.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 5.8000000000000004e106Initial program 51.5%
Simplified56.5%
Taylor expanded in k around 0 51.7%
associate-*l/53.8%
Applied egg-rr53.8%
associate-/l*54.1%
Simplified54.1%
if 5.8000000000000004e106 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification54.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 (<= k 2.8e+105)
(/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))
(* 2.0 (/ (pow 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) {
double tmp;
if (k <= 2.8e+105) {
tmp = 2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)));
} else {
tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.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 <= 2.8d+105) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))
else
tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.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 <= 2.8e+105) {
tmp = 2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.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 <= 2.8e+105: tmp = 2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))) else: tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.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 <= 2.8e+105) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l)))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.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 <= 2.8e+105) tmp = 2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))); else tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.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, 2.8e+105], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / 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 \begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\
\end{array}
\end{array}
if k < 2.8000000000000001e105Initial program 51.5%
Simplified56.5%
Taylor expanded in k around 0 51.7%
unpow257.9%
Applied egg-rr51.7%
associate-/r*50.0%
unpow350.0%
times-frac60.2%
pow260.2%
Applied egg-rr53.5%
unpow253.5%
Applied egg-rr53.5%
if 2.8000000000000001e105 < k Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
add-sqr-sqrt44.4%
times-frac44.4%
Applied egg-rr53.0%
associate-*l/53.0%
Simplified56.0%
Taylor expanded in k around inf 59.6%
times-frac59.6%
rem-cube-cbrt59.7%
Simplified59.7%
Taylor expanded in k around 0 54.2%
Final simplification53.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 (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
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 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
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(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))))) 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 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))); 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[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 50.5%
Simplified55.3%
Taylor expanded in k around 0 50.8%
unpow258.2%
Applied egg-rr50.8%
associate-/r*49.2%
unpow349.2%
times-frac58.8%
pow258.8%
Applied egg-rr52.7%
unpow252.7%
Applied egg-rr52.7%
Final simplification52.7%
herbie shell --seed 2024172
(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))))