
(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
(let* ((t_2 (/ l (hypot 1.0 (hypot 1.0 (/ k t_m))))) (t_3 (/ t_m (cbrt l))))
(*
t_s
(if (<= t_m 1.95e-115)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 1.6e+98)
(* t_2 (* (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))) t_2))
(/
2.0
(*
(* (sin k) (* (pow t_3 2.0) (/ t_3 l)))
(* (tan k) (+ 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 = l / hypot(1.0, hypot(1.0, (k / t_m)));
double t_3 = t_m / cbrt(l);
double tmp;
if (t_m <= 1.95e-115) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 1.6e+98) {
tmp = t_2 * ((2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k)))) * t_2);
} else {
tmp = 2.0 / ((sin(k) * (pow(t_3, 2.0) * (t_3 / l))) * (tan(k) * (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 = l / Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
double t_3 = t_m / Math.cbrt(l);
double tmp;
if (t_m <= 1.95e-115) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else if (t_m <= 1.6e+98) {
tmp = t_2 * ((2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k)))) * t_2);
} else {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_3, 2.0) * (t_3 / l))) * (Math.tan(k) * (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 = Float64(l / hypot(1.0, hypot(1.0, Float64(k / t_m)))) t_3 = Float64(t_m / cbrt(l)) tmp = 0.0 if (t_m <= 1.95e-115) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); elseif (t_m <= 1.6e+98) tmp = Float64(t_2 * Float64(Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k)))) * t_2)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_3 ^ 2.0) * Float64(t_3 / l))) * Float64(tan(k) * 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[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.95e-115], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.6e+98], N[(t$95$2 * N[(N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$3, 2.0], $MachinePrecision] * N[(t$95$3 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $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 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}\\
t_3 := \frac{t\_m}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.95 \cdot 10^{-115}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 1.6 \cdot 10^{+98}:\\
\;\;\;\;t\_2 \cdot \left(\frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)} \cdot t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left({t\_3}^{2} \cdot \frac{t\_3}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.9499999999999999e-115Initial program 49.6%
Simplified49.6%
Taylor expanded in t around 0 63.1%
associate-*r*63.1%
times-frac64.8%
Simplified64.8%
if 1.9499999999999999e-115 < t < 1.6000000000000001e98Initial program 82.0%
Simplified82.0%
associate-*r*86.4%
add-sqr-sqrt86.3%
times-frac86.5%
metadata-eval86.5%
associate-+r+86.5%
add-sqr-sqrt86.5%
hypot-1-def86.5%
unpow286.5%
hypot-1-def86.5%
metadata-eval86.5%
Applied egg-rr97.3%
associate-/l*97.4%
Simplified97.4%
if 1.6000000000000001e98 < t Initial program 63.3%
Simplified63.3%
associate-/r*63.8%
add-cube-cbrt63.8%
*-un-lft-identity63.8%
times-frac63.8%
pow263.8%
cbrt-div63.8%
rem-cbrt-cube63.8%
cbrt-div63.8%
rem-cbrt-cube82.4%
Applied egg-rr82.4%
Final simplification73.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ t_m (cbrt l))))
(*
t_s
(if (<= t_m 27000.0)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(/
2.0
(*
(* (sin k) (* (pow t_2 2.0) (/ t_2 l)))
(* (tan k) (+ 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 = t_m / cbrt(l);
double tmp;
if (t_m <= 27000.0) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = 2.0 / ((sin(k) * (pow(t_2, 2.0) * (t_2 / l))) * (tan(k) * (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 = t_m / Math.cbrt(l);
double tmp;
if (t_m <= 27000.0) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_2, 2.0) * (t_2 / l))) * (Math.tan(k) * (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 = Float64(t_m / cbrt(l)) tmp = 0.0 if (t_m <= 27000.0) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_2 ^ 2.0) * Float64(t_2 / l))) * Float64(tan(k) * 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[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 27000.0], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$2, 2.0], $MachinePrecision] * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $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 := \frac{t\_m}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 27000:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left({t\_2}^{2} \cdot \frac{t\_2}{\ell}\right)\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 27000Initial program 53.1%
Simplified53.1%
Taylor expanded in t around 0 66.4%
associate-*r*66.4%
times-frac68.0%
Simplified68.0%
if 27000 < t Initial program 70.5%
Simplified70.5%
associate-/r*73.8%
add-cube-cbrt73.6%
*-un-lft-identity73.6%
times-frac73.6%
pow273.6%
cbrt-div73.6%
rem-cbrt-cube73.6%
cbrt-div73.6%
rem-cbrt-cube86.1%
Applied egg-rr86.1%
Final simplification72.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 5.4e-27)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (pow (/ (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 <= 5.4e-27) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.4d-27) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) / (l ** 2.0d0)) * ((sin(k) ** 2.0d0) / cos(k)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0)))) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.4e-27) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * Math.pow((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 <= 5.4e-27: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) / math.pow(l, 2.0)) * (math.pow(math.sin(k), 2.0) / math.cos(k))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) * (math.sin(k) * math.pow((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 <= 5.4e-27) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(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 <= 5.4e-27) tmp = 2.0 / (((t_m * (k ^ 2.0)) / (l ^ 2.0)) * ((sin(k) ^ 2.0) / cos(k))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))) * (sin(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, 5.4e-27], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $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}\;t\_m \leq 5.4 \cdot 10^{-27}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\
\end{array}
\end{array}
if t < 5.39999999999999978e-27Initial program 52.4%
Simplified52.4%
Taylor expanded in t around 0 66.1%
associate-*r*66.1%
times-frac67.6%
Simplified67.6%
if 5.39999999999999978e-27 < t Initial program 71.2%
Simplified71.2%
add-sqr-sqrt71.1%
pow271.1%
sqrt-div71.1%
sqrt-pow178.8%
metadata-eval78.8%
sqrt-prod48.2%
add-sqr-sqrt85.8%
Applied egg-rr85.8%
Final simplification72.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 5e-24)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(/
(/ (/ 2.0 (tan k)) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)))
(+ 2.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 tmp;
if (t_m <= 5e-24) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = ((2.0 / tan(k)) / (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))) / (2.0 + pow((k / t_m), 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 <= 5d-24) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) / (l ** 2.0d0)) * ((sin(k) ** 2.0d0) / cos(k)))
else
tmp = ((2.0d0 / tan(k)) / (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))) / (2.0d0 + ((k / t_m) ** 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 <= 5e-24) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = ((2.0 / Math.tan(k)) / (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))) / (2.0 + Math.pow((k / t_m), 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 <= 5e-24: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) / math.pow(l, 2.0)) * (math.pow(math.sin(k), 2.0) / math.cos(k))) else: tmp = ((2.0 / math.tan(k)) / (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0))) / (2.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) tmp = 0.0 if (t_m <= 5e-24) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(Float64(Float64(2.0 / tan(k)) / Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))) / Float64(2.0 + (Float64(k / t_m) ^ 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 <= 5e-24) tmp = 2.0 / (((t_m * (k ^ 2.0)) / (l ^ 2.0)) * ((sin(k) ^ 2.0) / cos(k))); else tmp = ((2.0 / tan(k)) / (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0))) / (2.0 + ((k / t_m) ^ 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, 5e-24], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[Tan[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $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}\;t\_m \leq 5 \cdot 10^{-24}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{2}{\tan k}}{\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 4.9999999999999998e-24Initial program 52.4%
Simplified52.4%
Taylor expanded in t around 0 66.1%
associate-*r*66.1%
times-frac67.6%
Simplified67.6%
if 4.9999999999999998e-24 < t Initial program 71.2%
Simplified71.2%
add-sqr-sqrt71.1%
pow271.1%
sqrt-div71.1%
sqrt-pow178.8%
metadata-eval78.8%
sqrt-prod48.2%
add-sqr-sqrt85.8%
Applied egg-rr85.8%
div-inv85.8%
associate-+r+85.8%
metadata-eval85.8%
associate-*r*85.9%
Applied egg-rr85.9%
associate-*r/85.9%
metadata-eval85.9%
associate-/r*85.9%
*-commutative85.9%
associate-/r*85.8%
*-commutative85.8%
Simplified85.8%
Final simplification72.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 27000.0)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ 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) {
double tmp;
if (t_m <= 27000.0) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
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 <= 27000.0d0) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) / (l ** 2.0d0)) * ((sin(k) ** 2.0d0) / cos(k)))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0)))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
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 <= 27000.0) {
tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
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 <= 27000.0: tmp = 2.0 / (((t_m * math.pow(k, 2.0)) / math.pow(l, 2.0)) * (math.pow(math.sin(k), 2.0) / math.cos(k))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) 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 <= 27000.0) tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k)))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); 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 <= 27000.0) tmp = 2.0 / (((t_m * (k ^ 2.0)) / (l ^ 2.0)) * ((sin(k) ^ 2.0) / cos(k))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); 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, 27000.0], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 27000:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 27000Initial program 53.1%
Simplified53.1%
Taylor expanded in t around 0 66.4%
associate-*r*66.4%
times-frac68.0%
Simplified68.0%
if 27000 < t Initial program 70.5%
Simplified70.5%
unpow370.5%
times-frac81.6%
pow281.6%
Applied egg-rr81.6%
Final simplification71.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.36e-27)
(* 2.0 (* (pow l 2.0) (/ (cos k) (* (* k k) (* t_m (pow (sin k) 2.0))))))
(if (<= t_m 2.65e+99)
(*
(* l (/ 2.0 (* (pow t_m 3.0) (* (sin k) (tan k)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 (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 (t_m <= 1.36e-27) {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / ((k * k) * (t_m * pow(sin(k), 2.0)))));
} else if (t_m <= 2.65e+99) {
tmp = (l * (2.0 / (pow(t_m, 3.0) * (sin(k) * tan(k))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * tan(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 (t_m <= 1.36d-27) then
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / ((k * k) * (t_m * (sin(k) ** 2.0d0)))))
else if (t_m <= 2.65d+99) then
tmp = (l * (2.0d0 / ((t_m ** 3.0d0) * (sin(k) * tan(k))))) * (l / (2.0d0 + ((k / t_m) ** 2.0d0)))
else
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * tan(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 (t_m <= 1.36e-27) {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / ((k * k) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else if (t_m <= 2.65e+99) {
tmp = (l * (2.0 / (Math.pow(t_m, 3.0) * (Math.sin(k) * Math.tan(k))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * Math.tan(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 t_m <= 1.36e-27: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / ((k * k) * (t_m * math.pow(math.sin(k), 2.0))))) elif t_m <= 2.65e+99: tmp = (l * (2.0 / (math.pow(t_m, 3.0) * (math.sin(k) * math.tan(k))))) * (l / (2.0 + math.pow((k / t_m), 2.0))) else: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * 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 (t_m <= 1.36e-27) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0)))))); elseif (t_m <= 2.65e+99) tmp = Float64(Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(sin(k) * tan(k))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * tan(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 (t_m <= 1.36e-27) tmp = 2.0 * ((l ^ 2.0) * (cos(k) / ((k * k) * (t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 2.65e+99) tmp = (l * (2.0 / ((t_m ^ 3.0) * (sin(k) * tan(k))))) * (l / (2.0 + ((k / t_m) ^ 2.0))); else tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * tan(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[t$95$m, 1.36e-27], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.65e+99], N[(N[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * 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}\;t\_m \leq 1.36 \cdot 10^{-27}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{elif}\;t\_m \leq 2.65 \cdot 10^{+99}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{{t\_m}^{3} \cdot \left(\sin k \cdot \tan k\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 1.36e-27Initial program 52.4%
Simplified51.6%
Taylor expanded in t around 0 66.1%
associate-*r/66.1%
times-frac66.0%
associate-/r*66.6%
Simplified66.6%
Taylor expanded in k around inf 66.1%
associate-/l*66.1%
Simplified66.1%
unpow266.1%
Applied egg-rr66.1%
if 1.36e-27 < t < 2.65000000000000017e99Initial program 84.3%
Simplified84.3%
associate-*r*91.8%
*-un-lft-identity91.8%
times-frac92.0%
Applied egg-rr92.0%
/-rgt-identity92.0%
*-commutative92.0%
Simplified92.0%
if 2.65000000000000017e99 < t Initial program 63.3%
Simplified63.3%
add-sqr-sqrt63.3%
pow263.3%
sqrt-div63.3%
sqrt-pow175.5%
metadata-eval75.5%
sqrt-prod53.1%
add-sqr-sqrt82.4%
Applied egg-rr82.4%
Taylor expanded in k around 0 80.1%
Final simplification70.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 (<= t_m 1.36e-27)
(* 2.0 (* (pow l 2.0) (/ (cos k) (* (* k k) (* t_m (pow (sin k) 2.0))))))
(/
2.0
(*
(* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0))))
(* (sin k) (* (/ (pow t_m 2.0) l) (/ 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) {
double tmp;
if (t_m <= 1.36e-27) {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / ((k * k) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + pow((k / t_m), 2.0)))) * (sin(k) * ((pow(t_m, 2.0) / l) * (t_m / l))));
}
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 <= 1.36d-27) then
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / ((k * k) * (t_m * (sin(k) ** 2.0d0)))))
else
tmp = 2.0d0 / ((tan(k) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0)))) * (sin(k) * (((t_m ** 2.0d0) / l) * (t_m / l))))
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 <= 1.36e-27) {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / ((k * k) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 / ((Math.tan(k) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0)))) * (Math.sin(k) * ((Math.pow(t_m, 2.0) / l) * (t_m / l))));
}
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.36e-27: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / ((k * k) * (t_m * math.pow(math.sin(k), 2.0))))) else: tmp = 2.0 / ((math.tan(k) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) * (math.sin(k) * ((math.pow(t_m, 2.0) / l) * (t_m / l)))) 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.36e-27) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0)))) * Float64(sin(k) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l))))); 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.36e-27) tmp = 2.0 * ((l ^ 2.0) * (cos(k) / ((k * k) * (t_m * (sin(k) ^ 2.0))))); else tmp = 2.0 / ((tan(k) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))) * (sin(k) * (((t_m ^ 2.0) / l) * (t_m / l)))); 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.36e-27], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $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}\;t\_m \leq 1.36 \cdot 10^{-27}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right) \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)}\\
\end{array}
\end{array}
if t < 1.36e-27Initial program 52.4%
Simplified51.6%
Taylor expanded in t around 0 66.1%
associate-*r/66.1%
times-frac66.0%
associate-/r*66.6%
Simplified66.6%
Taylor expanded in k around inf 66.1%
associate-/l*66.1%
Simplified66.1%
unpow266.1%
Applied egg-rr66.1%
if 1.36e-27 < t Initial program 71.2%
Simplified71.2%
unpow371.2%
times-frac81.5%
pow281.5%
Applied egg-rr81.5%
Final simplification70.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 1.25e+33)
(* 2.0 (* (pow l 2.0) (/ (cos k) (* (* k k) (* t_m (pow (sin k) 2.0))))))
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 (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 (t_m <= 1.25e+33) {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / ((k * k) * (t_m * pow(sin(k), 2.0)))));
} else {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * tan(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 (t_m <= 1.25d+33) then
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / ((k * k) * (t_m * (sin(k) ** 2.0d0)))))
else
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * tan(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 (t_m <= 1.25e+33) {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / ((k * k) * (t_m * Math.pow(Math.sin(k), 2.0)))));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * Math.tan(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 t_m <= 1.25e+33: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / ((k * k) * (t_m * math.pow(math.sin(k), 2.0))))) else: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * 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 (t_m <= 1.25e+33) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64(Float64(k * k) * Float64(t_m * (sin(k) ^ 2.0)))))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * tan(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 (t_m <= 1.25e+33) tmp = 2.0 * ((l ^ 2.0) * (cos(k) / ((k * k) * (t_m * (sin(k) ^ 2.0))))); else tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * tan(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[t$95$m, 1.25e+33], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * 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}\;t\_m \leq 1.25 \cdot 10^{+33}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{\left(k \cdot k\right) \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 1.24999999999999993e33Initial program 53.3%
Simplified52.6%
Taylor expanded in t around 0 66.6%
associate-*r/66.6%
times-frac66.6%
associate-/r*67.1%
Simplified67.1%
Taylor expanded in k around inf 66.6%
associate-/l*66.6%
Simplified66.6%
unpow266.6%
Applied egg-rr66.6%
if 1.24999999999999993e33 < t Initial program 70.0%
Simplified70.0%
add-sqr-sqrt70.0%
pow270.0%
sqrt-div70.0%
sqrt-pow178.4%
metadata-eval78.4%
sqrt-prod49.6%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
Taylor expanded in k around 0 79.9%
Final simplification69.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 (<= t_m 9e+33)
(* 2.0 (* (pow l 2.0) (/ (/ (cos k) t_m) (pow (* k (sin k)) 2.0))))
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 (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 (t_m <= 9e+33) {
tmp = 2.0 * (pow(l, 2.0) * ((cos(k) / t_m) / pow((k * sin(k)), 2.0)));
} else {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * tan(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 (t_m <= 9d+33) then
tmp = 2.0d0 * ((l ** 2.0d0) * ((cos(k) / t_m) / ((k * sin(k)) ** 2.0d0)))
else
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * tan(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 (t_m <= 9e+33) {
tmp = 2.0 * (Math.pow(l, 2.0) * ((Math.cos(k) / t_m) / Math.pow((k * Math.sin(k)), 2.0)));
} else {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * Math.tan(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 t_m <= 9e+33: tmp = 2.0 * (math.pow(l, 2.0) * ((math.cos(k) / t_m) / math.pow((k * math.sin(k)), 2.0))) else: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * 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 (t_m <= 9e+33) tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(Float64(cos(k) / t_m) / (Float64(k * sin(k)) ^ 2.0)))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * tan(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 (t_m <= 9e+33) tmp = 2.0 * ((l ^ 2.0) * ((cos(k) / t_m) / ((k * sin(k)) ^ 2.0))); else tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * tan(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[t$95$m, 9e+33], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * 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}\;t\_m \leq 9 \cdot 10^{+33}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\frac{\cos k}{t\_m}}{{\left(k \cdot \sin k\right)}^{2}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot \tan k\right)}\\
\end{array}
\end{array}
if t < 9.0000000000000001e33Initial program 53.3%
Simplified52.6%
Taylor expanded in t around 0 66.6%
associate-*r/66.6%
times-frac66.6%
associate-/r*67.1%
Simplified67.1%
Taylor expanded in k around inf 66.6%
associate-/l*66.6%
Simplified66.6%
*-un-lft-identity66.6%
associate-*r*66.6%
*-commutative66.6%
Applied egg-rr66.6%
*-lft-identity66.6%
associate-*l*65.6%
unpow265.6%
unpow265.6%
swap-sqr65.5%
unpow265.5%
associate-/r*65.6%
Simplified65.6%
if 9.0000000000000001e33 < t Initial program 70.0%
Simplified70.0%
add-sqr-sqrt70.0%
pow270.0%
sqrt-div70.0%
sqrt-pow178.4%
metadata-eval78.4%
sqrt-prod49.6%
add-sqr-sqrt86.1%
Applied egg-rr86.1%
Taylor expanded in k around 0 79.9%
Final simplification69.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 3.1e-15)
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 k)))
(* 2.0 (* (pow l 2.0) (/ (/ (cos k) t_m) (pow (* k (sin k)) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.1e-15) {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = 2.0 * (pow(l, 2.0) * ((cos(k) / t_m) / pow((k * sin(k)), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3.1d-15) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * k))
else
tmp = 2.0d0 * ((l ** 2.0d0) * ((cos(k) / t_m) / ((k * sin(k)) ** 2.0d0)))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.1e-15) {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * ((Math.cos(k) / t_m) / Math.pow((k * Math.sin(k)), 2.0)));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 3.1e-15: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k)) else: tmp = 2.0 * (math.pow(l, 2.0) * ((math.cos(k) / t_m) / math.pow((k * math.sin(k)), 2.0))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.1e-15) tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(Float64(cos(k) / t_m) / (Float64(k * sin(k)) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 3.1e-15) tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * k)); else tmp = 2.0 * ((l ^ 2.0) * ((cos(k) / t_m) / ((k * sin(k)) ^ 2.0))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.1e-15], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\frac{\cos k}{t\_m}}{{\left(k \cdot \sin k\right)}^{2}}\right)\\
\end{array}
\end{array}
if k < 3.0999999999999999e-15Initial program 59.5%
Simplified59.5%
add-sqr-sqrt28.5%
pow228.5%
sqrt-div28.5%
sqrt-pow131.7%
metadata-eval31.7%
sqrt-prod22.6%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Taylor expanded in k around 0 33.4%
*-commutative33.4%
Simplified33.4%
if 3.0999999999999999e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in k around inf 73.0%
associate-/l*73.0%
Simplified73.0%
*-un-lft-identity73.0%
associate-*r*73.0%
*-commutative73.0%
Applied egg-rr73.0%
*-lft-identity73.0%
associate-*l*73.0%
unpow273.0%
unpow273.0%
swap-sqr72.9%
unpow272.9%
associate-/r*72.9%
Simplified72.9%
Final simplification42.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.45e-15)
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 k)))
(* 2.0 (* (pow l 2.0) (/ (cos k) (* t_m (pow (* k (sin k)) 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.45e-15) {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = 2.0 * (pow(l, 2.0) * (cos(k) / (t_m * pow((k * sin(k)), 2.0))));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 2.45d-15) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * k))
else
tmp = 2.0d0 * ((l ** 2.0d0) * (cos(k) / (t_m * ((k * sin(k)) ** 2.0d0))))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 2.45e-15) {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / (t_m * Math.pow((k * Math.sin(k)), 2.0))));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 2.45e-15: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k)) else: tmp = 2.0 * (math.pow(l, 2.0) * (math.cos(k) / (t_m * math.pow((k * math.sin(k)), 2.0)))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 2.45e-15) tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / Float64(t_m * (Float64(k * sin(k)) ^ 2.0))))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 2.45e-15) tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * k)); else tmp = 2.0 * ((l ^ 2.0) * (cos(k) / (t_m * ((k * sin(k)) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.45e-15], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.45 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\right)\\
\end{array}
\end{array}
if k < 2.45e-15Initial program 59.5%
Simplified59.5%
add-sqr-sqrt28.5%
pow228.5%
sqrt-div28.5%
sqrt-pow131.7%
metadata-eval31.7%
sqrt-prod22.6%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Taylor expanded in k around 0 33.4%
*-commutative33.4%
Simplified33.4%
if 2.45e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in k around inf 73.0%
associate-/l*73.0%
Simplified73.0%
pow173.0%
associate-*r*73.0%
*-commutative73.0%
Applied egg-rr73.0%
unpow173.0%
associate-*l*73.0%
unpow273.0%
unpow273.0%
swap-sqr72.9%
unpow272.9%
Simplified72.9%
Final simplification42.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 7.4e-10)
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 k)))
(if (<= k 4.75e+117)
(/ 2.0 (* (* 2.0 (tan k)) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
(/ (* 2.0 (/ (pow l 2.0) t_m)) (pow (* k (sin k)) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.4e-10) {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else if (k <= 4.75e+117) {
tmp = 2.0 / ((2.0 * tan(k)) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
} else {
tmp = (2.0 * (pow(l, 2.0) / t_m)) / pow((k * sin(k)), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 7.4d-10) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * k))
else if (k <= 4.75d+117) then
tmp = 2.0d0 / ((2.0d0 * tan(k)) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
else
tmp = (2.0d0 * ((l ** 2.0d0) / t_m)) / ((k * sin(k)) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.4e-10) {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else if (k <= 4.75e+117) {
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(l, 2.0) / t_m)) / Math.pow((k * Math.sin(k)), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 7.4e-10: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k)) elif k <= 4.75e+117: 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(l, 2.0) / t_m)) / math.pow((k * math.sin(k)), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 7.4e-10) tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * k))); elseif (k <= 4.75e+117) tmp = Float64(2.0 / Float64(Float64(2.0 * tan(k)) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); else tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) / t_m)) / (Float64(k * sin(k)) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 7.4e-10) tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * k)); elseif (k <= 4.75e+117) tmp = 2.0 / ((2.0 * tan(k)) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); else tmp = (2.0 * ((l ^ 2.0) / t_m)) / ((k * sin(k)) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.4e-10], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.75e+117], N[(2.0 / N[(N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $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}\;k \leq 7.4 \cdot 10^{-10}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{elif}\;k \leq 4.75 \cdot 10^{+117}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \tan k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \frac{{\ell}^{2}}{t\_m}}{{\left(k \cdot \sin k\right)}^{2}}\\
\end{array}
\end{array}
if k < 7.4000000000000003e-10Initial program 59.5%
Simplified59.5%
add-sqr-sqrt28.5%
pow228.5%
sqrt-div28.5%
sqrt-pow131.7%
metadata-eval31.7%
sqrt-prod22.6%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Taylor expanded in k around 0 33.4%
*-commutative33.4%
Simplified33.4%
if 7.4000000000000003e-10 < k < 4.75000000000000021e117Initial program 61.1%
Simplified61.1%
Taylor expanded in k around 0 65.7%
if 4.75000000000000021e117 < k Initial program 40.6%
Simplified40.6%
Taylor expanded in t around 0 63.9%
associate-*r/63.9%
times-frac60.1%
associate-/r*60.2%
Simplified60.2%
frac-times60.2%
associate-/l*60.2%
pow-prod-down60.1%
Applied egg-rr60.1%
Taylor expanded in k around 0 57.5%
Final simplification39.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 1.9e-15)
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 k)))
(/ (* 2.0 (* (/ (cos k) t_m) (* l l))) (pow (* k (sin k)) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.9e-15) {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = (2.0 * ((cos(k) / t_m) * (l * l))) / pow((k * sin(k)), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.9d-15) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * k))
else
tmp = (2.0d0 * ((cos(k) / t_m) * (l * l))) / ((k * sin(k)) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.9e-15) {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = (2.0 * ((Math.cos(k) / t_m) * (l * l))) / Math.pow((k * Math.sin(k)), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.9e-15: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k)) else: tmp = (2.0 * ((math.cos(k) / t_m) * (l * l))) / math.pow((k * math.sin(k)), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.9e-15) tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(Float64(2.0 * Float64(Float64(cos(k) / t_m) * Float64(l * l))) / (Float64(k * sin(k)) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.9e-15) tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * k)); else tmp = (2.0 * ((cos(k) / t_m) * (l * l))) / ((k * sin(k)) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.9e-15], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(k * N[Sin[k], $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}\;k \leq 1.9 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left(\frac{\cos k}{t\_m} \cdot \left(\ell \cdot \ell\right)\right)}{{\left(k \cdot \sin k\right)}^{2}}\\
\end{array}
\end{array}
if k < 1.9000000000000001e-15Initial program 59.5%
Simplified59.5%
add-sqr-sqrt28.5%
pow228.5%
sqrt-div28.5%
sqrt-pow131.7%
metadata-eval31.7%
sqrt-prod22.6%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Taylor expanded in k around 0 33.4%
*-commutative33.4%
Simplified33.4%
if 1.9000000000000001e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
frac-times68.0%
associate-/l*68.0%
pow-prod-down67.9%
Applied egg-rr67.9%
pow267.9%
Applied egg-rr67.9%
Final simplification41.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.9e-15)
(/ 2.0 (* (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0)) (* 2.0 k)))
(/ (* 2.0 (* (pow l 2.0) (/ (cos k) 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 <= 1.9e-15) {
tmp = 2.0 / ((sin(k) * pow((pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = (2.0 * (pow(l, 2.0) * (cos(k) / 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 <= 1.9d-15) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0)) * (2.0d0 * k))
else
tmp = (2.0d0 * ((l ** 2.0d0) * (cos(k) / 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 <= 1.9e-15) {
tmp = 2.0 / ((Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k));
} else {
tmp = (2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / 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 <= 1.9e-15: tmp = 2.0 / ((math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)) * (2.0 * k)) else: tmp = (2.0 * (math.pow(l, 2.0) * (math.cos(k) / 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 <= 1.9e-15) tmp = Float64(2.0 / Float64(Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / 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 <= 1.9e-15) tmp = 2.0 / ((sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)) * (2.0 * k)); else tmp = (2.0 * ((l ^ 2.0) * (cos(k) / 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, 1.9e-15], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.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 1.9 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{t\_m}\right)}{{k}^{4}}\\
\end{array}
\end{array}
if k < 1.9000000000000001e-15Initial program 59.5%
Simplified59.5%
add-sqr-sqrt28.5%
pow228.5%
sqrt-div28.5%
sqrt-pow131.7%
metadata-eval31.7%
sqrt-prod22.6%
add-sqr-sqrt36.1%
Applied egg-rr36.1%
Taylor expanded in k around 0 33.4%
*-commutative33.4%
Simplified33.4%
if 1.9000000000000001e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
frac-times68.0%
associate-/l*68.0%
pow-prod-down67.9%
Applied egg-rr67.9%
Taylor expanded in k around 0 58.4%
Final simplification39.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.5e-19)
(/ (* 2.0 (* (pow l 2.0) (/ (cos k) t_m))) (pow k 4.0))
(if (<= t_m 2.6e+145)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))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.5e-19) {
tmp = (2.0 * (pow(l, 2.0) * (cos(k) / t_m))) / pow(k, 4.0);
} else if (t_m <= 2.6e+145) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
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.5d-19) then
tmp = (2.0d0 * ((l ** 2.0d0) * (cos(k) / t_m))) / (k ** 4.0d0)
else if (t_m <= 2.6d+145) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
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.5e-19) {
tmp = (2.0 * (Math.pow(l, 2.0) * (Math.cos(k) / t_m))) / Math.pow(k, 4.0);
} else if (t_m <= 2.6e+145) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
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.5e-19: tmp = (2.0 * (math.pow(l, 2.0) * (math.cos(k) / t_m))) / math.pow(k, 4.0) elif t_m <= 2.6e+145: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) 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.5e-19) tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * Float64(cos(k) / t_m))) / (k ^ 4.0)); elseif (t_m <= 2.6e+145) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); 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.5e-19) tmp = (2.0 * ((l ^ 2.0) * (cos(k) / t_m))) / (k ^ 4.0); elseif (t_m <= 2.6e+145) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k))); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); 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.5e-19], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e+145], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * 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]
\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.5 \cdot 10^{-19}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \frac{\cos k}{t\_m}\right)}{{k}^{4}}\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{+145}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 3.50000000000000015e-19Initial program 53.1%
Simplified52.4%
Taylor expanded in t around 0 66.6%
associate-*r/66.6%
times-frac66.6%
associate-/r*67.1%
Simplified67.1%
frac-times65.4%
associate-/l*65.4%
pow-prod-down65.4%
Applied egg-rr65.4%
Taylor expanded in k around 0 57.4%
if 3.50000000000000015e-19 < t < 2.60000000000000003e145Initial program 70.2%
Simplified75.6%
Taylor expanded in k around 0 61.6%
unpow265.1%
Applied egg-rr61.6%
unpow361.6%
*-un-lft-identity61.6%
times-frac73.7%
pow273.7%
Applied egg-rr73.7%
if 2.60000000000000003e145 < t Initial program 69.5%
Simplified69.5%
Taylor expanded in k around 0 69.5%
*-commutative76.1%
Simplified69.5%
Final simplification60.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 (<= t_m 3.2e-19)
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k))))
(if (<= t_m 5.1e+144)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
(/ 2.0 (* (* 2.0 k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))))))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.2e-19) {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
} else if (t_m <= 5.1e+144) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((2.0 * k) * (sin(k) * (pow(t_m, 3.0) / (l * l))));
}
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.2d-19) then
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * k)))
else if (t_m <= 5.1d+144) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 / ((2.0d0 * k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))
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.2e-19) {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
} else if (t_m <= 5.1e+144) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((2.0 * k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))));
}
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.2e-19: tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) elif t_m <= 5.1e+144: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))) else: tmp = 2.0 / ((2.0 * k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) 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.2e-19) tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); elseif (t_m <= 5.1e+144) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))); 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.2e-19) tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * k))); elseif (t_m <= 5.1e+144) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k))); else tmp = 2.0 / ((2.0 * k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))); 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.2e-19], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.1e+144], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * 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]
\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.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 5.1 \cdot 10^{+144}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)}\\
\end{array}
\end{array}
if t < 3.19999999999999982e-19Initial program 53.1%
Simplified52.4%
Taylor expanded in t around 0 66.6%
associate-*r/66.6%
times-frac66.6%
associate-/r*67.1%
Simplified67.1%
Taylor expanded in k around 0 58.0%
unpow266.6%
Applied egg-rr58.0%
if 3.19999999999999982e-19 < t < 5.0999999999999999e144Initial program 70.2%
Simplified75.6%
Taylor expanded in k around 0 61.6%
unpow265.1%
Applied egg-rr61.6%
unpow361.6%
*-un-lft-identity61.6%
times-frac73.7%
pow273.7%
Applied egg-rr73.7%
if 5.0999999999999999e144 < t Initial program 69.5%
Simplified69.5%
Taylor expanded in k around 0 69.5%
*-commutative76.1%
Simplified69.5%
Final simplification61.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 3.1e-15)
(/ 2.0 (* (* 2.0 (* k k)) (/ (pow (/ t_m (cbrt l)) 3.0) l)))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.1e-15) {
tmp = 2.0 / ((2.0 * (k * k)) * (pow((t_m / cbrt(l)), 3.0) / l));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.1e-15) {
tmp = 2.0 / ((2.0 * (k * k)) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * k)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.1e-15) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * k)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.1e-15], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * 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 3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 3.0999999999999999e-15Initial program 59.5%
Simplified61.2%
Taylor expanded in k around 0 59.6%
unpow261.6%
Applied egg-rr59.6%
add-cube-cbrt59.6%
pow359.6%
cbrt-div59.6%
rem-cbrt-cube62.7%
Applied egg-rr62.7%
if 3.0999999999999999e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in k around 0 58.5%
unpow273.0%
Applied egg-rr58.5%
Final simplification61.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3.1e-15)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
(* (/ 2.0 (pow k 2.0)) (/ (pow l 2.0) (* t_m (* k k)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3.1e-15) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = (2.0 / pow(k, 2.0)) * (pow(l, 2.0) / (t_m * (k * 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 <= 3.1d-15) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
else
tmp = (2.0d0 / (k ** 2.0d0)) * ((l ** 2.0d0) / (t_m * (k * 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 <= 3.1e-15) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = (2.0 / Math.pow(k, 2.0)) * (Math.pow(l, 2.0) / (t_m * (k * 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 <= 3.1e-15: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))) else: tmp = (2.0 / math.pow(k, 2.0)) * (math.pow(l, 2.0) / (t_m * (k * k))) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 3.1e-15) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(Float64(2.0 / (k ^ 2.0)) * Float64((l ^ 2.0) / Float64(t_m * Float64(k * 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 <= 3.1e-15) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k))); else tmp = (2.0 / (k ^ 2.0)) * ((l ^ 2.0) / (t_m * (k * 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, 3.1e-15], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[(k * 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 3.1 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{k}^{2}} \cdot \frac{{\ell}^{2}}{t\_m \cdot \left(k \cdot k\right)}\\
\end{array}
\end{array}
if k < 3.0999999999999999e-15Initial program 59.5%
Simplified61.2%
Taylor expanded in k around 0 59.6%
unpow261.6%
Applied egg-rr59.6%
unpow359.6%
*-un-lft-identity59.6%
times-frac62.1%
pow262.1%
Applied egg-rr62.1%
if 3.0999999999999999e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in t around 0 73.0%
associate-*r/73.0%
times-frac68.0%
associate-/r*68.0%
Simplified68.0%
Taylor expanded in k around 0 58.5%
unpow273.0%
Applied egg-rr58.5%
Final simplification61.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 3e-15)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
(/ 2.0 (/ (* t_m (pow k 4.0)) (pow 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 (k <= 3e-15) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((t_m * pow(k, 4.0)) / pow(l, 2.0));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 3d-15) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (l ** 2.0d0))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 3e-15) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / Math.pow(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 k <= 3e-15: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))) else: tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / math.pow(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 (k <= 3e-15) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / (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 (k <= 3e-15) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k))); else tmp = 2.0 / ((t_m * (k ^ 4.0)) / (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[k, 3e-15], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 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 3 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 3e-15Initial program 59.5%
Simplified61.2%
Taylor expanded in k around 0 59.6%
unpow261.6%
Applied egg-rr59.6%
unpow359.6%
*-un-lft-identity59.6%
times-frac62.1%
pow262.1%
Applied egg-rr62.1%
if 3e-15 < k Initial program 50.2%
Simplified50.2%
Taylor expanded in k around inf 32.0%
unpow232.0%
unpow232.0%
times-frac40.3%
unpow240.3%
Simplified40.3%
Taylor expanded in k around 0 56.8%
Final simplification60.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 7.5e+141)
(/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
(* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.5e+141) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 7.5d+141) then
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
else
tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 7.5e+141) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
} else {
tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 7.5e+141: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))) else: tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 7.5e+141) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k)))); else tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 7.5e+141) tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k))); else tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 7.5e+141], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 7.5 \cdot 10^{+141}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\
\end{array}
\end{array}
if k < 7.49999999999999937e141Initial program 59.4%
Simplified61.7%
Taylor expanded in k around 0 58.9%
unpow265.3%
Applied egg-rr58.9%
unpow358.9%
*-un-lft-identity58.9%
times-frac61.0%
pow261.0%
Applied egg-rr61.0%
if 7.49999999999999937e141 < k Initial program 38.5%
Simplified38.5%
Taylor expanded in t around 0 55.7%
associate-*r/55.7%
times-frac54.7%
associate-/r*54.7%
Simplified54.7%
Taylor expanded in k around 0 55.7%
associate-/r*55.7%
Simplified55.7%
Final simplification60.5%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k))))
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(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * 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 \frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 57.3%
Simplified59.4%
Taylor expanded in k around 0 56.8%
unpow264.3%
Applied egg-rr56.8%
unpow356.8%
*-un-lft-identity56.8%
times-frac58.7%
pow258.7%
Applied egg-rr58.7%
Final simplification58.7%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (/ (/ (pow t_m 3.0) l) 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)) * ((pow(t_m, 3.0) / l) / 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 ** 3.0d0) / l) / 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)) * ((Math.pow(t_m, 3.0) / l) / 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)) * ((math.pow(t_m, 3.0) / l) / 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 ^ 3.0) / l) / 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 ^ 3.0) / l) / 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[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $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 \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}
\end{array}
Initial program 57.3%
Simplified59.4%
Taylor expanded in k around 0 56.8%
unpow264.3%
Applied egg-rr56.8%
Final simplification56.8%
herbie shell --seed 2024112
(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))))