
(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 13 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 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
(*
t_s
(if (<= t_m 6e-106)
(/
2.0
(/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* (pow l 2.0) (cos k))))
(if (<= t_m 6e+101)
(/ 2.0 (/ (* (sin k) (/ (pow t_m 3.0) l)) (/ l t_2)))
(/
2.0
(* t_2 (pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l) 2.0))) 3.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = tan(k) * (2.0 + pow((k / t_m), 2.0));
double tmp;
if (t_m <= 6e-106) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 6e+101) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) / (l / t_2));
} else {
tmp = 2.0 / (t_2 * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l), 2.0))), 3.0));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
double tmp;
if (t_m <= 6e-106) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 6e+101) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / (l / t_2));
} else {
tmp = 2.0 / (t_2 * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l), 2.0))), 3.0));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) tmp = 0.0 if (t_m <= 6e-106) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 6e+101) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / Float64(l / t_2))); else tmp = Float64(2.0 / Float64(t_2 * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l) ^ 2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 6e-106], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+101], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $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 := \tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 6 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t_m \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t_m \leq 6 \cdot 10^{+101}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\frac{\ell}{t_2}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_2 \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
\end{array}
if t < 6.00000000000000037e-106Initial program 49.3%
associate-*l*49.3%
sqr-neg49.3%
sqr-neg49.3%
associate-/r*54.3%
distribute-rgt-in54.3%
unpow254.3%
times-frac41.6%
sqr-neg41.6%
times-frac54.3%
unpow254.3%
distribute-rgt-in54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.2%
associate-/l/49.3%
cbrt-div49.8%
rem-cbrt-cube61.5%
cbrt-unprod71.7%
pow271.7%
Applied egg-rr71.7%
Taylor expanded in k around inf 65.3%
if 6.00000000000000037e-106 < t < 5.99999999999999986e101Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
associate-*l/88.1%
*-commutative88.1%
Applied egg-rr88.1%
associate-/l*88.1%
Simplified88.1%
if 5.99999999999999986e101 < t Initial program 68.5%
associate-*l*68.5%
sqr-neg68.5%
sqr-neg68.5%
associate-/r*71.9%
distribute-rgt-in71.9%
unpow271.9%
times-frac51.3%
sqr-neg51.3%
times-frac71.9%
unpow271.9%
distribute-rgt-in71.9%
Simplified71.9%
add-cube-cbrt71.9%
pow371.9%
*-commutative71.9%
cbrt-prod71.9%
associate-/l/68.5%
cbrt-div68.5%
rem-cbrt-cube91.2%
cbrt-unprod96.7%
pow296.7%
Applied egg-rr96.7%
Final simplification72.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.6e-106)
(*
2.0
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (* t_m (pow (sin k) 2.0)))))
(if (<= t_m 5.6e+102)
(/
2.0
(/
(* (sin k) (/ (pow t_m 3.0) l))
(/ l (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k) 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 tmp;
if (t_m <= 4.6e-106) {
tmp = 2.0 * ((pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * (t_m * pow(sin(k), 2.0))));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) / (l / (tan(k) * (2.0 + pow((k / t_m), 2.0)))));
} else {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k), 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 tmp;
if (t_m <= 4.6e-106) {
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 <= 5.6e+102) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / (l / (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))));
} else {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 4.6e-106) 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 <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / Float64(l / Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))); else tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 4.6e-106], 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, 5.6e+102], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $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 4.6 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t_m \cdot {\sin k}^{2}\right)}\\
\mathbf{elif}\;t_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k}\right)}^{2}}}{t_m}\right)}^{3}\\
\end{array}
\end{array}
if t < 4.6000000000000002e-106Initial program 49.3%
associate-/r*49.7%
sqr-neg49.7%
associate-*l*46.9%
sqr-neg46.9%
associate-/r*51.9%
associate-+l+51.9%
unpow251.9%
times-frac39.2%
sqr-neg39.2%
times-frac51.9%
unpow251.9%
Simplified51.9%
Taylor expanded in t around 0 65.6%
if 4.6000000000000002e-106 < t < 5.60000000000000037e102Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
associate-*l/88.1%
*-commutative88.1%
Applied egg-rr88.1%
associate-/l*88.1%
Simplified88.1%
if 5.60000000000000037e102 < t Initial program 68.5%
associate-/r*68.5%
sqr-neg68.5%
associate-*l*56.6%
sqr-neg56.6%
associate-/r*59.7%
associate-+l+59.7%
unpow259.7%
times-frac39.1%
sqr-neg39.1%
times-frac59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in k around 0 56.6%
add-cube-cbrt56.6%
pow356.6%
associate-/r*53.7%
cbrt-div53.7%
rem-cbrt-cube71.4%
Applied egg-rr71.4%
cbrt-div74.3%
unpow274.3%
cbrt-prod80.0%
pow280.0%
unpow280.0%
cbrt-prod94.2%
pow294.2%
Applied egg-rr94.2%
Final simplification72.4%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.5e-106)
(/
2.0
(/ (* (pow k 2.0) (* t_m (pow (sin k) 2.0))) (* (pow l 2.0) (cos k))))
(if (<= t_m 5.6e+102)
(/
2.0
(/
(* (sin k) (/ (pow t_m 3.0) l))
(/ l (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k) 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 tmp;
if (t_m <= 5.5e-106) {
tmp = 2.0 / ((pow(k, 2.0) * (t_m * pow(sin(k), 2.0))) / (pow(l, 2.0) * cos(k)));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) / (l / (tan(k) * (2.0 + pow((k / t_m), 2.0)))));
} else {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k), 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 tmp;
if (t_m <= 5.5e-106) {
tmp = 2.0 / ((Math.pow(k, 2.0) * (t_m * Math.pow(Math.sin(k), 2.0))) / (Math.pow(l, 2.0) * Math.cos(k)));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / (l / (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))));
} else {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 5.5e-106) tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) * Float64(t_m * (sin(k) ^ 2.0))) / Float64((l ^ 2.0) * cos(k)))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / Float64(l / Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))); else tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 5.5e-106], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2} \cdot \left(t_m \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}\\
\mathbf{elif}\;t_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k}\right)}^{2}}}{t_m}\right)}^{3}\\
\end{array}
\end{array}
if t < 5.5000000000000001e-106Initial program 49.3%
associate-*l*49.3%
sqr-neg49.3%
sqr-neg49.3%
associate-/r*54.3%
distribute-rgt-in54.3%
unpow254.3%
times-frac41.6%
sqr-neg41.6%
times-frac54.3%
unpow254.3%
distribute-rgt-in54.3%
Simplified54.3%
add-cube-cbrt54.3%
pow354.3%
*-commutative54.3%
cbrt-prod54.2%
associate-/l/49.3%
cbrt-div49.8%
rem-cbrt-cube61.5%
cbrt-unprod71.7%
pow271.7%
Applied egg-rr71.7%
Taylor expanded in k around inf 65.3%
if 5.5000000000000001e-106 < t < 5.60000000000000037e102Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
associate-*l/88.1%
*-commutative88.1%
Applied egg-rr88.1%
associate-/l*88.1%
Simplified88.1%
if 5.60000000000000037e102 < t Initial program 68.5%
associate-/r*68.5%
sqr-neg68.5%
associate-*l*56.6%
sqr-neg56.6%
associate-/r*59.7%
associate-+l+59.7%
unpow259.7%
times-frac39.1%
sqr-neg39.1%
times-frac59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in k around 0 56.6%
add-cube-cbrt56.6%
pow356.6%
associate-/r*53.7%
cbrt-div53.7%
rem-cbrt-cube71.4%
Applied egg-rr71.4%
cbrt-div74.3%
unpow274.3%
cbrt-prod80.0%
pow280.0%
unpow280.0%
cbrt-prod94.2%
pow294.2%
Applied egg-rr94.2%
Final simplification72.1%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.6e-106)
(*
2.0
(/
(pow l 2.0)
(*
(pow k 2.0)
(* t_m (pow (+ k (* 0.08333333333333333 (pow k 3.0))) 2.0)))))
(if (<= t_m 5.6e+102)
(/
2.0
(/
(* (sin k) (/ (pow t_m 3.0) l))
(/ l (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
(pow (/ (/ (pow (cbrt l) 2.0) (pow (cbrt k) 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 tmp;
if (t_m <= 3.6e-106) {
tmp = 2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * pow((k + (0.08333333333333333 * pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) / (l / (tan(k) * (2.0 + pow((k / t_m), 2.0)))));
} else {
tmp = pow(((pow(cbrt(l), 2.0) / pow(cbrt(k), 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 tmp;
if (t_m <= 3.6e-106) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.pow((k + (0.08333333333333333 * Math.pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.6e+102) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / (l / (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))));
} else {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / Math.pow(Math.cbrt(k), 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) tmp = 0.0 if (t_m <= 3.6e-106) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * (Float64(k + Float64(0.08333333333333333 * (k ^ 3.0))) ^ 2.0))))); elseif (t_m <= 5.6e+102) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / Float64(l / Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))); else tmp = Float64(Float64((cbrt(l) ^ 2.0) / (cbrt(k) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 3.6e-106], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[(k + N[(0.08333333333333333 * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $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.6 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t_m \cdot {\left(k + 0.08333333333333333 \cdot {k}^{3}\right)}^{2}\right)}\\
\mathbf{elif}\;t_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{{\left(\sqrt[3]{k}\right)}^{2}}}{t_m}\right)}^{3}\\
\end{array}
\end{array}
if t < 3.60000000000000013e-106Initial program 49.3%
associate-/r*49.7%
sqr-neg49.7%
associate-*l*46.9%
sqr-neg46.9%
associate-/r*51.9%
associate-+l+51.9%
unpow251.9%
times-frac39.2%
sqr-neg39.2%
times-frac51.9%
unpow251.9%
Simplified51.9%
add-sqr-sqrt13.5%
pow213.5%
sqrt-prod4.3%
associate-/l/3.8%
sqrt-div3.8%
sqrt-pow15.3%
metadata-eval5.3%
sqrt-unprod2.1%
add-sqr-sqrt5.8%
Applied egg-rr5.8%
Taylor expanded in k around 0 6.4%
*-commutative6.4%
Simplified6.4%
Taylor expanded in t around 0 54.9%
if 3.60000000000000013e-106 < t < 5.60000000000000037e102Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
associate-*l/88.1%
*-commutative88.1%
Applied egg-rr88.1%
associate-/l*88.1%
Simplified88.1%
if 5.60000000000000037e102 < t Initial program 68.5%
associate-/r*68.5%
sqr-neg68.5%
associate-*l*56.6%
sqr-neg56.6%
associate-/r*59.7%
associate-+l+59.7%
unpow259.7%
times-frac39.1%
sqr-neg39.1%
times-frac59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in k around 0 56.6%
add-cube-cbrt56.6%
pow356.6%
associate-/r*53.7%
cbrt-div53.7%
rem-cbrt-cube71.4%
Applied egg-rr71.4%
cbrt-div74.3%
unpow274.3%
cbrt-prod80.0%
pow280.0%
unpow280.0%
cbrt-prod94.2%
pow294.2%
Applied egg-rr94.2%
Final simplification64.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.5e-106)
(*
2.0
(/
(pow l 2.0)
(*
(pow k 2.0)
(* t_m (pow (+ k (* 0.08333333333333333 (pow k 3.0))) 2.0)))))
(if (<= t_m 5.5e+102)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (/ (pow t_m 3.0) l)) l)))
(pow (/ l (* k (pow t_m 1.5))) 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 <= 4.5e-106) {
tmp = 2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * pow((k + (0.08333333333333333 * pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * (pow(t_m, 3.0) / l)) / l));
} else {
tmp = pow((l / (k * pow(t_m, 1.5))), 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 <= 4.5d-106) then
tmp = 2.0d0 * ((l ** 2.0d0) / ((k ** 2.0d0) * (t_m * ((k + (0.08333333333333333d0 * (k ** 3.0d0))) ** 2.0d0))))
else if (t_m <= 5.5d+102) then
tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((sin(k) * ((t_m ** 3.0d0) / l)) / l))
else
tmp = (l / (k * (t_m ** 1.5d0))) ** 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 <= 4.5e-106) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.pow((k + (0.08333333333333333 * Math.pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l));
} else {
tmp = Math.pow((l / (k * Math.pow(t_m, 1.5))), 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 <= 4.5e-106: tmp = 2.0 * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (t_m * math.pow((k + (0.08333333333333333 * math.pow(k, 3.0))), 2.0)))) elif t_m <= 5.5e+102: tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)) else: tmp = math.pow((l / (k * math.pow(t_m, 1.5))), 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 <= 4.5e-106) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * (Float64(k + Float64(0.08333333333333333 * (k ^ 3.0))) ^ 2.0))))); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))); else tmp = Float64(l / Float64(k * (t_m ^ 1.5))) ^ 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 <= 4.5e-106) tmp = 2.0 * ((l ^ 2.0) / ((k ^ 2.0) * (t_m * ((k + (0.08333333333333333 * (k ^ 3.0))) ^ 2.0)))); elseif (t_m <= 5.5e+102) tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)); else tmp = (l / (k * (t_m ^ 1.5))) ^ 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, 4.5e-106], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[(k + N[(0.08333333333333333 * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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 4.5 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t_m \cdot {\left(k + 0.08333333333333333 \cdot {k}^{3}\right)}^{2}\right)}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 4.49999999999999955e-106Initial program 49.3%
associate-/r*49.7%
sqr-neg49.7%
associate-*l*46.9%
sqr-neg46.9%
associate-/r*51.9%
associate-+l+51.9%
unpow251.9%
times-frac39.2%
sqr-neg39.2%
times-frac51.9%
unpow251.9%
Simplified51.9%
add-sqr-sqrt13.5%
pow213.5%
sqrt-prod4.3%
associate-/l/3.8%
sqrt-div3.8%
sqrt-pow15.3%
metadata-eval5.3%
sqrt-unprod2.1%
add-sqr-sqrt5.8%
Applied egg-rr5.8%
Taylor expanded in k around 0 6.4%
*-commutative6.4%
Simplified6.4%
Taylor expanded in t around 0 54.9%
if 4.49999999999999955e-106 < t < 5.49999999999999981e102Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
if 5.49999999999999981e102 < t Initial program 68.5%
associate-/r*68.5%
sqr-neg68.5%
associate-*l*56.6%
sqr-neg56.6%
associate-/r*59.7%
associate-+l+59.7%
unpow259.7%
times-frac39.1%
sqr-neg39.1%
times-frac59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in k around 0 56.6%
unpow256.6%
Applied egg-rr56.6%
expm1-log1p-u56.6%
expm1-udef56.6%
add-sqr-sqrt56.6%
pow256.6%
sqrt-div56.6%
unpow256.6%
sqrt-prod41.9%
add-sqr-sqrt59.7%
sqrt-prod59.7%
sqrt-prod41.8%
add-sqr-sqrt71.9%
sqrt-pow180.6%
metadata-eval80.6%
Applied egg-rr80.6%
expm1-def86.0%
expm1-log1p86.0%
Simplified86.0%
Final simplification62.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.8e-106)
(*
2.0
(/
(pow l 2.0)
(*
(pow k 2.0)
(* t_m (pow (+ k (* 0.08333333333333333 (pow k 3.0))) 2.0)))))
(if (<= t_m 5.5e+102)
(/
2.0
(/
(* (sin k) (/ (pow t_m 3.0) l))
(/ l (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))))
(pow (/ l (* k (pow t_m 1.5))) 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.8e-106) {
tmp = 2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * pow((k + (0.08333333333333333 * pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) / (l / (tan(k) * (2.0 + pow((k / t_m), 2.0)))));
} else {
tmp = pow((l / (k * pow(t_m, 1.5))), 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.8d-106) then
tmp = 2.0d0 * ((l ** 2.0d0) / ((k ** 2.0d0) * (t_m * ((k + (0.08333333333333333d0 * (k ** 3.0d0))) ** 2.0d0))))
else if (t_m <= 5.5d+102) then
tmp = 2.0d0 / ((sin(k) * ((t_m ** 3.0d0) / l)) / (l / (tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0)))))
else
tmp = (l / (k * (t_m ** 1.5d0))) ** 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.8e-106) {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.pow((k + (0.08333333333333333 * Math.pow(k, 3.0))), 2.0))));
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / (l / (Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0)))));
} else {
tmp = Math.pow((l / (k * Math.pow(t_m, 1.5))), 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.8e-106: tmp = 2.0 * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (t_m * math.pow((k + (0.08333333333333333 * math.pow(k, 3.0))), 2.0)))) elif t_m <= 5.5e+102: tmp = 2.0 / ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / (l / (math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))))) else: tmp = math.pow((l / (k * math.pow(t_m, 1.5))), 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.8e-106) tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * (Float64(k + Float64(0.08333333333333333 * (k ^ 3.0))) ^ 2.0))))); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / Float64(l / Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))))); else tmp = Float64(l / Float64(k * (t_m ^ 1.5))) ^ 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.8e-106) tmp = 2.0 * ((l ^ 2.0) / ((k ^ 2.0) * (t_m * ((k + (0.08333333333333333 * (k ^ 3.0))) ^ 2.0)))); elseif (t_m <= 5.5e+102) tmp = 2.0 / ((sin(k) * ((t_m ^ 3.0) / l)) / (l / (tan(k) * (2.0 + ((k / t_m) ^ 2.0))))); else tmp = (l / (k * (t_m ^ 1.5))) ^ 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.8e-106], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[(k + N[(0.08333333333333333 * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / N[(l / N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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.8 \cdot 10^{-106}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t_m \cdot {\left(k + 0.08333333333333333 \cdot {k}^{3}\right)}^{2}\right)}\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k \cdot \left(2 + {\left(\frac{k}{t_m}\right)}^{2}\right)}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 3.7999999999999999e-106Initial program 49.3%
associate-/r*49.7%
sqr-neg49.7%
associate-*l*46.9%
sqr-neg46.9%
associate-/r*51.9%
associate-+l+51.9%
unpow251.9%
times-frac39.2%
sqr-neg39.2%
times-frac51.9%
unpow251.9%
Simplified51.9%
add-sqr-sqrt13.5%
pow213.5%
sqrt-prod4.3%
associate-/l/3.8%
sqrt-div3.8%
sqrt-pow15.3%
metadata-eval5.3%
sqrt-unprod2.1%
add-sqr-sqrt5.8%
Applied egg-rr5.8%
Taylor expanded in k around 0 6.4%
*-commutative6.4%
Simplified6.4%
Taylor expanded in t around 0 54.9%
if 3.7999999999999999e-106 < t < 5.49999999999999981e102Initial program 71.2%
associate-*l*71.3%
sqr-neg71.3%
sqr-neg71.3%
associate-/r*82.7%
distribute-rgt-in82.7%
unpow282.7%
times-frac82.7%
sqr-neg82.7%
times-frac82.7%
unpow282.7%
distribute-rgt-in82.7%
Simplified82.7%
associate-*l/82.6%
Applied egg-rr82.6%
associate-*l/88.1%
*-commutative88.1%
Applied egg-rr88.1%
associate-/l*88.1%
Simplified88.1%
if 5.49999999999999981e102 < t Initial program 68.5%
associate-/r*68.5%
sqr-neg68.5%
associate-*l*56.6%
sqr-neg56.6%
associate-/r*59.7%
associate-+l+59.7%
unpow259.7%
times-frac39.1%
sqr-neg39.1%
times-frac59.7%
unpow259.7%
Simplified59.7%
Taylor expanded in k around 0 56.6%
unpow256.6%
Applied egg-rr56.6%
expm1-log1p-u56.6%
expm1-udef56.6%
add-sqr-sqrt56.6%
pow256.6%
sqrt-div56.6%
unpow256.6%
sqrt-prod41.9%
add-sqr-sqrt59.7%
sqrt-prod59.7%
sqrt-prod41.8%
add-sqr-sqrt71.9%
sqrt-pow180.6%
metadata-eval80.6%
Applied egg-rr80.6%
expm1-def86.0%
expm1-log1p86.0%
Simplified86.0%
Final simplification63.5%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 5.1e-5)
(/ (* 2.0 (pow (/ l (* k (pow t_m 1.5))) 2.0)) (+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 2.2e+48)
(/
2.0
(* (/ (* (sin k) (/ (pow t_m 3.0) l)) l) (* 2.0 (/ (sin k) (cos k)))))
(*
2.0
(/
(pow l 2.0)
(*
(pow k 2.0)
(* t_m (pow (+ k (* 0.08333333333333333 (pow k 3.0))) 2.0)))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5.1e-5) {
tmp = (2.0 * pow((l / (k * pow(t_m, 1.5))), 2.0)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 2.2e+48) {
tmp = 2.0 / (((sin(k) * (pow(t_m, 3.0) / l)) / l) * (2.0 * (sin(k) / cos(k))));
} else {
tmp = 2.0 * (pow(l, 2.0) / (pow(k, 2.0) * (t_m * pow((k + (0.08333333333333333 * pow(k, 3.0))), 2.0))));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 5.1d-5) then
tmp = (2.0d0 * ((l / (k * (t_m ** 1.5d0))) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
else if (k <= 2.2d+48) then
tmp = 2.0d0 / (((sin(k) * ((t_m ** 3.0d0) / l)) / l) * (2.0d0 * (sin(k) / cos(k))))
else
tmp = 2.0d0 * ((l ** 2.0d0) / ((k ** 2.0d0) * (t_m * ((k + (0.08333333333333333d0 * (k ** 3.0d0))) ** 2.0d0))))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 5.1e-5) {
tmp = (2.0 * Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 2.2e+48) {
tmp = 2.0 / (((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l) * (2.0 * (Math.sin(k) / Math.cos(k))));
} else {
tmp = 2.0 * (Math.pow(l, 2.0) / (Math.pow(k, 2.0) * (t_m * Math.pow((k + (0.08333333333333333 * Math.pow(k, 3.0))), 2.0))));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 5.1e-5: tmp = (2.0 * math.pow((l / (k * math.pow(t_m, 1.5))), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) elif k <= 2.2e+48: tmp = 2.0 / (((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l) * (2.0 * (math.sin(k) / math.cos(k)))) else: tmp = 2.0 * (math.pow(l, 2.0) / (math.pow(k, 2.0) * (t_m * math.pow((k + (0.08333333333333333 * math.pow(k, 3.0))), 2.0)))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 5.1e-5) tmp = Float64(Float64(2.0 * (Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 2.2e+48) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l) * Float64(2.0 * Float64(sin(k) / cos(k))))); else tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64((k ^ 2.0) * Float64(t_m * (Float64(k + Float64(0.08333333333333333 * (k ^ 3.0))) ^ 2.0))))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 5.1e-5) tmp = (2.0 * ((l / (k * (t_m ^ 1.5))) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); elseif (k <= 2.2e+48) tmp = 2.0 / (((sin(k) * ((t_m ^ 3.0) / l)) / l) * (2.0 * (sin(k) / cos(k)))); else tmp = 2.0 * ((l ^ 2.0) / ((k ^ 2.0) * (t_m * ((k + (0.08333333333333333 * (k ^ 3.0))) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5.1e-5], N[(N[(2.0 * N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e+48], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(N[Sin[k], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Power[N[(k + N[(0.08333333333333333 * N[Power[k, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 5.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 2.2 \cdot 10^{+48}:\\
\;\;\;\;\frac{2}{\frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \frac{\sin k}{\cos k}\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot \left(t_m \cdot {\left(k + 0.08333333333333333 \cdot {k}^{3}\right)}^{2}\right)}\\
\end{array}
\end{array}
if k < 5.09999999999999996e-5Initial program 58.8%
associate-/r*59.2%
sqr-neg59.2%
associate-*l*53.9%
sqr-neg53.9%
associate-/r*59.1%
associate-+l+59.1%
unpow259.1%
times-frac49.2%
sqr-neg49.2%
times-frac59.1%
unpow259.1%
Simplified59.1%
add-sqr-sqrt24.5%
pow224.5%
sqrt-prod19.8%
associate-/l/17.8%
sqrt-div17.8%
sqrt-pow121.4%
metadata-eval21.4%
sqrt-unprod12.5%
add-sqr-sqrt23.4%
Applied egg-rr23.4%
Taylor expanded in k around 0 28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in k around 0 52.3%
associate-/r*50.9%
metadata-eval50.9%
pow-sqr19.5%
associate-/r*23.1%
unpow223.1%
unpow223.1%
times-frac26.1%
associate-*l/28.3%
associate-*r/28.7%
unpow228.7%
associate-/r*28.8%
Simplified28.8%
if 5.09999999999999996e-5 < k < 2.1999999999999999e48Initial program 39.7%
associate-*l*39.8%
sqr-neg39.8%
sqr-neg39.8%
associate-/r*39.8%
distribute-rgt-in39.8%
unpow239.8%
times-frac39.8%
sqr-neg39.8%
times-frac39.8%
unpow239.8%
distribute-rgt-in39.8%
Simplified39.8%
associate-*l/39.8%
Applied egg-rr39.8%
Taylor expanded in t around inf 52.0%
if 2.1999999999999999e48 < k Initial program 43.2%
associate-/r*43.2%
sqr-neg43.2%
associate-*l*43.2%
sqr-neg43.2%
associate-/r*50.7%
associate-+l+50.7%
unpow250.7%
times-frac28.7%
sqr-neg28.7%
times-frac50.7%
unpow250.7%
Simplified50.7%
add-sqr-sqrt21.0%
pow221.0%
sqrt-prod5.8%
associate-/l/4.0%
sqrt-div4.0%
sqrt-pow15.6%
metadata-eval5.6%
sqrt-unprod3.7%
add-sqr-sqrt7.5%
Applied egg-rr7.5%
Taylor expanded in k around 0 17.0%
*-commutative17.0%
Simplified17.0%
Taylor expanded in t around 0 58.0%
Final simplification35.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 0.00037)
(/ (* 2.0 (pow (/ l (* k (pow t_m 1.5))) 2.0)) (+ 2.0 (pow (/ k t_m) 2.0)))
(if (<= k 1.3e+60)
(/ (* (pow l 2.0) (cos k)) (* (pow k 2.0) (pow t_m 3.0)))
(* 288.0 (/ (pow l 2.0) (* t_m (pow k 8.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.00037) {
tmp = (2.0 * pow((l / (k * pow(t_m, 1.5))), 2.0)) / (2.0 + pow((k / t_m), 2.0));
} else if (k <= 1.3e+60) {
tmp = (pow(l, 2.0) * cos(k)) / (pow(k, 2.0) * pow(t_m, 3.0));
} else {
tmp = 288.0 * (pow(l, 2.0) / (t_m * pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 0.00037d0) then
tmp = (2.0d0 * ((l / (k * (t_m ** 1.5d0))) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
else if (k <= 1.3d+60) then
tmp = ((l ** 2.0d0) * cos(k)) / ((k ** 2.0d0) * (t_m ** 3.0d0))
else
tmp = 288.0d0 * ((l ** 2.0d0) / (t_m * (k ** 8.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 0.00037) {
tmp = (2.0 * Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
} else if (k <= 1.3e+60) {
tmp = (Math.pow(l, 2.0) * Math.cos(k)) / (Math.pow(k, 2.0) * Math.pow(t_m, 3.0));
} else {
tmp = 288.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 0.00037: tmp = (2.0 * math.pow((l / (k * math.pow(t_m, 1.5))), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) elif k <= 1.3e+60: tmp = (math.pow(l, 2.0) * math.cos(k)) / (math.pow(k, 2.0) * math.pow(t_m, 3.0)) else: tmp = 288.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 8.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.00037) tmp = Float64(Float64(2.0 * (Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); elseif (k <= 1.3e+60) tmp = Float64(Float64((l ^ 2.0) * cos(k)) / Float64((k ^ 2.0) * (t_m ^ 3.0))); else tmp = Float64(288.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 8.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 0.00037) tmp = (2.0 * ((l / (k * (t_m ^ 1.5))) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); elseif (k <= 1.3e+60) tmp = ((l ^ 2.0) * cos(k)) / ((k ^ 2.0) * (t_m ^ 3.0)); else tmp = 288.0 * ((l ^ 2.0) / (t_m * (k ^ 8.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.00037], N[(N[(2.0 * N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.3e+60], N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(288.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 8.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.00037:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+60}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot {t_m}^{3}}\\
\mathbf{else}:\\
\;\;\;\;288 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{8}}\\
\end{array}
\end{array}
if k < 3.6999999999999999e-4Initial program 58.8%
associate-/r*59.2%
sqr-neg59.2%
associate-*l*53.9%
sqr-neg53.9%
associate-/r*59.1%
associate-+l+59.1%
unpow259.1%
times-frac49.2%
sqr-neg49.2%
times-frac59.1%
unpow259.1%
Simplified59.1%
add-sqr-sqrt24.5%
pow224.5%
sqrt-prod19.8%
associate-/l/17.8%
sqrt-div17.8%
sqrt-pow121.4%
metadata-eval21.4%
sqrt-unprod12.5%
add-sqr-sqrt23.4%
Applied egg-rr23.4%
Taylor expanded in k around 0 28.2%
*-commutative28.2%
Simplified28.2%
Taylor expanded in k around 0 52.3%
associate-/r*50.9%
metadata-eval50.9%
pow-sqr19.5%
associate-/r*23.1%
unpow223.1%
unpow223.1%
times-frac26.1%
associate-*l/28.3%
associate-*r/28.7%
unpow228.7%
associate-/r*28.8%
Simplified28.8%
if 3.6999999999999999e-4 < k < 1.30000000000000004e60Initial program 36.7%
associate-/r*36.7%
sqr-neg36.7%
associate-*l*36.6%
sqr-neg36.6%
associate-/r*36.6%
associate-+l+36.6%
unpow236.6%
times-frac36.7%
sqr-neg36.7%
times-frac36.6%
unpow236.6%
Simplified36.6%
Taylor expanded in t around inf 47.7%
Taylor expanded in k around 0 47.8%
if 1.30000000000000004e60 < k Initial program 43.9%
associate-/r*43.9%
sqr-neg43.9%
associate-*l*43.9%
sqr-neg43.9%
associate-/r*51.5%
associate-+l+51.5%
unpow251.5%
times-frac29.1%
sqr-neg29.1%
times-frac51.5%
unpow251.5%
Simplified51.5%
add-sqr-sqrt21.3%
pow221.3%
sqrt-prod5.8%
associate-/l/3.9%
sqrt-div3.9%
sqrt-pow15.6%
metadata-eval5.6%
sqrt-unprod3.8%
add-sqr-sqrt7.5%
Applied egg-rr7.5%
Taylor expanded in k around 0 17.3%
*-commutative17.3%
Simplified17.3%
Taylor expanded in k around inf 59.1%
Final simplification35.9%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 8e-154)
(pow (/ (cbrt (/ (pow l 2.0) (pow k 2.0))) t_m) 3.0)
(/
(* 2.0 (pow (/ l (* k (pow t_m 1.5))) 2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-154) {
tmp = pow((cbrt((pow(l, 2.0) / pow(k, 2.0))) / t_m), 3.0);
} else {
tmp = (2.0 * pow((l / (k * pow(t_m, 1.5))), 2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 8e-154) {
tmp = Math.pow((Math.cbrt((Math.pow(l, 2.0) / Math.pow(k, 2.0))) / t_m), 3.0);
} else {
tmp = (2.0 * Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 8e-154) tmp = Float64(cbrt(Float64((l ^ 2.0) / (k ^ 2.0))) / t_m) ^ 3.0; else tmp = Float64(Float64(2.0 * (Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e-154], N[Power[N[(N[Power[N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(2.0 * N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8 \cdot 10^{-154}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{\frac{{\ell}^{2}}{{k}^{2}}}}{t_m}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 7.9999999999999998e-154Initial program 50.1%
associate-/r*50.4%
sqr-neg50.4%
associate-*l*47.6%
sqr-neg47.6%
associate-/r*52.7%
associate-+l+52.7%
unpow252.7%
times-frac39.6%
sqr-neg39.6%
times-frac52.7%
unpow252.7%
Simplified52.7%
Taylor expanded in k around 0 48.2%
add-cube-cbrt48.1%
pow348.1%
associate-/r*46.6%
cbrt-div46.6%
rem-cbrt-cube57.9%
Applied egg-rr57.9%
if 7.9999999999999998e-154 < t Initial program 66.6%
associate-/r*66.6%
sqr-neg66.6%
associate-*l*59.8%
sqr-neg59.8%
associate-/r*66.2%
associate-+l+66.2%
unpow266.2%
times-frac56.6%
sqr-neg56.6%
times-frac66.2%
unpow266.2%
Simplified66.2%
add-sqr-sqrt50.9%
pow250.9%
sqrt-prod50.8%
associate-/l/45.7%
sqrt-div45.7%
sqrt-pow154.9%
metadata-eval54.9%
sqrt-unprod30.1%
add-sqr-sqrt60.1%
Applied egg-rr60.1%
Taylor expanded in k around 0 77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in k around 0 55.6%
associate-/r*55.6%
metadata-eval55.6%
pow-sqr55.6%
associate-/r*63.6%
unpow263.6%
unpow263.6%
times-frac71.6%
associate-*l/77.4%
associate-*r/78.6%
unpow278.6%
associate-/r*78.7%
Simplified78.7%
Final simplification63.8%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2e-153)
(* 288.0 (/ (pow l 2.0) (* t_m (pow k 8.0))))
(/
(* 2.0 (pow (/ l (* k (pow t_m 1.5))) 2.0))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-153) {
tmp = 288.0 * (pow(l, 2.0) / (t_m * pow(k, 8.0)));
} else {
tmp = (2.0 * pow((l / (k * pow(t_m, 1.5))), 2.0)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2d-153) then
tmp = 288.0d0 * ((l ** 2.0d0) / (t_m * (k ** 8.0d0)))
else
tmp = (2.0d0 * ((l / (k * (t_m ** 1.5d0))) ** 2.0d0)) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-153) {
tmp = 288.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 8.0)));
} else {
tmp = (2.0 * Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2e-153: tmp = 288.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 8.0))) else: tmp = (2.0 * math.pow((l / (k * math.pow(t_m, 1.5))), 2.0)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 2e-153) tmp = Float64(288.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 8.0)))); else tmp = Float64(Float64(2.0 * (Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2e-153) tmp = 288.0 * ((l ^ 2.0) / (t_m * (k ^ 8.0))); else tmp = (2.0 * ((l / (k * (t_m ^ 1.5))) ^ 2.0)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e-153], N[(288.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 8.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2 \cdot 10^{-153}:\\
\;\;\;\;288 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{8}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 2.00000000000000008e-153Initial program 50.1%
associate-/r*50.4%
sqr-neg50.4%
associate-*l*47.6%
sqr-neg47.6%
associate-/r*52.7%
associate-+l+52.7%
unpow252.7%
times-frac39.6%
sqr-neg39.6%
times-frac52.7%
unpow252.7%
Simplified52.7%
add-sqr-sqrt13.3%
pow213.3%
sqrt-prod3.8%
associate-/l/3.3%
sqrt-div3.3%
sqrt-pow13.8%
metadata-eval3.8%
sqrt-unprod2.2%
add-sqr-sqrt4.4%
Applied egg-rr4.4%
Taylor expanded in k around 0 4.9%
*-commutative4.9%
Simplified4.9%
Taylor expanded in k around inf 51.5%
if 2.00000000000000008e-153 < t Initial program 66.6%
associate-/r*66.6%
sqr-neg66.6%
associate-*l*59.8%
sqr-neg59.8%
associate-/r*66.2%
associate-+l+66.2%
unpow266.2%
times-frac56.6%
sqr-neg56.6%
times-frac66.2%
unpow266.2%
Simplified66.2%
add-sqr-sqrt50.9%
pow250.9%
sqrt-prod50.8%
associate-/l/45.7%
sqrt-div45.7%
sqrt-pow154.9%
metadata-eval54.9%
sqrt-unprod30.1%
add-sqr-sqrt60.1%
Applied egg-rr60.1%
Taylor expanded in k around 0 77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in k around 0 55.6%
associate-/r*55.6%
metadata-eval55.6%
pow-sqr55.6%
associate-/r*63.6%
unpow263.6%
unpow263.6%
times-frac71.6%
associate-*l/77.4%
associate-*r/78.6%
unpow278.6%
associate-/r*78.7%
Simplified78.7%
Final simplification59.2%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 9.5e+25)
(pow (/ l (* k (pow t_m 1.5))) 2.0)
(* 288.0 (/ (pow l 2.0) (* t_m (pow k 8.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 <= 9.5e+25) {
tmp = pow((l / (k * pow(t_m, 1.5))), 2.0);
} else {
tmp = 288.0 * (pow(l, 2.0) / (t_m * pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 9.5d+25) then
tmp = (l / (k * (t_m ** 1.5d0))) ** 2.0d0
else
tmp = 288.0d0 * ((l ** 2.0d0) / (t_m * (k ** 8.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 9.5e+25) {
tmp = Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0);
} else {
tmp = 288.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 9.5e+25: tmp = math.pow((l / (k * math.pow(t_m, 1.5))), 2.0) else: tmp = 288.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 8.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 <= 9.5e+25) tmp = Float64(l / Float64(k * (t_m ^ 1.5))) ^ 2.0; else tmp = Float64(288.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 8.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 9.5e+25) tmp = (l / (k * (t_m ^ 1.5))) ^ 2.0; else tmp = 288.0 * ((l ^ 2.0) / (t_m * (k ^ 8.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9.5e+25], N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(288.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 8.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 9.5 \cdot 10^{+25}:\\
\;\;\;\;{\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;288 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{8}}\\
\end{array}
\end{array}
if k < 9.5000000000000005e25Initial program 58.3%
associate-/r*58.6%
sqr-neg58.6%
associate-*l*53.5%
sqr-neg53.5%
associate-/r*58.5%
associate-+l+58.5%
unpow258.5%
times-frac49.0%
sqr-neg49.0%
times-frac58.5%
unpow258.5%
Simplified58.5%
Taylor expanded in k around 0 53.5%
unpow253.5%
Applied egg-rr53.5%
expm1-log1p-u35.1%
expm1-udef34.4%
add-sqr-sqrt34.0%
pow234.0%
sqrt-div21.3%
unpow221.3%
sqrt-prod12.2%
add-sqr-sqrt22.5%
sqrt-prod22.9%
sqrt-prod10.8%
add-sqr-sqrt26.0%
sqrt-pow126.9%
metadata-eval26.9%
Applied egg-rr26.9%
expm1-def28.3%
expm1-log1p28.4%
Simplified28.4%
if 9.5000000000000005e25 < k Initial program 42.6%
associate-/r*42.7%
sqr-neg42.7%
associate-*l*42.7%
sqr-neg42.7%
associate-/r*49.8%
associate-+l+49.8%
unpow249.8%
times-frac28.9%
sqr-neg28.9%
times-frac49.8%
unpow249.8%
Simplified49.8%
add-sqr-sqrt21.7%
pow221.7%
sqrt-prod7.2%
associate-/l/5.5%
sqrt-div5.4%
sqrt-pow17.0%
metadata-eval7.0%
sqrt-unprod3.5%
add-sqr-sqrt8.8%
Applied egg-rr8.8%
Taylor expanded in k around 0 16.2%
*-commutative16.2%
Simplified16.2%
Taylor expanded in k around inf 56.8%
Final simplification34.7%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.48e+26)
(pow (/ (/ l k) (pow t_m 1.5)) 2.0)
(* 288.0 (/ (pow l 2.0) (* t_m (pow k 8.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.48e+26) {
tmp = pow(((l / k) / pow(t_m, 1.5)), 2.0);
} else {
tmp = 288.0 * (pow(l, 2.0) / (t_m * pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.48d+26) then
tmp = ((l / k) / (t_m ** 1.5d0)) ** 2.0d0
else
tmp = 288.0d0 * ((l ** 2.0d0) / (t_m * (k ** 8.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.48e+26) {
tmp = Math.pow(((l / k) / Math.pow(t_m, 1.5)), 2.0);
} else {
tmp = 288.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 8.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.48e+26: tmp = math.pow(((l / k) / math.pow(t_m, 1.5)), 2.0) else: tmp = 288.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 8.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.48e+26) tmp = Float64(Float64(l / k) / (t_m ^ 1.5)) ^ 2.0; else tmp = Float64(288.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 8.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.48e+26) tmp = ((l / k) / (t_m ^ 1.5)) ^ 2.0; else tmp = 288.0 * ((l ^ 2.0) / (t_m * (k ^ 8.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.48e+26], N[Power[N[(N[(l / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(288.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 8.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 1.48 \cdot 10^{+26}:\\
\;\;\;\;{\left(\frac{\frac{\ell}{k}}{{t_m}^{1.5}}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;288 \cdot \frac{{\ell}^{2}}{t_m \cdot {k}^{8}}\\
\end{array}
\end{array}
if k < 1.48e26Initial program 58.3%
associate-/r*58.6%
sqr-neg58.6%
associate-*l*53.5%
sqr-neg53.5%
associate-/r*58.5%
associate-+l+58.5%
unpow258.5%
times-frac49.0%
sqr-neg49.0%
times-frac58.5%
unpow258.5%
Simplified58.5%
Taylor expanded in k around 0 53.5%
unpow253.5%
Applied egg-rr53.5%
expm1-log1p-u35.1%
expm1-udef34.4%
add-sqr-sqrt34.0%
pow234.0%
sqrt-div21.3%
unpow221.3%
sqrt-prod12.2%
add-sqr-sqrt22.5%
sqrt-prod22.9%
sqrt-prod10.8%
add-sqr-sqrt26.0%
sqrt-pow126.9%
metadata-eval26.9%
Applied egg-rr26.9%
expm1-def28.3%
expm1-log1p28.4%
Simplified28.4%
*-un-lft-identity28.4%
associate-/r*28.4%
Applied egg-rr28.4%
if 1.48e26 < k Initial program 42.6%
associate-/r*42.7%
sqr-neg42.7%
associate-*l*42.7%
sqr-neg42.7%
associate-/r*49.8%
associate-+l+49.8%
unpow249.8%
times-frac28.9%
sqr-neg28.9%
times-frac49.8%
unpow249.8%
Simplified49.8%
add-sqr-sqrt21.7%
pow221.7%
sqrt-prod7.2%
associate-/l/5.5%
sqrt-div5.4%
sqrt-pow17.0%
metadata-eval7.0%
sqrt-unprod3.5%
add-sqr-sqrt8.8%
Applied egg-rr8.8%
Taylor expanded in k around 0 16.2%
*-commutative16.2%
Simplified16.2%
Taylor expanded in k around inf 56.8%
Final simplification34.7%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (pow (/ l (* k (pow t_m 1.5))) 2.0)))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * pow((l / (k * pow(t_m, 1.5))), 2.0);
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * ((l / (k * (t_m ** 1.5d0))) ** 2.0d0)
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * Math.pow((l / (k * Math.pow(t_m, 1.5))), 2.0);
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * math.pow((l / (k * math.pow(t_m, 1.5))), 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(l / Float64(k * (t_m ^ 1.5))) ^ 2.0)) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * ((l / (k * (t_m ^ 1.5))) ^ 2.0); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[Power[N[(l / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot {\left(\frac{\ell}{k \cdot {t_m}^{1.5}}\right)}^{2}
\end{array}
Initial program 54.8%
associate-/r*55.0%
sqr-neg55.0%
associate-*l*51.1%
sqr-neg51.1%
associate-/r*56.6%
associate-+l+56.6%
unpow256.6%
times-frac44.5%
sqr-neg44.5%
times-frac56.6%
unpow256.6%
Simplified56.6%
Taylor expanded in k around 0 50.3%
unpow250.3%
Applied egg-rr50.3%
expm1-log1p-u36.0%
expm1-udef35.5%
add-sqr-sqrt35.2%
pow235.2%
sqrt-div19.4%
unpow219.4%
sqrt-prod12.3%
add-sqr-sqrt20.8%
sqrt-prod21.1%
sqrt-prod11.8%
add-sqr-sqrt23.6%
sqrt-pow124.3%
metadata-eval24.3%
Applied egg-rr24.3%
expm1-def25.3%
expm1-log1p25.4%
Simplified25.4%
Final simplification25.4%
herbie shell --seed 2024017
(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))))