
(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 14 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}
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(let* ((t_2 (* t_m (pow (sin k_m) 2.0))))
(*
t_s
(if (<= k_m 8.2e-16)
(pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)
(if (<= k_m 2.2e+78)
(/ 2.0 (/ (/ (* (pow k_m 2.0) t_2) (* l (cos k_m))) l))
(/ 2.0 (/ (/ t_2 (pow (/ l k_m) 2.0)) (cos k_m))))))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double t_2 = t_m * pow(sin(k_m), 2.0);
double tmp;
if (k_m <= 8.2e-16) {
tmp = pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else if (k_m <= 2.2e+78) {
tmp = 2.0 / (((pow(k_m, 2.0) * t_2) / (l * cos(k_m))) / l);
} else {
tmp = 2.0 / ((t_2 / pow((l / k_m), 2.0)) / cos(k_m));
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: t_2
real(8) :: tmp
t_2 = t_m * (sin(k_m) ** 2.0d0)
if (k_m <= 8.2d-16) then
tmp = ((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0
else if (k_m <= 2.2d+78) then
tmp = 2.0d0 / ((((k_m ** 2.0d0) * t_2) / (l * cos(k_m))) / l)
else
tmp = 2.0d0 / ((t_2 / ((l / k_m) ** 2.0d0)) / cos(k_m))
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double t_2 = t_m * Math.pow(Math.sin(k_m), 2.0);
double tmp;
if (k_m <= 8.2e-16) {
tmp = Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else if (k_m <= 2.2e+78) {
tmp = 2.0 / (((Math.pow(k_m, 2.0) * t_2) / (l * Math.cos(k_m))) / l);
} else {
tmp = 2.0 / ((t_2 / Math.pow((l / k_m), 2.0)) / Math.cos(k_m));
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): t_2 = t_m * math.pow(math.sin(k_m), 2.0) tmp = 0 if k_m <= 8.2e-16: tmp = math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0) elif k_m <= 2.2e+78: tmp = 2.0 / (((math.pow(k_m, 2.0) * t_2) / (l * math.cos(k_m))) / l) else: tmp = 2.0 / ((t_2 / math.pow((l / k_m), 2.0)) / math.cos(k_m)) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) t_2 = Float64(t_m * (sin(k_m) ^ 2.0)) tmp = 0.0 if (k_m <= 8.2e-16) tmp = Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0; elseif (k_m <= 2.2e+78) tmp = Float64(2.0 / Float64(Float64(Float64((k_m ^ 2.0) * t_2) / Float64(l * cos(k_m))) / l)); else tmp = Float64(2.0 / Float64(Float64(t_2 / (Float64(l / k_m) ^ 2.0)) / cos(k_m))); end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) t_2 = t_m * (sin(k_m) ^ 2.0); tmp = 0.0; if (k_m <= 8.2e-16) tmp = ((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0; elseif (k_m <= 2.2e+78) tmp = 2.0 / ((((k_m ^ 2.0) * t_2) / (l * cos(k_m))) / l); else tmp = 2.0 / ((t_2 / ((l / k_m) ^ 2.0)) / cos(k_m)); end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := Block[{t$95$2 = N[(t$95$m * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 8.2e-16], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[k$95$m, 2.2e+78], N[(2.0 / N[(N[(N[(N[Power[k$95$m, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision] / N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 / N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := t_m \cdot {\sin k_m}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 8.2 \cdot 10^{-16}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}\\
\mathbf{elif}\;k_m \leq 2.2 \cdot 10^{+78}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k_m}^{2} \cdot t_2}{\ell \cdot \cos k_m}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t_2}{{\left(\frac{\ell}{k_m}\right)}^{2}}}{\cos k_m}}\\
\end{array}
\end{array}
\end{array}
if k < 8.20000000000000012e-16Initial program 51.5%
Simplified53.0%
Taylor expanded in k around 0 48.0%
add-sqr-sqrt33.1%
pow233.1%
sqrt-div22.0%
unpow222.0%
sqrt-prod11.5%
add-sqr-sqrt24.5%
sqrt-prod24.5%
unpow224.5%
sqrt-prod7.7%
add-sqr-sqrt28.9%
sqrt-pow132.7%
metadata-eval32.7%
Applied egg-rr32.7%
add-cube-cbrt32.4%
pow232.4%
associate-/r*32.5%
cbrt-div32.5%
metadata-eval32.5%
sqrt-pow127.0%
unpow327.0%
sqrt-prod29.6%
sqrt-unprod32.5%
add-cbrt-cube32.5%
associate-/r*32.9%
cbrt-div32.9%
metadata-eval32.9%
sqrt-pow127.0%
unpow327.0%
sqrt-prod30.0%
sqrt-unprod32.9%
Applied egg-rr34.4%
pow-plus34.4%
metadata-eval34.4%
cube-div32.9%
rem-cube-cbrt33.1%
Simplified33.1%
*-un-lft-identity33.1%
cube-mult33.1%
add-sqr-sqrt33.2%
times-frac34.7%
pow1/234.7%
pow-flip34.7%
metadata-eval34.7%
Applied egg-rr34.7%
associate-/l/35.2%
Simplified35.2%
if 8.20000000000000012e-16 < k < 2.20000000000000014e78Initial program 35.3%
associate-*l*35.3%
*-commutative35.3%
*-commutative35.3%
associate-/r*41.6%
distribute-rgt-in41.6%
unpow241.6%
times-frac41.6%
sqr-neg41.6%
times-frac41.6%
unpow241.6%
distribute-rgt-in41.6%
+-commutative41.6%
Simplified41.6%
associate-*l/41.6%
associate-*l/41.6%
clear-num41.6%
associate-*l/41.6%
*-un-lft-identity41.6%
Applied egg-rr41.6%
Taylor expanded in k around inf 94.0%
if 2.20000000000000014e78 < k Initial program 54.9%
associate-*l*54.9%
*-commutative54.9%
*-commutative54.9%
associate-/r*59.4%
distribute-rgt-in59.4%
unpow259.4%
times-frac43.6%
sqr-neg43.6%
times-frac59.4%
unpow259.4%
distribute-rgt-in59.4%
+-commutative59.4%
Simplified59.4%
associate-/l/54.9%
unpow354.9%
times-frac72.7%
pow272.7%
Applied egg-rr72.7%
Taylor expanded in t around 0 73.2%
associate-/r*73.2%
*-commutative73.2%
associate-/l*71.4%
unpow271.4%
associate-/r*73.9%
unpow273.9%
associate-*l/84.6%
associate-*r/86.9%
unpow286.9%
Simplified86.9%
Final simplification48.0%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= k_m 1.5e-15)
(pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)
(/
2.0
(/ (/ (* t_m (pow (sin k_m) 2.0)) (pow (/ l k_m) 2.0)) (cos k_m))))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (k_m <= 1.5e-15) {
tmp = pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / (((t_m * pow(sin(k_m), 2.0)) / pow((l / k_m), 2.0)) / cos(k_m));
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 1.5d-15) then
tmp = ((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0
else
tmp = 2.0d0 / (((t_m * (sin(k_m) ** 2.0d0)) / ((l / k_m) ** 2.0d0)) / cos(k_m))
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (k_m <= 1.5e-15) {
tmp = Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / (((t_m * Math.pow(Math.sin(k_m), 2.0)) / Math.pow((l / k_m), 2.0)) / Math.cos(k_m));
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if k_m <= 1.5e-15: tmp = math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0) else: tmp = 2.0 / (((t_m * math.pow(math.sin(k_m), 2.0)) / math.pow((l / k_m), 2.0)) / math.cos(k_m)) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (k_m <= 1.5e-15) tmp = Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (sin(k_m) ^ 2.0)) / (Float64(l / k_m) ^ 2.0)) / cos(k_m))); end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (k_m <= 1.5e-15) tmp = ((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0; else tmp = 2.0 / (((t_m * (sin(k_m) ^ 2.0)) / ((l / k_m) ^ 2.0)) / cos(k_m)); end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1.5e-15], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1.5 \cdot 10^{-15}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t_m \cdot {\sin k_m}^{2}}{{\left(\frac{\ell}{k_m}\right)}^{2}}}{\cos k_m}}\\
\end{array}
\end{array}
if k < 1.5e-15Initial program 51.5%
Simplified53.0%
Taylor expanded in k around 0 48.0%
add-sqr-sqrt33.1%
pow233.1%
sqrt-div22.0%
unpow222.0%
sqrt-prod11.5%
add-sqr-sqrt24.5%
sqrt-prod24.5%
unpow224.5%
sqrt-prod7.7%
add-sqr-sqrt28.9%
sqrt-pow132.7%
metadata-eval32.7%
Applied egg-rr32.7%
add-cube-cbrt32.4%
pow232.4%
associate-/r*32.5%
cbrt-div32.5%
metadata-eval32.5%
sqrt-pow127.0%
unpow327.0%
sqrt-prod29.6%
sqrt-unprod32.5%
add-cbrt-cube32.5%
associate-/r*32.9%
cbrt-div32.9%
metadata-eval32.9%
sqrt-pow127.0%
unpow327.0%
sqrt-prod30.0%
sqrt-unprod32.9%
Applied egg-rr34.4%
pow-plus34.4%
metadata-eval34.4%
cube-div32.9%
rem-cube-cbrt33.1%
Simplified33.1%
*-un-lft-identity33.1%
cube-mult33.1%
add-sqr-sqrt33.2%
times-frac34.7%
pow1/234.7%
pow-flip34.7%
metadata-eval34.7%
Applied egg-rr34.7%
associate-/l/35.2%
Simplified35.2%
if 1.5e-15 < k Initial program 49.4%
associate-*l*49.4%
*-commutative49.4%
*-commutative49.4%
associate-/r*54.5%
distribute-rgt-in54.5%
unpow254.5%
times-frac43.1%
sqr-neg43.1%
times-frac54.5%
unpow254.5%
distribute-rgt-in54.5%
+-commutative54.5%
Simplified54.5%
associate-/l/49.4%
unpow349.4%
times-frac67.4%
pow267.4%
Applied egg-rr67.4%
Taylor expanded in t around 0 77.3%
associate-/r*77.4%
*-commutative77.4%
associate-/l*74.6%
unpow274.6%
associate-/r*76.3%
unpow276.3%
associate-*l/84.1%
associate-*r/85.7%
unpow285.7%
Simplified85.7%
Final simplification47.2%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= k_m 1.6e-24)
(pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)
(/
2.0
(*
(* (sin k_m) (* (/ t_m l) (* t_m (/ t_m l))))
(* (tan k_m) (+ 2.0 (pow (/ k_m t_m) 2.0))))))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (k_m <= 1.6e-24) {
tmp = pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (t_m * (t_m / l)))) * (tan(k_m) * (2.0 + pow((k_m / t_m), 2.0))));
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 1.6d-24) then
tmp = ((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0
else
tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * (t_m * (t_m / l)))) * (tan(k_m) * (2.0d0 + ((k_m / t_m) ** 2.0d0))))
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (k_m <= 1.6e-24) {
tmp = Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (t_m * (t_m / l)))) * (Math.tan(k_m) * (2.0 + Math.pow((k_m / t_m), 2.0))));
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if k_m <= 1.6e-24: tmp = math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0) else: tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (t_m * (t_m / l)))) * (math.tan(k_m) * (2.0 + math.pow((k_m / t_m), 2.0)))) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (k_m <= 1.6e-24) tmp = Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64(t_m * Float64(t_m / l)))) * Float64(tan(k_m) * Float64(2.0 + (Float64(k_m / t_m) ^ 2.0))))); end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (k_m <= 1.6e-24) tmp = ((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0; else tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (t_m * (t_m / l)))) * (tan(k_m) * (2.0 + ((k_m / t_m) ^ 2.0)))); end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1.6e-24], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[(2.0 + N[Power[N[(k$95$m / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1.6 \cdot 10^{-24}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k_m \cdot \left(\frac{t_m}{\ell} \cdot \left(t_m \cdot \frac{t_m}{\ell}\right)\right)\right) \cdot \left(\tan k_m \cdot \left(2 + {\left(\frac{k_m}{t_m}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
if k < 1.60000000000000006e-24Initial program 51.1%
Simplified52.6%
Taylor expanded in k around 0 47.4%
add-sqr-sqrt32.2%
pow232.2%
sqrt-div22.0%
unpow222.0%
sqrt-prod11.2%
add-sqr-sqrt24.5%
sqrt-prod24.5%
unpow224.5%
sqrt-prod7.4%
add-sqr-sqrt29.0%
sqrt-pow132.4%
metadata-eval32.4%
Applied egg-rr32.4%
add-cube-cbrt32.1%
pow232.1%
associate-/r*32.1%
cbrt-div32.1%
metadata-eval32.1%
sqrt-pow127.1%
unpow327.1%
sqrt-prod29.7%
sqrt-unprod32.1%
add-cbrt-cube32.1%
associate-/r*32.6%
cbrt-div32.6%
metadata-eval32.6%
sqrt-pow127.1%
unpow327.1%
sqrt-prod30.1%
sqrt-unprod32.6%
Applied egg-rr34.1%
pow-plus34.1%
metadata-eval34.1%
cube-div32.6%
rem-cube-cbrt32.7%
Simplified32.7%
*-un-lft-identity32.7%
cube-mult32.7%
add-sqr-sqrt32.8%
times-frac34.4%
pow1/234.4%
pow-flip34.4%
metadata-eval34.4%
Applied egg-rr34.4%
associate-/l/34.9%
Simplified34.9%
if 1.60000000000000006e-24 < k Initial program 51.0%
associate-*l*51.0%
*-commutative51.0%
*-commutative51.0%
associate-/r*55.7%
distribute-rgt-in55.8%
unpow255.8%
times-frac45.1%
sqr-neg45.1%
times-frac55.8%
unpow255.8%
distribute-rgt-in55.7%
+-commutative55.7%
Simplified55.8%
associate-/l/51.0%
unpow351.0%
times-frac67.9%
pow267.9%
Applied egg-rr67.9%
unpow267.9%
*-un-lft-identity67.9%
times-frac73.7%
Applied egg-rr73.7%
Final simplification44.8%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= l 28.0)
(* (pow t_m -1.5) (/ (pow (/ l k_m) 2.0) (pow t_m 1.5)))
(if (<= l 1.3e+267)
(pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)
(/
2.0
(* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* k_m 2.0)))))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (l <= 28.0) {
tmp = pow(t_m, -1.5) * (pow((l / k_m), 2.0) / pow(t_m, 1.5));
} else if (l <= 1.3e+267) {
tmp = pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (k_m * 2.0));
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (l <= 28.0d0) then
tmp = (t_m ** (-1.5d0)) * (((l / k_m) ** 2.0d0) / (t_m ** 1.5d0))
else if (l <= 1.3d+267) then
tmp = ((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0
else
tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (k_m * 2.0d0))
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (l <= 28.0) {
tmp = Math.pow(t_m, -1.5) * (Math.pow((l / k_m), 2.0) / Math.pow(t_m, 1.5));
} else if (l <= 1.3e+267) {
tmp = Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (k_m * 2.0));
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if l <= 28.0: tmp = math.pow(t_m, -1.5) * (math.pow((l / k_m), 2.0) / math.pow(t_m, 1.5)) elif l <= 1.3e+267: tmp = math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0) else: tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (k_m * 2.0)) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (l <= 28.0) tmp = Float64((t_m ^ -1.5) * Float64((Float64(l / k_m) ^ 2.0) / (t_m ^ 1.5))); elseif (l <= 1.3e+267) tmp = Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(k_m * 2.0))); end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (l <= 28.0) tmp = (t_m ^ -1.5) * (((l / k_m) ^ 2.0) / (t_m ^ 1.5)); elseif (l <= 1.3e+267) tmp = ((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0; else tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (k_m * 2.0)); end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[l, 28.0], N[(N[Power[t$95$m, -1.5], $MachinePrecision] * N[(N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.3e+267], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 28:\\
\;\;\;\;{t_m}^{-1.5} \cdot \frac{{\left(\frac{\ell}{k_m}\right)}^{2}}{{t_m}^{1.5}}\\
\mathbf{elif}\;\ell \leq 1.3 \cdot 10^{+267}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k_m \cdot \left(\frac{t_m}{\ell} \cdot \frac{{t_m}^{2}}{\ell}\right)\right) \cdot \left(k_m \cdot 2\right)}\\
\end{array}
\end{array}
if l < 28Initial program 52.4%
Simplified53.9%
Taylor expanded in k around 0 49.1%
add-sqr-sqrt39.9%
pow239.9%
sqrt-div22.6%
unpow222.6%
sqrt-prod6.8%
add-sqr-sqrt24.3%
sqrt-prod24.3%
unpow224.3%
sqrt-prod13.7%
add-sqr-sqrt28.9%
sqrt-pow130.2%
metadata-eval30.2%
Applied egg-rr30.2%
unpow230.2%
associate-/r*30.6%
associate-/r*31.1%
frac-times26.9%
pow-prod-up63.5%
metadata-eval63.5%
Applied egg-rr63.5%
*-un-lft-identity63.5%
add-sqr-sqrt26.9%
pow-prod-down26.9%
times-frac31.6%
sqrt-pow231.7%
pow-flip31.7%
metadata-eval31.7%
metadata-eval31.7%
pow231.7%
sqrt-pow231.7%
metadata-eval31.7%
Applied egg-rr31.7%
if 28 < l < 1.30000000000000001e267Initial program 47.9%
Simplified47.9%
Taylor expanded in k around 0 44.8%
add-sqr-sqrt29.5%
pow229.5%
sqrt-div25.7%
unpow225.7%
sqrt-prod28.7%
add-sqr-sqrt28.7%
sqrt-prod28.7%
unpow228.7%
sqrt-prod7.2%
add-sqr-sqrt27.4%
sqrt-pow130.6%
metadata-eval30.6%
Applied egg-rr30.6%
add-cube-cbrt30.6%
pow230.6%
associate-/r*29.0%
cbrt-div29.0%
metadata-eval29.0%
sqrt-pow127.2%
unpow327.2%
sqrt-prod27.4%
sqrt-unprod29.0%
add-cbrt-cube29.0%
associate-/r*29.0%
cbrt-div29.0%
metadata-eval29.0%
sqrt-pow127.2%
unpow327.2%
sqrt-prod27.4%
sqrt-unprod29.0%
Applied egg-rr29.1%
pow-plus29.1%
metadata-eval29.1%
cube-div29.0%
rem-cube-cbrt29.1%
Simplified29.1%
*-un-lft-identity29.1%
cube-mult29.1%
add-sqr-sqrt29.1%
times-frac29.1%
pow1/229.1%
pow-flip29.1%
metadata-eval29.1%
Applied egg-rr29.1%
associate-/l/32.2%
Simplified32.2%
if 1.30000000000000001e267 < l Initial program 45.5%
associate-*l*45.5%
*-commutative45.5%
*-commutative45.5%
associate-/r*46.5%
distribute-rgt-in46.5%
unpow246.5%
times-frac46.5%
sqr-neg46.5%
times-frac46.5%
unpow246.5%
distribute-rgt-in46.5%
+-commutative46.5%
Simplified46.5%
associate-/l/45.5%
unpow345.5%
times-frac73.2%
pow273.2%
Applied egg-rr73.2%
Taylor expanded in k around 0 74.2%
Final simplification33.6%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= t_m 7.5e-155)
(pow (* (pow t_m -0.5) (/ (/ l k_m) t_m)) 2.0)
(if (<= t_m 4.8e+115)
(* (/ 1.0 (pow t_m 2.0)) (/ (pow (/ l k_m) 2.0) t_m))
(pow (/ (/ (/ l t_m) k_m) (sqrt t_m)) 2.0)))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (t_m <= 7.5e-155) {
tmp = pow((pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0);
} else if (t_m <= 4.8e+115) {
tmp = (1.0 / pow(t_m, 2.0)) * (pow((l / k_m), 2.0) / t_m);
} else {
tmp = pow((((l / t_m) / k_m) / sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t_m <= 7.5d-155) then
tmp = ((t_m ** (-0.5d0)) * ((l / k_m) / t_m)) ** 2.0d0
else if (t_m <= 4.8d+115) then
tmp = (1.0d0 / (t_m ** 2.0d0)) * (((l / k_m) ** 2.0d0) / t_m)
else
tmp = (((l / t_m) / k_m) / sqrt(t_m)) ** 2.0d0
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (t_m <= 7.5e-155) {
tmp = Math.pow((Math.pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0);
} else if (t_m <= 4.8e+115) {
tmp = (1.0 / Math.pow(t_m, 2.0)) * (Math.pow((l / k_m), 2.0) / t_m);
} else {
tmp = Math.pow((((l / t_m) / k_m) / Math.sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if t_m <= 7.5e-155: tmp = math.pow((math.pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0) elif t_m <= 4.8e+115: tmp = (1.0 / math.pow(t_m, 2.0)) * (math.pow((l / k_m), 2.0) / t_m) else: tmp = math.pow((((l / t_m) / k_m) / math.sqrt(t_m)), 2.0) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (t_m <= 7.5e-155) tmp = Float64((t_m ^ -0.5) * Float64(Float64(l / k_m) / t_m)) ^ 2.0; elseif (t_m <= 4.8e+115) tmp = Float64(Float64(1.0 / (t_m ^ 2.0)) * Float64((Float64(l / k_m) ^ 2.0) / t_m)); else tmp = Float64(Float64(Float64(l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (t_m <= 7.5e-155) tmp = ((t_m ^ -0.5) * ((l / k_m) / t_m)) ^ 2.0; elseif (t_m <= 4.8e+115) tmp = (1.0 / (t_m ^ 2.0)) * (((l / k_m) ^ 2.0) / t_m); else tmp = (((l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-155], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 4.8e+115], N[(N[(1.0 / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l / t$95$m), $MachinePrecision] / k$95$m), $MachinePrecision] / N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 7.5 \cdot 10^{-155}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\frac{\ell}{k_m}}{t_m}\right)}^{2}\\
\mathbf{elif}\;t_m \leq 4.8 \cdot 10^{+115}:\\
\;\;\;\;\frac{1}{{t_m}^{2}} \cdot \frac{{\left(\frac{\ell}{k_m}\right)}^{2}}{t_m}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\frac{\ell}{t_m}}{k_m}}{\sqrt{t_m}}\right)}^{2}\\
\end{array}
\end{array}
if t < 7.5000000000000006e-155Initial program 50.5%
Simplified51.0%
Taylor expanded in k around 0 50.2%
add-sqr-sqrt31.6%
pow231.6%
sqrt-div9.7%
unpow29.7%
sqrt-prod2.6%
add-sqr-sqrt10.5%
sqrt-prod10.4%
unpow210.4%
sqrt-prod4.0%
add-sqr-sqrt10.7%
sqrt-pow17.2%
metadata-eval7.2%
Applied egg-rr7.2%
add-cube-cbrt7.2%
pow27.2%
associate-/r*7.8%
cbrt-div7.8%
metadata-eval7.8%
sqrt-pow17.2%
unpow37.2%
sqrt-prod7.2%
sqrt-unprod7.8%
add-cbrt-cube7.8%
associate-/r*7.8%
cbrt-div7.8%
metadata-eval7.8%
sqrt-pow17.2%
unpow37.2%
sqrt-prod7.2%
sqrt-unprod7.8%
Applied egg-rr8.4%
pow-plus8.4%
metadata-eval8.4%
cube-div7.8%
rem-cube-cbrt7.8%
Simplified7.8%
*-un-lft-identity7.8%
cube-mult7.8%
add-sqr-sqrt7.8%
times-frac8.4%
pow1/28.4%
pow-flip8.4%
metadata-eval8.4%
Applied egg-rr8.4%
if 7.5000000000000006e-155 < t < 4.8000000000000001e115Initial program 56.7%
Simplified60.2%
Taylor expanded in k around 0 47.8%
add-sqr-sqrt47.8%
pow247.8%
sqrt-div47.7%
unpow247.7%
sqrt-prod28.6%
add-sqr-sqrt51.6%
sqrt-prod51.6%
unpow251.6%
sqrt-prod20.1%
add-sqr-sqrt58.8%
sqrt-pow160.7%
metadata-eval60.7%
Applied egg-rr60.7%
unpow260.7%
associate-/r*62.2%
associate-/r*63.8%
frac-times63.9%
pow-prod-up64.0%
metadata-eval64.0%
Applied egg-rr64.0%
*-un-lft-identity64.0%
unpow363.9%
unpow263.9%
times-frac73.8%
pow273.8%
Applied egg-rr73.8%
if 4.8000000000000001e115 < t Initial program 44.6%
Simplified44.6%
Taylor expanded in k around 0 36.7%
add-sqr-sqrt36.7%
pow236.7%
sqrt-div36.7%
unpow236.7%
sqrt-prod23.9%
add-sqr-sqrt40.3%
sqrt-prod40.3%
unpow240.3%
sqrt-prod28.9%
add-sqr-sqrt48.4%
sqrt-pow172.9%
metadata-eval72.9%
Applied egg-rr72.9%
add-cube-cbrt72.3%
pow272.3%
associate-/r*67.6%
cbrt-div67.7%
metadata-eval67.7%
sqrt-pow148.1%
unpow348.1%
sqrt-prod55.7%
sqrt-unprod67.6%
add-cbrt-cube67.6%
associate-/r*67.6%
cbrt-div67.5%
metadata-eval67.5%
sqrt-pow148.1%
unpow348.1%
sqrt-prod55.5%
sqrt-unprod67.5%
Applied egg-rr72.5%
pow-plus72.5%
metadata-eval72.5%
cube-div67.4%
rem-cube-cbrt67.7%
Simplified67.7%
rem-cube-cbrt67.4%
cube-div72.5%
cube-mult72.5%
frac-times72.5%
pow272.5%
add-sqr-sqrt72.5%
Applied egg-rr72.5%
associate-*l/72.4%
associate-*r/72.5%
unpow272.5%
cube-mult72.4%
rem-cube-cbrt73.1%
associate-/l/82.6%
associate-/r*82.6%
Simplified82.6%
Final simplification35.1%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= k_m 1.1e-53)
(pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)
(/ (/ (* (/ l k_m) (* l (pow t_m -1.5))) k_m) (pow t_m 1.5)))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (k_m <= 1.1e-53) {
tmp = pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = (((l / k_m) * (l * pow(t_m, -1.5))) / k_m) / pow(t_m, 1.5);
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 1.1d-53) then
tmp = ((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0
else
tmp = (((l / k_m) * (l * (t_m ** (-1.5d0)))) / k_m) / (t_m ** 1.5d0)
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (k_m <= 1.1e-53) {
tmp = Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
} else {
tmp = (((l / k_m) * (l * Math.pow(t_m, -1.5))) / k_m) / Math.pow(t_m, 1.5);
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if k_m <= 1.1e-53: tmp = math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0) else: tmp = (((l / k_m) * (l * math.pow(t_m, -1.5))) / k_m) / math.pow(t_m, 1.5) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (k_m <= 1.1e-53) tmp = Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0; else tmp = Float64(Float64(Float64(Float64(l / k_m) * Float64(l * (t_m ^ -1.5))) / k_m) / (t_m ^ 1.5)); end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (k_m <= 1.1e-53) tmp = ((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0; else tmp = (((l / k_m) * (l * (t_m ^ -1.5))) / k_m) / (t_m ^ 1.5); end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 1.1e-53], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(N[(N[(l / k$95$m), $MachinePrecision] * N[(l * N[Power[t$95$m, -1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k$95$m), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k_m \leq 1.1 \cdot 10^{-53}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{\ell}{k_m} \cdot \left(\ell \cdot {t_m}^{-1.5}\right)}{k_m}}{{t_m}^{1.5}}\\
\end{array}
\end{array}
if k < 1.10000000000000009e-53Initial program 51.6%
Simplified53.1%
Taylor expanded in k around 0 47.3%
add-sqr-sqrt31.8%
pow231.8%
sqrt-div21.9%
unpow221.9%
sqrt-prod11.4%
add-sqr-sqrt24.5%
sqrt-prod24.4%
unpow224.4%
sqrt-prod6.9%
add-sqr-sqrt29.0%
sqrt-pow132.0%
metadata-eval32.0%
Applied egg-rr32.0%
add-cube-cbrt31.7%
pow231.7%
associate-/r*31.7%
cbrt-div31.7%
metadata-eval31.7%
sqrt-pow127.1%
unpow327.1%
sqrt-prod29.7%
sqrt-unprod31.7%
add-cbrt-cube31.7%
associate-/r*32.2%
cbrt-div32.2%
metadata-eval32.2%
sqrt-pow127.1%
unpow327.1%
sqrt-prod30.2%
sqrt-unprod32.2%
Applied egg-rr33.7%
pow-plus33.7%
metadata-eval33.7%
cube-div32.2%
rem-cube-cbrt32.3%
Simplified32.3%
*-un-lft-identity32.3%
cube-mult32.3%
add-sqr-sqrt32.4%
times-frac34.0%
pow1/234.0%
pow-flip34.0%
metadata-eval34.0%
Applied egg-rr34.0%
associate-/l/34.5%
Simplified34.5%
if 1.10000000000000009e-53 < k Initial program 49.5%
Simplified49.5%
Taylor expanded in k around 0 48.2%
add-sqr-sqrt48.0%
pow248.0%
sqrt-div24.9%
unpow224.9%
sqrt-prod13.3%
add-sqr-sqrt25.2%
sqrt-prod25.2%
unpow225.2%
sqrt-prod24.2%
add-sqr-sqrt24.2%
sqrt-pow123.8%
metadata-eval23.8%
Applied egg-rr23.8%
add-cube-cbrt23.8%
pow223.8%
associate-/r*23.8%
cbrt-div23.7%
metadata-eval23.7%
sqrt-pow120.9%
unpow320.9%
sqrt-prod21.0%
sqrt-unprod23.7%
add-cbrt-cube23.8%
associate-/r*23.8%
cbrt-div23.7%
metadata-eval23.7%
sqrt-pow120.9%
unpow320.9%
sqrt-prod21.0%
sqrt-unprod23.7%
Applied egg-rr23.8%
pow-plus23.8%
metadata-eval23.8%
cube-div23.7%
rem-cube-cbrt23.8%
Simplified23.8%
unpow223.8%
rem-cube-cbrt23.8%
cube-div23.8%
clear-num23.8%
un-div-inv23.8%
cube-div23.8%
rem-cube-cbrt23.8%
div-inv23.8%
sqrt-pow223.8%
pow-flip23.8%
metadata-eval23.8%
metadata-eval23.8%
div-inv23.8%
sqrt-pow223.8%
metadata-eval23.8%
clear-num23.8%
Applied egg-rr23.8%
*-commutative23.8%
associate-/r*26.5%
associate-/l*26.5%
associate-*r/26.5%
associate-*l*26.5%
associate-*r/26.5%
associate-*r/26.5%
Simplified26.5%
Final simplification32.4%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= t_m 8.8e-110)
(pow (/ (/ l k_m) (* t_m (sqrt t_m))) 2.0)
(if (<= t_m 4.4e+96)
(* (pow (/ l k_m) 2.0) (pow t_m -3.0))
(pow (/ (/ (/ l t_m) k_m) (sqrt t_m)) 2.0)))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (t_m <= 8.8e-110) {
tmp = pow(((l / k_m) / (t_m * sqrt(t_m))), 2.0);
} else if (t_m <= 4.4e+96) {
tmp = pow((l / k_m), 2.0) * pow(t_m, -3.0);
} else {
tmp = pow((((l / t_m) / k_m) / sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t_m <= 8.8d-110) then
tmp = ((l / k_m) / (t_m * sqrt(t_m))) ** 2.0d0
else if (t_m <= 4.4d+96) then
tmp = ((l / k_m) ** 2.0d0) * (t_m ** (-3.0d0))
else
tmp = (((l / t_m) / k_m) / sqrt(t_m)) ** 2.0d0
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (t_m <= 8.8e-110) {
tmp = Math.pow(((l / k_m) / (t_m * Math.sqrt(t_m))), 2.0);
} else if (t_m <= 4.4e+96) {
tmp = Math.pow((l / k_m), 2.0) * Math.pow(t_m, -3.0);
} else {
tmp = Math.pow((((l / t_m) / k_m) / Math.sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if t_m <= 8.8e-110: tmp = math.pow(((l / k_m) / (t_m * math.sqrt(t_m))), 2.0) elif t_m <= 4.4e+96: tmp = math.pow((l / k_m), 2.0) * math.pow(t_m, -3.0) else: tmp = math.pow((((l / t_m) / k_m) / math.sqrt(t_m)), 2.0) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (t_m <= 8.8e-110) tmp = Float64(Float64(l / k_m) / Float64(t_m * sqrt(t_m))) ^ 2.0; elseif (t_m <= 4.4e+96) tmp = Float64((Float64(l / k_m) ^ 2.0) * (t_m ^ -3.0)); else tmp = Float64(Float64(Float64(l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (t_m <= 8.8e-110) tmp = ((l / k_m) / (t_m * sqrt(t_m))) ^ 2.0; elseif (t_m <= 4.4e+96) tmp = ((l / k_m) ^ 2.0) * (t_m ^ -3.0); else tmp = (((l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 8.8e-110], N[Power[N[(N[(l / k$95$m), $MachinePrecision] / N[(t$95$m * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 4.4e+96], N[(N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l / t$95$m), $MachinePrecision] / k$95$m), $MachinePrecision] / N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8.8 \cdot 10^{-110}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{k_m}}{t_m \cdot \sqrt{t_m}}\right)}^{2}\\
\mathbf{elif}\;t_m \leq 4.4 \cdot 10^{+96}:\\
\;\;\;\;{\left(\frac{\ell}{k_m}\right)}^{2} \cdot {t_m}^{-3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\frac{\ell}{t_m}}{k_m}}{\sqrt{t_m}}\right)}^{2}\\
\end{array}
\end{array}
if t < 8.7999999999999997e-110Initial program 48.7%
Simplified49.1%
Taylor expanded in k around 0 48.4%
add-sqr-sqrt31.2%
pow231.2%
sqrt-div10.8%
unpow210.8%
sqrt-prod4.3%
add-sqr-sqrt11.6%
sqrt-prod11.6%
unpow211.6%
sqrt-prod4.4%
add-sqr-sqrt11.8%
sqrt-pow18.7%
metadata-eval8.7%
Applied egg-rr8.7%
add-cube-cbrt8.7%
pow28.7%
associate-/r*9.8%
cbrt-div9.8%
metadata-eval9.8%
sqrt-pow18.5%
unpow38.5%
sqrt-prod9.2%
sqrt-unprod9.8%
add-cbrt-cube9.8%
associate-/r*10.3%
cbrt-div10.3%
metadata-eval10.3%
sqrt-pow18.5%
unpow38.5%
sqrt-prod9.7%
sqrt-unprod10.3%
Applied egg-rr10.9%
pow-plus10.9%
metadata-eval10.9%
cube-div10.3%
rem-cube-cbrt10.3%
Simplified10.3%
cube-mult10.3%
add-sqr-sqrt10.3%
Applied egg-rr10.3%
if 8.7999999999999997e-110 < t < 4.3999999999999998e96Initial program 62.7%
Simplified67.6%
Taylor expanded in k around 0 52.4%
add-sqr-sqrt52.4%
pow252.4%
sqrt-div52.3%
unpow252.3%
sqrt-prod27.8%
add-sqr-sqrt57.6%
sqrt-prod57.6%
unpow257.6%
sqrt-prod23.2%
add-sqr-sqrt67.6%
sqrt-pow167.5%
metadata-eval67.5%
Applied egg-rr67.5%
unpow267.5%
associate-/r*67.5%
associate-/r*67.6%
frac-times74.8%
pow-prod-up74.9%
metadata-eval74.9%
Applied egg-rr74.9%
add-sqr-sqrt74.7%
pow-prod-down74.7%
frac-times67.5%
unpow267.5%
expm1-log1p-u67.0%
expm1-udef59.3%
Applied egg-rr59.3%
expm1-def74.6%
expm1-log1p75.1%
Simplified75.1%
if 4.3999999999999998e96 < t Initial program 48.7%
Simplified48.7%
Taylor expanded in k around 0 39.5%
add-sqr-sqrt39.5%
pow239.5%
sqrt-div39.5%
unpow239.5%
sqrt-prod25.9%
add-sqr-sqrt42.7%
sqrt-prod42.7%
unpow242.7%
sqrt-prod27.9%
add-sqr-sqrt49.9%
sqrt-pow173.7%
metadata-eval73.7%
Applied egg-rr73.7%
add-cube-cbrt73.1%
pow273.1%
associate-/r*69.0%
cbrt-div69.0%
metadata-eval69.0%
sqrt-pow149.6%
unpow349.6%
sqrt-prod58.4%
sqrt-unprod69.0%
add-cbrt-cube69.0%
associate-/r*69.0%
cbrt-div68.9%
metadata-eval68.9%
sqrt-pow149.6%
unpow349.6%
sqrt-prod58.3%
sqrt-unprod68.9%
Applied egg-rr73.3%
pow-plus73.3%
metadata-eval73.3%
cube-div68.8%
rem-cube-cbrt69.2%
Simplified69.2%
rem-cube-cbrt68.8%
cube-div73.3%
cube-mult73.3%
frac-times73.3%
pow273.3%
add-sqr-sqrt73.3%
Applied egg-rr73.3%
associate-*l/73.2%
associate-*r/73.3%
unpow273.3%
cube-mult73.2%
rem-cube-cbrt73.9%
associate-/l/82.4%
associate-/r*82.3%
Simplified82.3%
Final simplification33.6%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= t_m 8.8e-110)
(pow (* (pow t_m -0.5) (/ (/ l k_m) t_m)) 2.0)
(if (<= t_m 4.4e+96)
(* (pow (/ l k_m) 2.0) (pow t_m -3.0))
(pow (/ (/ (/ l t_m) k_m) (sqrt t_m)) 2.0)))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (t_m <= 8.8e-110) {
tmp = pow((pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0);
} else if (t_m <= 4.4e+96) {
tmp = pow((l / k_m), 2.0) * pow(t_m, -3.0);
} else {
tmp = pow((((l / t_m) / k_m) / sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t_m <= 8.8d-110) then
tmp = ((t_m ** (-0.5d0)) * ((l / k_m) / t_m)) ** 2.0d0
else if (t_m <= 4.4d+96) then
tmp = ((l / k_m) ** 2.0d0) * (t_m ** (-3.0d0))
else
tmp = (((l / t_m) / k_m) / sqrt(t_m)) ** 2.0d0
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (t_m <= 8.8e-110) {
tmp = Math.pow((Math.pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0);
} else if (t_m <= 4.4e+96) {
tmp = Math.pow((l / k_m), 2.0) * Math.pow(t_m, -3.0);
} else {
tmp = Math.pow((((l / t_m) / k_m) / Math.sqrt(t_m)), 2.0);
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if t_m <= 8.8e-110: tmp = math.pow((math.pow(t_m, -0.5) * ((l / k_m) / t_m)), 2.0) elif t_m <= 4.4e+96: tmp = math.pow((l / k_m), 2.0) * math.pow(t_m, -3.0) else: tmp = math.pow((((l / t_m) / k_m) / math.sqrt(t_m)), 2.0) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (t_m <= 8.8e-110) tmp = Float64((t_m ^ -0.5) * Float64(Float64(l / k_m) / t_m)) ^ 2.0; elseif (t_m <= 4.4e+96) tmp = Float64((Float64(l / k_m) ^ 2.0) * (t_m ^ -3.0)); else tmp = Float64(Float64(Float64(l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (t_m <= 8.8e-110) tmp = ((t_m ^ -0.5) * ((l / k_m) / t_m)) ^ 2.0; elseif (t_m <= 4.4e+96) tmp = ((l / k_m) ^ 2.0) * (t_m ^ -3.0); else tmp = (((l / t_m) / k_m) / sqrt(t_m)) ^ 2.0; end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 8.8e-110], N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 4.4e+96], N[(N[Power[N[(l / k$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, -3.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l / t$95$m), $MachinePrecision] / k$95$m), $MachinePrecision] / N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8.8 \cdot 10^{-110}:\\
\;\;\;\;{\left({t_m}^{-0.5} \cdot \frac{\frac{\ell}{k_m}}{t_m}\right)}^{2}\\
\mathbf{elif}\;t_m \leq 4.4 \cdot 10^{+96}:\\
\;\;\;\;{\left(\frac{\ell}{k_m}\right)}^{2} \cdot {t_m}^{-3}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{\frac{\ell}{t_m}}{k_m}}{\sqrt{t_m}}\right)}^{2}\\
\end{array}
\end{array}
if t < 8.7999999999999997e-110Initial program 48.7%
Simplified49.1%
Taylor expanded in k around 0 48.4%
add-sqr-sqrt31.2%
pow231.2%
sqrt-div10.8%
unpow210.8%
sqrt-prod4.3%
add-sqr-sqrt11.6%
sqrt-prod11.6%
unpow211.6%
sqrt-prod4.4%
add-sqr-sqrt11.8%
sqrt-pow18.7%
metadata-eval8.7%
Applied egg-rr8.7%
add-cube-cbrt8.7%
pow28.7%
associate-/r*9.8%
cbrt-div9.8%
metadata-eval9.8%
sqrt-pow18.5%
unpow38.5%
sqrt-prod9.2%
sqrt-unprod9.8%
add-cbrt-cube9.8%
associate-/r*10.3%
cbrt-div10.3%
metadata-eval10.3%
sqrt-pow18.5%
unpow38.5%
sqrt-prod9.7%
sqrt-unprod10.3%
Applied egg-rr10.9%
pow-plus10.9%
metadata-eval10.9%
cube-div10.3%
rem-cube-cbrt10.3%
Simplified10.3%
*-un-lft-identity10.3%
cube-mult10.3%
add-sqr-sqrt10.3%
times-frac10.9%
pow1/210.9%
pow-flip10.9%
metadata-eval10.9%
Applied egg-rr10.9%
if 8.7999999999999997e-110 < t < 4.3999999999999998e96Initial program 62.7%
Simplified67.6%
Taylor expanded in k around 0 52.4%
add-sqr-sqrt52.4%
pow252.4%
sqrt-div52.3%
unpow252.3%
sqrt-prod27.8%
add-sqr-sqrt57.6%
sqrt-prod57.6%
unpow257.6%
sqrt-prod23.2%
add-sqr-sqrt67.6%
sqrt-pow167.5%
metadata-eval67.5%
Applied egg-rr67.5%
unpow267.5%
associate-/r*67.5%
associate-/r*67.6%
frac-times74.8%
pow-prod-up74.9%
metadata-eval74.9%
Applied egg-rr74.9%
add-sqr-sqrt74.7%
pow-prod-down74.7%
frac-times67.5%
unpow267.5%
expm1-log1p-u67.0%
expm1-udef59.3%
Applied egg-rr59.3%
expm1-def74.6%
expm1-log1p75.1%
Simplified75.1%
if 4.3999999999999998e96 < t Initial program 48.7%
Simplified48.7%
Taylor expanded in k around 0 39.5%
add-sqr-sqrt39.5%
pow239.5%
sqrt-div39.5%
unpow239.5%
sqrt-prod25.9%
add-sqr-sqrt42.7%
sqrt-prod42.7%
unpow242.7%
sqrt-prod27.9%
add-sqr-sqrt49.9%
sqrt-pow173.7%
metadata-eval73.7%
Applied egg-rr73.7%
add-cube-cbrt73.1%
pow273.1%
associate-/r*69.0%
cbrt-div69.0%
metadata-eval69.0%
sqrt-pow149.6%
unpow349.6%
sqrt-prod58.4%
sqrt-unprod69.0%
add-cbrt-cube69.0%
associate-/r*69.0%
cbrt-div68.9%
metadata-eval68.9%
sqrt-pow149.6%
unpow349.6%
sqrt-prod58.3%
sqrt-unprod68.9%
Applied egg-rr73.3%
pow-plus73.3%
metadata-eval73.3%
cube-div68.8%
rem-cube-cbrt69.2%
Simplified69.2%
rem-cube-cbrt68.8%
cube-div73.3%
cube-mult73.3%
frac-times73.3%
pow273.3%
add-sqr-sqrt73.3%
Applied egg-rr73.3%
associate-*l/73.2%
associate-*r/73.3%
unpow273.3%
cube-mult73.2%
rem-cube-cbrt73.9%
associate-/l/82.4%
associate-/r*82.3%
Simplified82.3%
Final simplification34.0%
k_m = (fabs.f64 k)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k_m)
:precision binary64
(*
t_s
(if (<= l 2e-71)
(* (/ (/ l k_m) t_m) (/ (/ l k_m) (pow t_m 2.0)))
(pow (/ k_m (/ l (pow t_m 1.5))) -2.0))))k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
double tmp;
if (l <= 2e-71) {
tmp = ((l / k_m) / t_m) * ((l / k_m) / pow(t_m, 2.0));
} else {
tmp = pow((k_m / (l / pow(t_m, 1.5))), -2.0);
}
return t_s * tmp;
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (l <= 2d-71) then
tmp = ((l / k_m) / t_m) * ((l / k_m) / (t_m ** 2.0d0))
else
tmp = (k_m / (l / (t_m ** 1.5d0))) ** (-2.0d0)
end if
code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
double tmp;
if (l <= 2e-71) {
tmp = ((l / k_m) / t_m) * ((l / k_m) / Math.pow(t_m, 2.0));
} else {
tmp = Math.pow((k_m / (l / Math.pow(t_m, 1.5))), -2.0);
}
return t_s * tmp;
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): tmp = 0 if l <= 2e-71: tmp = ((l / k_m) / t_m) * ((l / k_m) / math.pow(t_m, 2.0)) else: tmp = math.pow((k_m / (l / math.pow(t_m, 1.5))), -2.0) return t_s * tmp
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) tmp = 0.0 if (l <= 2e-71) tmp = Float64(Float64(Float64(l / k_m) / t_m) * Float64(Float64(l / k_m) / (t_m ^ 2.0))); else tmp = Float64(k_m / Float64(l / (t_m ^ 1.5))) ^ -2.0; end return Float64(t_s * tmp) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k_m) tmp = 0.0; if (l <= 2e-71) tmp = ((l / k_m) / t_m) * ((l / k_m) / (t_m ^ 2.0)); else tmp = (k_m / (l / (t_m ^ 1.5))) ^ -2.0; end tmp_2 = t_s * tmp; end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[l, 2e-71], N[(N[(N[(l / k$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(k$95$m / N[(l / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{-71}:\\
\;\;\;\;\frac{\frac{\ell}{k_m}}{t_m} \cdot \frac{\frac{\ell}{k_m}}{{t_m}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{k_m}{\frac{\ell}{{t_m}^{1.5}}}\right)}^{-2}\\
\end{array}
\end{array}
if l < 1.9999999999999998e-71Initial program 51.1%
Simplified52.3%
Taylor expanded in k around 0 48.3%
add-sqr-sqrt40.5%
pow240.5%
sqrt-div23.1%
unpow223.1%
sqrt-prod5.6%
add-sqr-sqrt25.0%
sqrt-prod25.0%
unpow225.0%
sqrt-prod15.1%
add-sqr-sqrt30.1%
sqrt-pow130.9%
metadata-eval30.9%
Applied egg-rr30.9%
unpow230.9%
associate-/r*31.4%
associate-/r*32.0%
frac-times27.9%
pow-prod-up63.9%
metadata-eval63.9%
Applied egg-rr63.9%
unpow363.9%
unpow263.9%
times-frac68.2%
Applied egg-rr68.2%
if 1.9999999999999998e-71 < l Initial program 50.9%
Simplified51.9%
Taylor expanded in k around 0 46.2%
add-sqr-sqrt27.9%
pow227.9%
sqrt-div22.0%
unpow222.0%
sqrt-prod24.0%
add-sqr-sqrt24.0%
sqrt-prod24.0%
unpow224.0%
sqrt-prod4.8%
add-sqr-sqrt23.2%
sqrt-pow127.5%
metadata-eval27.5%
Applied egg-rr27.5%
unpow227.5%
associate-/r*26.5%
associate-/r*26.5%
frac-times24.0%
pow-prod-up51.1%
metadata-eval51.1%
Applied egg-rr51.1%
Taylor expanded in l around 0 46.2%
unpow246.2%
associate-/l*47.3%
*-rgt-identity47.3%
*-commutative47.3%
metadata-eval47.3%
pow-sqr24.0%
unpow224.0%
swap-sqr27.5%
associate-*r/27.5%
associate-*r/26.4%
times-frac26.5%
*-lft-identity26.5%
associate-/l*26.5%
associate-*r/26.5%
unpow-126.5%
unpow-126.5%
pow-sqr26.5%
*-commutative26.5%
associate-*l/27.5%
associate-/l*27.5%
metadata-eval27.5%
Simplified27.5%
Final simplification54.2%
k_m = (fabs.f64 k) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k_m) :precision binary64 (* t_s (pow (* (pow t_m -0.5) (/ l (* k_m t_m))) 2.0)))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
return t_s * pow((pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = t_s * (((t_m ** (-0.5d0)) * (l / (k_m * t_m))) ** 2.0d0)
end function
k_m = Math.abs(k);
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_m) {
return t_s * Math.pow((Math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0);
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): return t_s * math.pow((math.pow(t_m, -0.5) * (l / (k_m * t_m))), 2.0)
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) return Float64(t_s * (Float64((t_m ^ -0.5) * Float64(l / Float64(k_m * t_m))) ^ 2.0)) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k_m) tmp = t_s * (((t_m ^ -0.5) * (l / (k_m * t_m))) ^ 2.0); end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[Power[N[(N[Power[t$95$m, -0.5], $MachinePrecision] * N[(l / N[(k$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot {\left({t_m}^{-0.5} \cdot \frac{\ell}{k_m \cdot t_m}\right)}^{2}
\end{array}
Initial program 51.0%
Simplified52.2%
Taylor expanded in k around 0 47.6%
add-sqr-sqrt36.2%
pow236.2%
sqrt-div22.7%
unpow222.7%
sqrt-prod11.9%
add-sqr-sqrt24.7%
sqrt-prod24.6%
unpow224.6%
sqrt-prod11.6%
add-sqr-sqrt27.7%
sqrt-pow129.8%
metadata-eval29.8%
Applied egg-rr29.8%
add-cube-cbrt29.6%
pow229.6%
associate-/r*29.6%
cbrt-div29.6%
metadata-eval29.6%
sqrt-pow125.4%
unpow325.4%
sqrt-prod27.4%
sqrt-unprod29.6%
add-cbrt-cube29.6%
associate-/r*29.9%
cbrt-div29.9%
metadata-eval29.9%
sqrt-pow125.4%
unpow325.4%
sqrt-prod27.7%
sqrt-unprod29.9%
Applied egg-rr31.1%
pow-plus31.1%
metadata-eval31.1%
cube-div29.9%
rem-cube-cbrt30.0%
Simplified30.0%
*-un-lft-identity30.0%
cube-mult30.0%
add-sqr-sqrt30.1%
times-frac31.3%
pow1/231.3%
pow-flip31.3%
metadata-eval31.3%
Applied egg-rr31.3%
associate-/l/31.6%
Simplified31.6%
Final simplification31.6%
k_m = (fabs.f64 k) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k_m) :precision binary64 (* t_s (pow (/ l (* k_m (pow t_m 1.5))) 2.0)))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
return t_s * pow((l / (k_m * pow(t_m, 1.5))), 2.0);
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = t_s * ((l / (k_m * (t_m ** 1.5d0))) ** 2.0d0)
end function
k_m = Math.abs(k);
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_m) {
return t_s * Math.pow((l / (k_m * Math.pow(t_m, 1.5))), 2.0);
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): return t_s * math.pow((l / (k_m * math.pow(t_m, 1.5))), 2.0)
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) return Float64(t_s * (Float64(l / Float64(k_m * (t_m ^ 1.5))) ^ 2.0)) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k_m) tmp = t_s * ((l / (k_m * (t_m ^ 1.5))) ^ 2.0); end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[Power[N[(l / N[(k$95$m * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot {\left(\frac{\ell}{k_m \cdot {t_m}^{1.5}}\right)}^{2}
\end{array}
Initial program 51.0%
Simplified52.2%
Taylor expanded in k around 0 47.6%
add-sqr-sqrt36.2%
pow236.2%
sqrt-div22.7%
unpow222.7%
sqrt-prod11.9%
add-sqr-sqrt24.7%
sqrt-prod24.6%
unpow224.6%
sqrt-prod11.6%
add-sqr-sqrt27.7%
sqrt-pow129.8%
metadata-eval29.8%
Applied egg-rr29.8%
Final simplification29.8%
k_m = (fabs.f64 k) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k_m) :precision binary64 (* t_s (pow (/ (/ l k_m) (pow t_m 1.5)) 2.0)))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
return t_s * pow(((l / k_m) / pow(t_m, 1.5)), 2.0);
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = t_s * (((l / k_m) / (t_m ** 1.5d0)) ** 2.0d0)
end function
k_m = Math.abs(k);
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_m) {
return t_s * Math.pow(((l / k_m) / Math.pow(t_m, 1.5)), 2.0);
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): return t_s * math.pow(((l / k_m) / math.pow(t_m, 1.5)), 2.0)
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) return Float64(t_s * (Float64(Float64(l / k_m) / (t_m ^ 1.5)) ^ 2.0)) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k_m) tmp = t_s * (((l / k_m) / (t_m ^ 1.5)) ^ 2.0); end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[Power[N[(N[(l / k$95$m), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot {\left(\frac{\frac{\ell}{k_m}}{{t_m}^{1.5}}\right)}^{2}
\end{array}
Initial program 51.0%
Simplified52.2%
Taylor expanded in k around 0 47.6%
expm1-log1p-u37.3%
expm1-udef35.9%
Applied egg-rr27.2%
expm1-def29.6%
expm1-log1p29.8%
associate-/r*30.1%
Simplified30.1%
Final simplification30.1%
k_m = (fabs.f64 k) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k_m) :precision binary64 (* t_s (* (/ (/ l k_m) t_m) (/ (/ l k_m) (pow t_m 2.0)))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
return t_s * (((l / k_m) / t_m) * ((l / k_m) / pow(t_m, 2.0)));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = t_s * (((l / k_m) / t_m) * ((l / k_m) / (t_m ** 2.0d0)))
end function
k_m = Math.abs(k);
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_m) {
return t_s * (((l / k_m) / t_m) * ((l / k_m) / Math.pow(t_m, 2.0)));
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): return t_s * (((l / k_m) / t_m) * ((l / k_m) / math.pow(t_m, 2.0)))
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) return Float64(t_s * Float64(Float64(Float64(l / k_m) / t_m) * Float64(Float64(l / k_m) / (t_m ^ 2.0)))) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k_m) tmp = t_s * (((l / k_m) / t_m) * ((l / k_m) / (t_m ^ 2.0))); end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(N[(N[(l / k$95$m), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(\frac{\frac{\ell}{k_m}}{t_m} \cdot \frac{\frac{\ell}{k_m}}{{t_m}^{2}}\right)
\end{array}
Initial program 51.0%
Simplified52.2%
Taylor expanded in k around 0 47.6%
add-sqr-sqrt36.2%
pow236.2%
sqrt-div22.7%
unpow222.7%
sqrt-prod11.9%
add-sqr-sqrt24.7%
sqrt-prod24.6%
unpow224.6%
sqrt-prod11.6%
add-sqr-sqrt27.7%
sqrt-pow129.8%
metadata-eval29.8%
Applied egg-rr29.8%
unpow229.8%
associate-/r*29.7%
associate-/r*30.1%
frac-times26.6%
pow-prod-up59.5%
metadata-eval59.5%
Applied egg-rr59.5%
unpow359.5%
unpow259.5%
times-frac63.7%
Applied egg-rr63.7%
Final simplification63.7%
k_m = (fabs.f64 k) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k_m) :precision binary64 (* t_s (/ (* (/ l k_m) (/ l k_m)) (pow t_m 3.0))))
k_m = fabs(k);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
return t_s * (((l / k_m) * (l / k_m)) / pow(t_m, 3.0));
}
k_m = abs(k)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = t_s * (((l / k_m) * (l / k_m)) / (t_m ** 3.0d0))
end function
k_m = Math.abs(k);
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_m) {
return t_s * (((l / k_m) * (l / k_m)) / Math.pow(t_m, 3.0));
}
k_m = math.fabs(k) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k_m): return t_s * (((l / k_m) * (l / k_m)) / math.pow(t_m, 3.0))
k_m = abs(k) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k_m) return Float64(t_s * Float64(Float64(Float64(l / k_m) * Float64(l / k_m)) / (t_m ^ 3.0))) end
k_m = abs(k); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k_m) tmp = t_s * (((l / k_m) * (l / k_m)) / (t_m ^ 3.0)); end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(N[(N[(l / k$95$m), $MachinePrecision] * N[(l / k$95$m), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{\frac{\ell}{k_m} \cdot \frac{\ell}{k_m}}{{t_m}^{3}}
\end{array}
Initial program 51.0%
Simplified52.2%
Taylor expanded in k around 0 47.6%
add-sqr-sqrt36.2%
pow236.2%
sqrt-div22.7%
unpow222.7%
sqrt-prod11.9%
add-sqr-sqrt24.7%
sqrt-prod24.6%
unpow224.6%
sqrt-prod11.6%
add-sqr-sqrt27.7%
sqrt-pow129.8%
metadata-eval29.8%
Applied egg-rr29.8%
unpow229.8%
associate-/r*29.7%
associate-/r*30.1%
frac-times26.6%
pow-prod-up59.5%
metadata-eval59.5%
Applied egg-rr59.5%
Final simplification59.5%
herbie shell --seed 2023325
(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))))