
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 2.55e-100)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 5.5e+102)
(/ (* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k)))) t_2)
(/
2.0
(*
t_2
(*
(tan k)
(* (sin k) (pow (/ (/ t_m (cbrt l)) (cbrt l)) 3.0))))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.55e-100) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 5.5e+102) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / t_2;
} else {
tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.55e-100) {
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 <= 5.5e+102) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / t_2;
} else {
tmp = 2.0 / (t_2 * (Math.tan(k) * (Math.sin(k) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 3.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(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 2.55e-100) 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 <= 5.5e+102) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / t_2); else tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(sin(k) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 3.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.55e-100], 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, 5.5e+102], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.55 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 2.5499999999999999e-100Initial program 51.9%
associate-/r*57.2%
add-cube-cbrt57.1%
add-sqr-sqrt27.3%
times-frac27.3%
pow227.3%
cbrt-div27.3%
rem-cbrt-cube27.3%
cbrt-div27.3%
rem-cbrt-cube33.2%
Applied egg-rr33.2%
Taylor expanded in t around 0 64.5%
associate-*r*64.4%
times-frac65.5%
Simplified65.5%
if 2.5499999999999999e-100 < t < 5.49999999999999981e102Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 5.49999999999999981e102 < t Initial program 56.6%
Taylor expanded in k around 0 45.5%
unpow245.5%
unpow245.5%
times-frac56.6%
unpow256.6%
Simplified56.6%
associate-/r*57.4%
add-cube-cbrt57.4%
*-un-lft-identity57.4%
times-frac57.4%
pow257.4%
cbrt-div57.4%
rem-cbrt-cube57.4%
cbrt-div57.4%
rem-cbrt-cube73.2%
Applied egg-rr73.2%
add-cube-cbrt73.2%
pow373.2%
frac-times68.1%
unpow268.1%
*-un-lft-identity68.1%
cbrt-div68.2%
add-cbrt-cube75.9%
Applied egg-rr75.9%
Final simplification71.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 2.7e-100)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 5.5e+102)
(/ (* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k)))) t_2)
(/
2.0
(*
(sin k)
(/ (* (tan k) t_2) (pow (/ (pow (cbrt l) 2.0) t_m) 3.0)))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.7e-100) {
tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
} else if (t_m <= 5.5e+102) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / t_2;
} else {
tmp = 2.0 / (sin(k) * ((tan(k) * t_2) / pow((pow(cbrt(l), 2.0) / t_m), 3.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 2.7e-100) {
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 <= 5.5e+102) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / t_2;
} else {
tmp = 2.0 / (Math.sin(k) * ((Math.tan(k) * t_2) / Math.pow((Math.pow(Math.cbrt(l), 2.0) / t_m), 3.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(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 2.7e-100) 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 <= 5.5e+102) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / t_2); else tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64(tan(k) * t_2) / (Float64((cbrt(l) ^ 2.0) / t_m) ^ 3.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.7e-100], 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, 5.5e+102], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $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 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\sin k \cdot \frac{\tan k \cdot t\_2}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}\right)}^{3}}}\\
\end{array}
\end{array}
\end{array}
if t < 2.70000000000000016e-100Initial program 51.9%
associate-/r*57.2%
add-cube-cbrt57.1%
add-sqr-sqrt27.3%
times-frac27.3%
pow227.3%
cbrt-div27.3%
rem-cbrt-cube27.3%
cbrt-div27.3%
rem-cbrt-cube33.2%
Applied egg-rr33.2%
Taylor expanded in t around 0 64.5%
associate-*r*64.4%
times-frac65.5%
Simplified65.5%
if 2.70000000000000016e-100 < t < 5.49999999999999981e102Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 5.49999999999999981e102 < t Initial program 56.6%
Simplified39.9%
associate-/r*39.2%
*-commutative39.2%
clear-num39.2%
un-div-inv39.2%
associate-*l*39.2%
pow239.2%
Applied egg-rr39.2%
associate-/l*56.6%
Simplified56.6%
add-cube-cbrt56.6%
pow256.6%
cbrt-div56.6%
unpow256.6%
cbrt-prod56.6%
pow256.6%
unpow356.6%
add-cbrt-cube56.6%
cbrt-div56.6%
unpow256.6%
cbrt-prod57.4%
pow257.4%
unpow357.4%
add-cbrt-cube75.7%
Applied egg-rr75.7%
unpow275.7%
unpow375.8%
Simplified75.8%
Final simplification71.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 (<= t_m 3.3e-100)
(/
2.0
(* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
(if (<= t_m 1.12e+108)
(/
(* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k))))
(+ 2.0 (pow (/ k t_m) 2.0)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-100) {
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.12e+108) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + pow((k / t_m), 2.0));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.3d-100) then
tmp = 2.0d0 / (((t_m * (k ** 2.0d0)) / (l ** 2.0d0)) * ((sin(k) ** 2.0d0) / cos(k)))
else if (t_m <= 1.12d+108) then
tmp = (l * (((2.0d0 / (t_m ** 3.0d0)) / tan(k)) * (l / sin(k)))) / (2.0d0 + ((k / t_m) ** 2.0d0))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-100) {
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.12e+108) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / (2.0 + Math.pow((k / t_m), 2.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.3e-100: 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))) elif t_m <= 1.12e+108: tmp = (l * (((2.0 / math.pow(t_m, 3.0)) / math.tan(k)) * (l / math.sin(k)))) / (2.0 + math.pow((k / t_m), 2.0)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.3e-100) 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.12e+108) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.3e-100) tmp = 2.0 / (((t_m * (k ^ 2.0)) / (l ^ 2.0)) * ((sin(k) ^ 2.0) / cos(k))); elseif (t_m <= 1.12e+108) tmp = (l * (((2.0 / (t_m ^ 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + ((k / t_m) ^ 2.0)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3e-100], 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.12e+108], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{+108}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.29999999999999996e-100Initial program 51.9%
associate-/r*57.2%
add-cube-cbrt57.1%
add-sqr-sqrt27.3%
times-frac27.3%
pow227.3%
cbrt-div27.3%
rem-cbrt-cube27.3%
cbrt-div27.3%
rem-cbrt-cube33.2%
Applied egg-rr33.2%
Taylor expanded in t around 0 64.5%
associate-*r*64.4%
times-frac65.5%
Simplified65.5%
if 3.29999999999999996e-100 < t < 1.11999999999999994e108Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 1.11999999999999994e108 < t Initial program 56.6%
Simplified39.9%
add-sqr-sqrt25.6%
pow225.6%
associate-/r*25.3%
sqrt-prod25.3%
sqrt-div25.3%
sqrt-pow133.6%
metadata-eval33.6%
sqrt-prod19.5%
add-sqr-sqrt36.5%
associate-*l*36.5%
Applied egg-rr36.5%
Taylor expanded in k around 0 70.7%
Final simplification70.2%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.1e-100)
(*
(/ 2.0 (* t_m (pow k 2.0)))
(/ (* (pow l 2.0) (cos k)) (pow (sin k) 2.0)))
(if (<= t_m 1.12e+108)
(/
(* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k))))
(+ 2.0 (pow (/ k t_m) 2.0)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.1e-100) {
tmp = (2.0 / (t_m * pow(k, 2.0))) * ((pow(l, 2.0) * cos(k)) / pow(sin(k), 2.0));
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + pow((k / t_m), 2.0));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.1d-100) then
tmp = (2.0d0 / (t_m * (k ** 2.0d0))) * (((l ** 2.0d0) * cos(k)) / (sin(k) ** 2.0d0))
else if (t_m <= 1.12d+108) then
tmp = (l * (((2.0d0 / (t_m ** 3.0d0)) / tan(k)) * (l / sin(k)))) / (2.0d0 + ((k / t_m) ** 2.0d0))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.1e-100) {
tmp = (2.0 / (t_m * Math.pow(k, 2.0))) * ((Math.pow(l, 2.0) * Math.cos(k)) / Math.pow(Math.sin(k), 2.0));
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / (2.0 + Math.pow((k / t_m), 2.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.1e-100: tmp = (2.0 / (t_m * math.pow(k, 2.0))) * ((math.pow(l, 2.0) * math.cos(k)) / math.pow(math.sin(k), 2.0)) elif t_m <= 1.12e+108: tmp = (l * (((2.0 / math.pow(t_m, 3.0)) / math.tan(k)) * (l / math.sin(k)))) / (2.0 + math.pow((k / t_m), 2.0)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.1e-100) tmp = Float64(Float64(2.0 / Float64(t_m * (k ^ 2.0))) * Float64(Float64((l ^ 2.0) * cos(k)) / (sin(k) ^ 2.0))); elseif (t_m <= 1.12e+108) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.1e-100) tmp = (2.0 / (t_m * (k ^ 2.0))) * (((l ^ 2.0) * cos(k)) / (sin(k) ^ 2.0)); elseif (t_m <= 1.12e+108) tmp = (l * (((2.0 / (t_m ^ 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + ((k / t_m) ^ 2.0)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.1e-100], N[(N[(2.0 / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.12e+108], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{+108}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.0999999999999999e-100Initial program 51.9%
Simplified47.4%
Taylor expanded in t around 0 64.5%
associate-*r/64.5%
associate-*r*64.5%
times-frac65.0%
Simplified65.0%
if 3.0999999999999999e-100 < t < 1.11999999999999994e108Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 1.11999999999999994e108 < t Initial program 56.6%
Simplified39.9%
add-sqr-sqrt25.6%
pow225.6%
associate-/r*25.3%
sqrt-prod25.3%
sqrt-div25.3%
sqrt-pow133.6%
metadata-eval33.6%
sqrt-prod19.5%
add-sqr-sqrt36.5%
associate-*l*36.5%
Applied egg-rr36.5%
Taylor expanded in k around 0 70.7%
Final simplification69.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.3e-100)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 1.12e+108)
(/
(* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k))))
(+ 2.0 (pow (/ k t_m) 2.0)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-100) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + pow((k / t_m), 2.0));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 3.3d-100) then
tmp = 2.0d0 * (((l ** 2.0d0) * cos(k)) / ((k ** 2.0d0) * (t_m * (sin(k) ** 2.0d0))))
else if (t_m <= 1.12d+108) then
tmp = (l * (((2.0d0 / (t_m ** 3.0d0)) / tan(k)) * (l / sin(k)))) / (2.0d0 + ((k / t_m) ** 2.0d0))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-100) {
tmp = 2.0 * ((Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))));
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / (2.0 + Math.pow((k / t_m), 2.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 3.3e-100: tmp = 2.0 * ((math.pow(l, 2.0) * math.cos(k)) / (math.pow(k, 2.0) * (t_m * math.pow(math.sin(k), 2.0)))) elif t_m <= 1.12e+108: tmp = (l * (((2.0 / math.pow(t_m, 3.0)) / math.tan(k)) * (l / math.sin(k)))) / (2.0 + math.pow((k / t_m), 2.0)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.3e-100) tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))))); elseif (t_m <= 1.12e+108) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 3.3e-100) tmp = 2.0 * (((l ^ 2.0) * cos(k)) / ((k ^ 2.0) * (t_m * (sin(k) ^ 2.0)))); elseif (t_m <= 1.12e+108) tmp = (l * (((2.0 / (t_m ^ 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + ((k / t_m) ^ 2.0)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3e-100], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.12e+108], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3 \cdot 10^{-100}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t\_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{+108}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.29999999999999996e-100Initial program 51.9%
Simplified47.4%
Taylor expanded in t around 0 64.5%
if 3.29999999999999996e-100 < t < 1.11999999999999994e108Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 1.11999999999999994e108 < t Initial program 56.6%
Simplified39.9%
add-sqr-sqrt25.6%
pow225.6%
associate-/r*25.3%
sqrt-prod25.3%
sqrt-div25.3%
sqrt-pow133.6%
metadata-eval33.6%
sqrt-prod19.5%
add-sqr-sqrt36.5%
associate-*l*36.5%
Applied egg-rr36.5%
Taylor expanded in k around 0 70.7%
Final simplification69.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 (<= t_m 2.25e-100)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.12e+108)
(/
(* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k))))
(+ 2.0 (pow (/ k t_m) 2.0)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.25e-100) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + pow((k / t_m), 2.0));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.25d-100) then
tmp = 2.0d0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.12d+108) then
tmp = (l * (((2.0d0 / (t_m ** 3.0d0)) / tan(k)) * (l / sin(k)))) / (2.0d0 + ((k / t_m) ** 2.0d0))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.25e-100) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.12e+108) {
tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / (2.0 + Math.pow((k / t_m), 2.0));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.25e-100: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.12e+108: tmp = (l * (((2.0 / math.pow(t_m, 3.0)) / math.tan(k)) * (l / math.sin(k)))) / (2.0 + math.pow((k / t_m), 2.0)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.25e-100) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.12e+108) tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.25e-100) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.12e+108) tmp = (l * (((2.0 / (t_m ^ 3.0)) / tan(k)) * (l / sin(k)))) / (2.0 + ((k / t_m) ^ 2.0)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.25e-100], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.12e+108], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.25 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.12 \cdot 10^{+108}:\\
\;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.25e-100Initial program 51.9%
Simplified52.8%
add-sqr-sqrt16.2%
pow216.2%
associate-/r*14.2%
sqrt-prod7.6%
sqrt-div7.6%
sqrt-pow18.7%
metadata-eval8.7%
sqrt-prod8.1%
add-sqr-sqrt10.3%
associate-*l*10.3%
Applied egg-rr10.3%
Taylor expanded in t around 0 30.8%
associate-/l*30.8%
Simplified30.8%
if 2.25e-100 < t < 1.11999999999999994e108Initial program 80.8%
Simplified80.5%
associate-*r*83.3%
*-un-lft-identity83.3%
times-frac83.3%
associate-/r*83.3%
Applied egg-rr83.3%
/-rgt-identity83.3%
associate-*r/83.3%
associate-*l/83.0%
*-commutative83.0%
times-frac94.1%
Simplified94.1%
if 1.11999999999999994e108 < t Initial program 56.6%
Simplified39.9%
add-sqr-sqrt25.6%
pow225.6%
associate-/r*25.3%
sqrt-prod25.3%
sqrt-div25.3%
sqrt-pow133.6%
metadata-eval33.6%
sqrt-prod19.5%
add-sqr-sqrt36.5%
associate-*l*36.5%
Applied egg-rr36.5%
Taylor expanded in k around 0 70.7%
Final simplification45.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 2.3e-100)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(if (<= t_m 1.8e+30)
(/
2.0
(*
(/ (pow t_m 3.0) l)
(/ (* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k))) l)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e-100) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else if (t_m <= 1.8e+30) {
tmp = 2.0 / ((pow(t_m, 3.0) / l) * (((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))) / l));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2.3d-100) then
tmp = 2.0d0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ** 2.0d0)
else if (t_m <= 1.8d+30) then
tmp = 2.0d0 / (((t_m ** 3.0d0) / l) * (((2.0d0 + ((k / t_m) ** 2.0d0)) * (sin(k) * tan(k))) / l))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2.3e-100) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else if (t_m <= 1.8e+30) {
tmp = 2.0 / ((Math.pow(t_m, 3.0) / l) * (((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))) / l));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2.3e-100: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) elif t_m <= 1.8e+30: tmp = 2.0 / ((math.pow(t_m, 3.0) / l) * (((2.0 + math.pow((k / t_m), 2.0)) * (math.sin(k) * math.tan(k))) / l)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2.3e-100) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); elseif (t_m <= 1.8e+30) tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) / l) * Float64(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))) / l))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2.3e-100) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); elseif (t_m <= 1.8e+30) tmp = 2.0 / (((t_m ^ 3.0) / l) * (((2.0 + ((k / t_m) ^ 2.0)) * (sin(k) * tan(k))) / l)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.3e-100], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.8e+30], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 1.8 \cdot 10^{+30}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{3}}{\ell} \cdot \frac{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.29999999999999994e-100Initial program 51.9%
Simplified52.8%
add-sqr-sqrt16.2%
pow216.2%
associate-/r*14.2%
sqrt-prod7.6%
sqrt-div7.6%
sqrt-pow18.7%
metadata-eval8.7%
sqrt-prod8.1%
add-sqr-sqrt10.3%
associate-*l*10.3%
Applied egg-rr10.3%
Taylor expanded in t around 0 30.8%
associate-/l*30.8%
Simplified30.8%
if 2.29999999999999994e-100 < t < 1.8000000000000001e30Initial program 83.4%
Taylor expanded in k around 0 75.8%
unpow275.8%
unpow275.8%
times-frac83.4%
unpow283.4%
Simplified83.4%
associate-*l*83.3%
associate-/r*83.3%
unpow383.3%
unpow283.3%
associate-*r/83.3%
/-rgt-identity83.3%
associate-*r*83.4%
associate-*r*83.4%
associate-*l/83.7%
Applied egg-rr83.8%
associate-/l*87.5%
Simplified87.5%
if 1.8000000000000001e30 < t Initial program 61.4%
Simplified48.6%
add-sqr-sqrt31.6%
pow231.6%
associate-/r*31.4%
sqrt-prod31.4%
sqrt-div31.6%
sqrt-pow137.8%
metadata-eval37.8%
sqrt-prod19.0%
add-sqr-sqrt40.0%
associate-*l*40.0%
Applied egg-rr40.0%
Taylor expanded in k around 0 73.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.00016)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(if (<= k 3.8e+142)
(/
2.0
(*
(/ (* (pow t_m 2.0) (/ t_m l)) l)
(/ (* 2.0 (- 0.5 (/ (cos (* 2.0 k)) 2.0))) (cos k))))
(/ 2.0 (* (pow (* t_m (cbrt (pow l -2.0))) 3.0) (* 2.0 (pow k 2.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 0.00016) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else if (k <= 3.8e+142) {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * (0.5 - (cos((2.0 * k)) / 2.0))) / cos(k)));
} else {
tmp = 2.0 / (pow((t_m * cbrt(pow(l, -2.0))), 3.0) * (2.0 * pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 0.00016) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else if (k <= 3.8e+142) {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * (0.5 - (Math.cos((2.0 * k)) / 2.0))) / Math.cos(k)));
} else {
tmp = 2.0 / (Math.pow((t_m * Math.cbrt(Math.pow(l, -2.0))), 3.0) * (2.0 * Math.pow(k, 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 0.00016) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); elseif (k <= 3.8e+142) tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(2.0 * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))) / cos(k)))); else tmp = Float64(2.0 / Float64((Float64(t_m * cbrt((l ^ -2.0))) ^ 3.0) * Float64(2.0 * (k ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.00016], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+142], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 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 0.00016:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{+142}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \frac{2 \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{{\ell}^{-2}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\
\end{array}
\end{array}
if k < 1.60000000000000013e-4Initial program 60.2%
Simplified56.6%
add-sqr-sqrt21.3%
pow221.3%
associate-/r*19.7%
sqrt-prod16.6%
sqrt-div16.7%
sqrt-pow118.2%
metadata-eval18.2%
sqrt-prod12.1%
add-sqr-sqrt20.7%
associate-*l*20.7%
Applied egg-rr20.7%
Taylor expanded in k around 0 32.1%
if 1.60000000000000013e-4 < k < 3.7999999999999999e142Initial program 44.7%
Simplified51.5%
unpow351.5%
*-un-lft-identity51.5%
times-frac58.6%
pow258.6%
Applied egg-rr58.6%
Taylor expanded in t around inf 60.1%
associate-*r/60.1%
Simplified60.1%
unpow260.1%
sin-mult60.0%
Applied egg-rr60.0%
div-sub60.0%
+-inverses60.0%
cos-060.0%
metadata-eval60.0%
count-260.0%
*-commutative60.0%
Simplified60.0%
if 3.7999999999999999e142 < k Initial program 43.2%
Simplified46.2%
Taylor expanded in k around 0 40.2%
associate-/r*37.2%
add-cube-cbrt37.2%
pow337.2%
div-inv37.2%
cbrt-prod37.2%
unpow337.2%
add-cbrt-cube63.9%
pow263.9%
pow-flip63.9%
metadata-eval63.9%
Applied egg-rr63.9%
Final simplification38.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 6.2e-47)
(/ 2.0 (pow (* (* k (/ (sin k) l)) (sqrt (/ t_m (cos k)))) 2.0))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-47) {
tmp = 2.0 / pow(((k * (sin(k) / l)) * sqrt((t_m / cos(k)))), 2.0);
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.2d-47) then
tmp = 2.0d0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.2e-47) {
tmp = 2.0 / Math.pow(((k * (Math.sin(k) / l)) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.2e-47: tmp = 2.0 / math.pow(((k * (math.sin(k) / l)) * math.sqrt((t_m / math.cos(k)))), 2.0) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.2e-47) tmp = Float64(2.0 / (Float64(Float64(k * Float64(sin(k) / l)) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.2e-47) tmp = 2.0 / (((k * (sin(k) / l)) * sqrt((t_m / cos(k)))) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.2e-47], N[(2.0 / N[Power[N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.2 \cdot 10^{-47}:\\
\;\;\;\;\frac{2}{{\left(\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.1999999999999996e-47Initial program 53.6%
Simplified54.5%
add-sqr-sqrt18.8%
pow218.8%
associate-/r*16.8%
sqrt-prod10.5%
sqrt-div10.5%
sqrt-pow111.5%
metadata-eval11.5%
sqrt-prod9.9%
add-sqr-sqrt13.1%
associate-*l*13.1%
Applied egg-rr13.1%
Taylor expanded in t around 0 32.8%
associate-/l*32.8%
Simplified32.8%
if 6.1999999999999996e-47 < t Initial program 65.4%
Simplified55.9%
add-sqr-sqrt29.6%
pow229.6%
associate-/r*29.4%
sqrt-prod29.4%
sqrt-div29.5%
sqrt-pow134.1%
metadata-eval34.1%
sqrt-prod18.6%
add-sqr-sqrt37.2%
associate-*l*37.2%
Applied egg-rr37.2%
Taylor expanded in k around 0 68.8%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.6e-5)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(if (<= k 7.2e+155)
(/
2.0
(*
(/ (* (/ t_m l) (* t_m t_m)) l)
(/ (* 2.0 (pow (sin k) 2.0)) (cos k))))
(/ 2.0 (* (pow (/ t_m (cbrt l)) 3.0) (/ (* 2.0 (pow k 2.0)) 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 (k <= 9.6e-5) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else if (k <= 7.2e+155) {
tmp = 2.0 / ((((t_m / l) * (t_m * t_m)) / l) * ((2.0 * pow(sin(k), 2.0)) / cos(k)));
} else {
tmp = 2.0 / (pow((t_m / cbrt(l)), 3.0) * ((2.0 * pow(k, 2.0)) / l));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9.6e-5) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else if (k <= 7.2e+155) {
tmp = 2.0 / ((((t_m / l) * (t_m * t_m)) / l) * ((2.0 * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.cbrt(l)), 3.0) * ((2.0 * Math.pow(k, 2.0)) / 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 (k <= 9.6e-5) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); elseif (k <= 7.2e+155) tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * t_m)) / l) * Float64(Float64(2.0 * (sin(k) ^ 2.0)) / cos(k)))); else tmp = Float64(2.0 / Float64((Float64(t_m / cbrt(l)) ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / l))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9.6e-5], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+155], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $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 \begin{array}{l}
\mathbf{if}\;k \leq 9.6 \cdot 10^{-5}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 7.2 \cdot 10^{+155}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot \left(t\_m \cdot t\_m\right)}{\ell} \cdot \frac{2 \cdot {\sin k}^{2}}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\
\end{array}
\end{array}
if k < 9.6000000000000002e-5Initial program 60.2%
Simplified56.6%
add-sqr-sqrt21.3%
pow221.3%
associate-/r*19.7%
sqrt-prod16.6%
sqrt-div16.7%
sqrt-pow118.2%
metadata-eval18.2%
sqrt-prod12.1%
add-sqr-sqrt20.7%
associate-*l*20.7%
Applied egg-rr20.7%
Taylor expanded in k around 0 32.1%
if 9.6000000000000002e-5 < k < 7.20000000000000015e155Initial program 43.1%
Simplified49.6%
unpow349.6%
*-un-lft-identity49.6%
times-frac56.5%
pow256.5%
Applied egg-rr56.5%
Taylor expanded in t around inf 58.1%
associate-*r/58.1%
Simplified58.1%
/-rgt-identity58.1%
unpow258.1%
Applied egg-rr58.1%
if 7.20000000000000015e155 < k Initial program 44.7%
Simplified47.8%
Taylor expanded in k around 0 41.5%
associate-*l/41.6%
Applied egg-rr41.6%
associate-/l*41.6%
Simplified41.6%
add-cube-cbrt41.6%
pow341.6%
cbrt-div41.6%
rem-cbrt-cube55.4%
Applied egg-rr55.4%
Final simplification37.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 12000000000.0)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(if (<= k 8.6e+113)
(/ 2.0 (* 2.0 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
(/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (pow (/ t_m (cbrt l)) 3.0)) 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 (k <= 12000000000.0) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else if (k <= 8.6e+113) {
tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))));
} else {
tmp = 2.0 / (((2.0 * pow(k, 2.0)) * pow((t_m / cbrt(l)), 3.0)) / l);
}
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 <= 12000000000.0) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else if (k <= 8.6e+113) {
tmp = 2.0 / (2.0 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))));
} else {
tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * Math.pow((t_m / Math.cbrt(l)), 3.0)) / 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 (k <= 12000000000.0) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); elseif (k <= 8.6e+113) tmp = Float64(2.0 / Float64(2.0 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))))); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * (Float64(t_m / cbrt(l)) ^ 3.0)) / l)); 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, 12000000000.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.6e+113], N[(2.0 / N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $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 12000000000:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 8.6 \cdot 10^{+113}:\\
\;\;\;\;\frac{2}{2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot {\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\
\end{array}
\end{array}
if k < 1.2e10Initial program 59.5%
Simplified56.0%
add-sqr-sqrt21.1%
pow221.1%
associate-/r*19.6%
sqrt-prod16.6%
sqrt-div16.7%
sqrt-pow118.1%
metadata-eval18.1%
sqrt-prod12.2%
add-sqr-sqrt20.6%
associate-*l*20.6%
Applied egg-rr20.6%
Taylor expanded in k around 0 31.6%
if 1.2e10 < k < 8.6000000000000007e113Initial program 58.7%
Taylor expanded in k around 0 65.4%
if 8.6000000000000007e113 < k Initial program 38.3%
Simplified46.1%
Taylor expanded in k around 0 38.2%
associate-*l/38.3%
Applied egg-rr38.3%
add-cube-cbrt38.2%
pow338.2%
cbrt-div38.2%
rem-cbrt-cube49.9%
Applied egg-rr50.1%
Final simplification36.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 1e-22)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(/
2.0
(* (/ (* (pow t_m 2.0) (/ t_m l)) l) (/ (* 2.0 (pow k 2.0)) (cos 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 <= 1e-22) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * pow(k, 2.0)) / cos(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 <= 1d-22) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
else
tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * ((2.0d0 * (k ** 2.0d0)) / cos(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 <= 1e-22) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * Math.pow(k, 2.0)) / Math.cos(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 <= 1e-22: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) else: tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * math.pow(k, 2.0)) / math.cos(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 <= 1e-22) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(2.0 * (k ^ 2.0)) / cos(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 <= 1e-22) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); else tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * ((2.0 * (k ^ 2.0)) / cos(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, 1e-22], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[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 10^{-22}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\cos k}}\\
\end{array}
\end{array}
if k < 1e-22Initial program 60.6%
Simplified56.9%
add-sqr-sqrt21.6%
pow221.6%
associate-/r*20.0%
sqrt-prod16.9%
sqrt-div16.9%
sqrt-pow118.5%
metadata-eval18.5%
sqrt-prod12.3%
add-sqr-sqrt21.0%
associate-*l*21.0%
Applied egg-rr21.0%
Taylor expanded in k around 0 32.6%
if 1e-22 < k Initial program 43.4%
Simplified48.0%
unpow348.0%
*-un-lft-identity48.0%
times-frac56.2%
pow256.2%
Applied egg-rr56.2%
Taylor expanded in t around inf 43.5%
associate-*r/43.5%
Simplified43.5%
Taylor expanded in k around 0 55.6%
Final simplification38.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 (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0)); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}
\end{array}
Initial program 56.6%
Simplified54.9%
add-sqr-sqrt21.5%
pow221.5%
associate-/r*20.0%
sqrt-prod15.3%
sqrt-div15.3%
sqrt-pow117.3%
metadata-eval17.3%
sqrt-prod12.1%
add-sqr-sqrt19.2%
associate-*l*19.2%
Applied egg-rr19.2%
Taylor expanded in k around 0 29.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 (/ 2.0 (* (* 2.0 (pow k 2.0)) (* (pow t_m 2.0) (/ (/ t_m 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 * pow(k, 2.0)) * (pow(t_m, 2.0) * ((t_m / 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 ** 2.0d0)) * ((t_m ** 2.0d0) * ((t_m / 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 * Math.pow(k, 2.0)) * (Math.pow(t_m, 2.0) * ((t_m / 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 * math.pow(k, 2.0)) * (math.pow(t_m, 2.0) * ((t_m / 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 * (k ^ 2.0)) * Float64((t_m ^ 2.0) * Float64(Float64(t_m / 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 ^ 2.0)) * ((t_m ^ 2.0) * ((t_m / 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[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \left({t\_m}^{2} \cdot \frac{\frac{t\_m}{\ell}}{\ell}\right)}
\end{array}
Initial program 56.6%
Simplified54.9%
Taylor expanded in k around 0 54.2%
unpow354.2%
unpow254.2%
associate-*r/56.1%
associate-/l*56.0%
Applied egg-rr56.0%
Final simplification56.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 (/ 2.0 (/ (* (/ (pow t_m 3.0) l) (* 2.0 (pow k 2.0))) 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 / (((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.0))) / 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 / ((((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.0d0))) / 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 / (((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.0))) / 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 / (((math.pow(t_m, 3.0) / l) * (2.0 * math.pow(k, 2.0))) / 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(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.0))) / 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 / ((((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.0))) / 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[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $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{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\ell}}
\end{array}
Initial program 56.6%
Simplified54.9%
Taylor expanded in k around 0 54.2%
associate-*l/54.6%
Applied egg-rr54.6%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* l (/ 2.0 (* (pow t_m 3.0) (/ (* 2.0 (pow k 2.0)) 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 * (l * (2.0 / (pow(t_m, 3.0) * ((2.0 * pow(k, 2.0)) / 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 * (l * (2.0d0 / ((t_m ** 3.0d0) * ((2.0d0 * (k ** 2.0d0)) / 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 * (l * (2.0 / (Math.pow(t_m, 3.0) * ((2.0 * Math.pow(k, 2.0)) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (l * (2.0 / (math.pow(t_m, 3.0) * ((2.0 * math.pow(k, 2.0)) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(l * Float64(2.0 / Float64((t_m ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / 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 * (l * (2.0 / ((t_m ^ 3.0) * ((2.0 * (k ^ 2.0)) / 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[(l * N[(2.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \left(\ell \cdot \frac{2}{{t\_m}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\right)
\end{array}
Initial program 56.6%
Simplified54.9%
Taylor expanded in k around 0 54.2%
associate-*l/54.6%
Applied egg-rr54.6%
associate-/r/54.6%
Applied egg-rr54.6%
*-commutative54.6%
associate-*l/54.7%
associate-*r/54.4%
Simplified54.4%
herbie shell --seed 2024113
(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))))