
(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 18 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)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (/ l (hypot 1.0 (hypot 1.0 (/ k_m t))))))
(if (<= k_m 9.5e-16)
(pow (/ (pow (cbrt l) 2.0) (* t (pow (cbrt k_m) 2.0))) 3.0)
(if (<= k_m 1.32e+154)
(*
l
(*
2.0
(/ (* l (cos k_m)) (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))))))
(*
t_1
(pow
(/ (cbrt (* 2.0 t_1)) (* t (cbrt (* (sin k_m) (tan k_m)))))
3.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = l / hypot(1.0, hypot(1.0, (k_m / t)));
double tmp;
if (k_m <= 9.5e-16) {
tmp = pow((pow(cbrt(l), 2.0) / (t * pow(cbrt(k_m), 2.0))), 3.0);
} else if (k_m <= 1.32e+154) {
tmp = l * (2.0 * ((l * cos(k_m)) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0)))));
} else {
tmp = t_1 * pow((cbrt((2.0 * t_1)) / (t * cbrt((sin(k_m) * tan(k_m))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = l / Math.hypot(1.0, Math.hypot(1.0, (k_m / t)));
double tmp;
if (k_m <= 9.5e-16) {
tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
} else if (k_m <= 1.32e+154) {
tmp = l * (2.0 * ((l * Math.cos(k_m)) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0)))));
} else {
tmp = t_1 * Math.pow((Math.cbrt((2.0 * t_1)) / (t * Math.cbrt((Math.sin(k_m) * Math.tan(k_m))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(l / hypot(1.0, hypot(1.0, Float64(k_m / t)))) tmp = 0.0 if (k_m <= 9.5e-16) tmp = Float64((cbrt(l) ^ 2.0) / Float64(t * (cbrt(k_m) ^ 2.0))) ^ 3.0; elseif (k_m <= 1.32e+154) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k_m)) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0)))))); else tmp = Float64(t_1 * (Float64(cbrt(Float64(2.0 * t_1)) / Float64(t * cbrt(Float64(sin(k_m) * tan(k_m))))) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 9.5e-16], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 1.32e+154], N[(l * N[(2.0 * N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[(N[Power[N[(2.0 * t$95$1), $MachinePrecision], 1/3], $MachinePrecision] / N[(t * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t}\right)\right)}\\
\mathbf{if}\;k\_m \leq 9.5 \cdot 10^{-16}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}}\right)}^{3}\\
\mathbf{elif}\;k\_m \leq 1.32 \cdot 10^{+154}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(\frac{\sqrt[3]{2 \cdot t\_1}}{t \cdot \sqrt[3]{\sin k\_m \cdot \tan k\_m}}\right)}^{3}\\
\end{array}
\end{array}
if k < 9.5000000000000005e-16Initial program 57.1%
associate-/r*57.1%
unpow257.1%
sqr-neg57.1%
distribute-frac-neg257.1%
distribute-frac-neg257.1%
unpow257.1%
+-commutative57.1%
+-commutative57.1%
associate-/l/57.1%
associate-*l/58.0%
associate-/r/56.5%
Simplified56.5%
associate-*r*64.4%
*-un-lft-identity64.4%
times-frac65.0%
associate-/l/65.0%
Applied egg-rr65.0%
times-frac64.5%
*-commutative64.5%
times-frac65.0%
associate-*l/65.5%
associate-*l*60.1%
times-frac60.0%
/-rgt-identity60.0%
Simplified60.0%
Taylor expanded in k around 0 58.8%
add-cube-cbrt58.7%
pow358.7%
associate-*l/51.8%
cbrt-div51.8%
cbrt-prod58.7%
unpow258.7%
*-commutative58.7%
cbrt-prod59.2%
unpow359.2%
add-cbrt-cube71.2%
unpow271.2%
cbrt-prod82.6%
pow282.6%
Applied egg-rr82.6%
if 9.5000000000000005e-16 < k < 1.31999999999999998e154Initial program 39.0%
associate-/r*39.0%
unpow239.0%
sqr-neg39.0%
distribute-frac-neg239.0%
distribute-frac-neg239.0%
unpow239.0%
+-commutative39.0%
+-commutative39.0%
associate-/l/39.0%
associate-*l/39.1%
associate-/r/39.0%
Simplified39.0%
associate-*r*39.3%
*-un-lft-identity39.3%
times-frac41.8%
associate-/l/41.8%
Applied egg-rr41.8%
times-frac39.3%
*-commutative39.3%
times-frac41.8%
associate-*l/41.8%
associate-*l*41.9%
times-frac41.9%
/-rgt-identity41.9%
Simplified41.9%
Taylor expanded in t around 0 86.4%
if 1.31999999999999998e154 < k Initial program 36.1%
associate-/r*36.1%
unpow236.1%
sqr-neg36.1%
distribute-frac-neg236.1%
distribute-frac-neg236.1%
unpow236.1%
+-commutative36.1%
+-commutative36.1%
associate-/l/36.1%
associate-*l/36.1%
associate-/r/36.1%
Simplified36.1%
associate-*r*41.3%
add-sqr-sqrt41.3%
times-frac41.5%
Applied egg-rr52.7%
associate-/l*52.7%
associate-*l*52.7%
Simplified52.7%
add-cube-cbrt52.7%
pow352.7%
associate-*l/52.6%
cbrt-div52.6%
cbrt-prod52.5%
unpow352.4%
add-cbrt-cube83.1%
Applied egg-rr83.1%
Final simplification83.2%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (/ l (hypot 1.0 (hypot 1.0 (/ k_m t))))))
(if (<= t 5.5e-72)
(*
l
(* 2.0 (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t (pow (sin k_m) 2.0))))))
(*
t_1
(pow
(/ (cbrt (* 2.0 t_1)) (* t (* (cbrt (tan k_m)) (cbrt (sin k_m)))))
3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = l / hypot(1.0, hypot(1.0, (k_m / t)));
double tmp;
if (t <= 5.5e-72) {
tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t * pow(sin(k_m), 2.0)))));
} else {
tmp = t_1 * pow((cbrt((2.0 * t_1)) / (t * (cbrt(tan(k_m)) * cbrt(sin(k_m))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = l / Math.hypot(1.0, Math.hypot(1.0, (k_m / t)));
double tmp;
if (t <= 5.5e-72) {
tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t * Math.pow(Math.sin(k_m), 2.0)))));
} else {
tmp = t_1 * Math.pow((Math.cbrt((2.0 * t_1)) / (t * (Math.cbrt(Math.tan(k_m)) * Math.cbrt(Math.sin(k_m))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = Float64(l / hypot(1.0, hypot(1.0, Float64(k_m / t)))) tmp = 0.0 if (t <= 5.5e-72) tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t * (sin(k_m) ^ 2.0)))))); else tmp = Float64(t_1 * (Float64(cbrt(Float64(2.0 * t_1)) / Float64(t * Float64(cbrt(tan(k_m)) * cbrt(sin(k_m))))) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(l / N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 5.5e-72], N[(l * N[(2.0 * N[(N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[(N[Power[N[(2.0 * t$95$1), $MachinePrecision], 1/3], $MachinePrecision] / N[(t * N[(N[Power[N[Tan[k$95$m], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t}\right)\right)}\\
\mathbf{if}\;t \leq 5.5 \cdot 10^{-72}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t \cdot {\sin k\_m}^{2}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(\frac{\sqrt[3]{2 \cdot t\_1}}{t \cdot \left(\sqrt[3]{\tan k\_m} \cdot \sqrt[3]{\sin k\_m}\right)}\right)}^{3}\\
\end{array}
\end{array}
if t < 5.49999999999999994e-72Initial program 49.2%
associate-/r*49.1%
unpow249.1%
sqr-neg49.1%
distribute-frac-neg249.1%
distribute-frac-neg249.1%
unpow249.1%
+-commutative49.1%
+-commutative49.1%
associate-/l/49.2%
associate-*l/49.5%
associate-/r/48.2%
Simplified48.2%
associate-*r*54.4%
*-un-lft-identity54.4%
times-frac54.9%
associate-/l/54.9%
Applied egg-rr54.9%
times-frac54.4%
*-commutative54.4%
times-frac54.9%
associate-*l/55.4%
associate-*l*52.6%
times-frac52.5%
/-rgt-identity52.5%
Simplified52.5%
Taylor expanded in t around 0 68.0%
times-frac68.2%
Simplified68.2%
if 5.49999999999999994e-72 < t Initial program 57.6%
associate-/r*57.6%
unpow257.6%
sqr-neg57.6%
distribute-frac-neg257.6%
distribute-frac-neg257.6%
unpow257.6%
+-commutative57.6%
+-commutative57.6%
associate-/l/57.6%
associate-*l/59.2%
associate-/r/59.0%
Simplified59.0%
associate-*r*66.0%
add-sqr-sqrt65.9%
times-frac67.6%
Applied egg-rr69.3%
associate-/l*70.9%
associate-*l*64.0%
Simplified64.0%
add-cube-cbrt63.8%
pow363.8%
associate-*l/63.8%
cbrt-div63.8%
cbrt-prod63.7%
unpow363.8%
add-cbrt-cube76.3%
Applied egg-rr76.3%
*-commutative76.3%
cbrt-prod93.0%
Applied egg-rr93.0%
Final simplification74.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (hypot 1.0 (hypot 1.0 (/ k_m t)))) (t_2 (pow (cbrt l) 2.0)))
(if (<= t 2.9e-62)
(*
l
(* 2.0 (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t (pow (sin k_m) 2.0))))))
(if (<= t 6e+96)
(*
(/ l t_1)
(/ (* (/ 2.0 (pow t 3.0)) (/ (/ l (sin k_m)) (tan k_m))) t_1))
(if (<= t 2.15e+216)
(/
2.0
(*
(pow (* (cbrt (sin k_m)) (/ t t_2)) 3.0)
(* (tan k_m) (pow t_1 2.0))))
(pow (/ t_2 (* t (pow (cbrt k_m) 2.0))) 3.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = hypot(1.0, hypot(1.0, (k_m / t)));
double t_2 = pow(cbrt(l), 2.0);
double tmp;
if (t <= 2.9e-62) {
tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t * pow(sin(k_m), 2.0)))));
} else if (t <= 6e+96) {
tmp = (l / t_1) * (((2.0 / pow(t, 3.0)) * ((l / sin(k_m)) / tan(k_m))) / t_1);
} else if (t <= 2.15e+216) {
tmp = 2.0 / (pow((cbrt(sin(k_m)) * (t / t_2)), 3.0) * (tan(k_m) * pow(t_1, 2.0)));
} else {
tmp = pow((t_2 / (t * pow(cbrt(k_m), 2.0))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.hypot(1.0, Math.hypot(1.0, (k_m / t)));
double t_2 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (t <= 2.9e-62) {
tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t * Math.pow(Math.sin(k_m), 2.0)))));
} else if (t <= 6e+96) {
tmp = (l / t_1) * (((2.0 / Math.pow(t, 3.0)) * ((l / Math.sin(k_m)) / Math.tan(k_m))) / t_1);
} else if (t <= 2.15e+216) {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k_m)) * (t / t_2)), 3.0) * (Math.tan(k_m) * Math.pow(t_1, 2.0)));
} else {
tmp = Math.pow((t_2 / (t * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = hypot(1.0, hypot(1.0, Float64(k_m / t))) t_2 = cbrt(l) ^ 2.0 tmp = 0.0 if (t <= 2.9e-62) tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t * (sin(k_m) ^ 2.0)))))); elseif (t <= 6e+96) tmp = Float64(Float64(l / t_1) * Float64(Float64(Float64(2.0 / (t ^ 3.0)) * Float64(Float64(l / sin(k_m)) / tan(k_m))) / t_1)); elseif (t <= 2.15e+216) tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k_m)) * Float64(t / t_2)) ^ 3.0) * Float64(tan(k_m) * (t_1 ^ 2.0)))); else tmp = Float64(t_2 / Float64(t * (cbrt(k_m) ^ 2.0))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 2.9e-62], N[(l * N[(2.0 * N[(N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+96], N[(N[(l / t$95$1), $MachinePrecision] * N[(N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] / N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.15e+216], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k$95$m], $MachinePrecision], 1/3], $MachinePrecision] * N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$2 / N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t}\right)\right)\\
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;t \leq 2.9 \cdot 10^{-62}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t \cdot {\sin k\_m}^{2}}\right)\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+96}:\\
\;\;\;\;\frac{\ell}{t\_1} \cdot \frac{\frac{2}{{t}^{3}} \cdot \frac{\frac{\ell}{\sin k\_m}}{\tan k\_m}}{t\_1}\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+216}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k\_m} \cdot \frac{t}{t\_2}\right)}^{3} \cdot \left(\tan k\_m \cdot {t\_1}^{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_2}{t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}}\right)}^{3}\\
\end{array}
\end{array}
if t < 2.89999999999999986e-62Initial program 48.9%
associate-/r*48.9%
unpow248.9%
sqr-neg48.9%
distribute-frac-neg248.9%
distribute-frac-neg248.9%
unpow248.9%
+-commutative48.9%
+-commutative48.9%
associate-/l/48.9%
associate-*l/49.2%
associate-/r/47.9%
Simplified47.9%
associate-*r*54.1%
*-un-lft-identity54.1%
times-frac54.6%
associate-/l/54.6%
Applied egg-rr54.6%
times-frac54.1%
*-commutative54.1%
times-frac54.6%
associate-*l/55.1%
associate-*l*52.3%
times-frac52.3%
/-rgt-identity52.3%
Simplified52.3%
Taylor expanded in t around 0 68.1%
times-frac68.3%
Simplified68.3%
if 2.89999999999999986e-62 < t < 6.0000000000000001e96Initial program 65.4%
associate-/r*65.4%
unpow265.4%
sqr-neg65.4%
distribute-frac-neg265.4%
distribute-frac-neg265.4%
unpow265.4%
+-commutative65.4%
+-commutative65.4%
associate-/l/65.4%
associate-*l/69.2%
associate-/r/68.8%
Simplified68.8%
associate-*r*76.6%
add-sqr-sqrt76.4%
times-frac80.5%
Applied egg-rr84.4%
associate-/l*84.3%
associate-*l*76.7%
Simplified76.7%
associate-*r/76.7%
frac-times76.7%
Applied egg-rr76.7%
associate-/l*76.7%
associate-/r*76.7%
times-frac76.8%
associate-/r*92.1%
Simplified92.1%
if 6.0000000000000001e96 < t < 2.14999999999999985e216Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
pow344.4%
associate-/r*49.5%
*-commutative49.5%
cbrt-prod49.5%
associate-/r*44.4%
cbrt-div44.4%
rem-cbrt-cube74.8%
cbrt-prod91.3%
pow291.3%
Applied egg-rr91.3%
add-sqr-sqrt47.8%
pow247.8%
associate-+r+47.8%
metadata-eval47.8%
sqrt-prod47.8%
metadata-eval47.8%
associate-+r+47.8%
add-sqr-sqrt47.8%
hypot-1-def47.8%
unpow247.8%
hypot-1-def47.8%
Applied egg-rr47.8%
unpow247.8%
swap-sqr47.8%
rem-square-sqrt91.3%
unpow291.3%
Simplified91.3%
if 2.14999999999999985e216 < t Initial program 72.7%
associate-/r*72.7%
unpow272.7%
sqr-neg72.7%
distribute-frac-neg272.7%
distribute-frac-neg272.7%
unpow272.7%
+-commutative72.7%
+-commutative72.7%
associate-/l/72.7%
associate-*l/72.7%
associate-/r/72.7%
Simplified72.7%
associate-*r*82.3%
*-un-lft-identity82.3%
times-frac82.3%
associate-/l/82.3%
Applied egg-rr82.3%
times-frac82.3%
*-commutative82.3%
times-frac82.3%
associate-*l/82.3%
associate-*l*73.0%
times-frac72.7%
/-rgt-identity72.7%
Simplified72.7%
Taylor expanded in k around 0 73.0%
add-cube-cbrt73.0%
pow373.0%
associate-*l/63.6%
cbrt-div63.6%
cbrt-prod73.0%
unpow273.0%
*-commutative73.0%
cbrt-prod73.0%
unpow373.0%
add-cbrt-cube82.4%
unpow282.4%
cbrt-prod99.2%
pow299.2%
Applied egg-rr99.2%
Final simplification74.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (hypot 1.0 (hypot 1.0 (/ k_m t)))) (t_2 (pow (cbrt l) 2.0)))
(if (<= t 1.3e-62)
(*
l
(* 2.0 (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t (pow (sin k_m) 2.0))))))
(if (<= t 1.7e+96)
(*
(/ l t_1)
(/ (* (/ 2.0 (pow t 3.0)) (/ (/ l (sin k_m)) (tan k_m))) t_1))
(if (<= t 1.8e+216)
(/
2.0
(*
(pow (* (cbrt (sin k_m)) (/ t t_2)) 3.0)
(* (tan k_m) (+ 1.0 (+ 1.0 (pow (/ k_m t) 2.0))))))
(pow (/ t_2 (* t (pow (cbrt k_m) 2.0))) 3.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = hypot(1.0, hypot(1.0, (k_m / t)));
double t_2 = pow(cbrt(l), 2.0);
double tmp;
if (t <= 1.3e-62) {
tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t * pow(sin(k_m), 2.0)))));
} else if (t <= 1.7e+96) {
tmp = (l / t_1) * (((2.0 / pow(t, 3.0)) * ((l / sin(k_m)) / tan(k_m))) / t_1);
} else if (t <= 1.8e+216) {
tmp = 2.0 / (pow((cbrt(sin(k_m)) * (t / t_2)), 3.0) * (tan(k_m) * (1.0 + (1.0 + pow((k_m / t), 2.0)))));
} else {
tmp = pow((t_2 / (t * pow(cbrt(k_m), 2.0))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.hypot(1.0, Math.hypot(1.0, (k_m / t)));
double t_2 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (t <= 1.3e-62) {
tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t * Math.pow(Math.sin(k_m), 2.0)))));
} else if (t <= 1.7e+96) {
tmp = (l / t_1) * (((2.0 / Math.pow(t, 3.0)) * ((l / Math.sin(k_m)) / Math.tan(k_m))) / t_1);
} else if (t <= 1.8e+216) {
tmp = 2.0 / (Math.pow((Math.cbrt(Math.sin(k_m)) * (t / t_2)), 3.0) * (Math.tan(k_m) * (1.0 + (1.0 + Math.pow((k_m / t), 2.0)))));
} else {
tmp = Math.pow((t_2 / (t * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = hypot(1.0, hypot(1.0, Float64(k_m / t))) t_2 = cbrt(l) ^ 2.0 tmp = 0.0 if (t <= 1.3e-62) tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t * (sin(k_m) ^ 2.0)))))); elseif (t <= 1.7e+96) tmp = Float64(Float64(l / t_1) * Float64(Float64(Float64(2.0 / (t ^ 3.0)) * Float64(Float64(l / sin(k_m)) / tan(k_m))) / t_1)); elseif (t <= 1.8e+216) tmp = Float64(2.0 / Float64((Float64(cbrt(sin(k_m)) * Float64(t / t_2)) ^ 3.0) * Float64(tan(k_m) * Float64(1.0 + Float64(1.0 + (Float64(k_m / t) ^ 2.0)))))); else tmp = Float64(t_2 / Float64(t * (cbrt(k_m) ^ 2.0))) ^ 3.0; end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 1.3e-62], N[(l * N[(2.0 * N[(N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+96], N[(N[(l / t$95$1), $MachinePrecision] * N[(N[(N[(2.0 / N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(l / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] / N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+216], N[(2.0 / N[(N[Power[N[(N[Power[N[Sin[k$95$m], $MachinePrecision], 1/3], $MachinePrecision] * N[(t / t$95$2), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(t$95$2 / N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t}\right)\right)\\
t_2 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;t \leq 1.3 \cdot 10^{-62}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t \cdot {\sin k\_m}^{2}}\right)\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+96}:\\
\;\;\;\;\frac{\ell}{t\_1} \cdot \frac{\frac{2}{{t}^{3}} \cdot \frac{\frac{\ell}{\sin k\_m}}{\tan k\_m}}{t\_1}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+216}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{\sin k\_m} \cdot \frac{t}{t\_2}\right)}^{3} \cdot \left(\tan k\_m \cdot \left(1 + \left(1 + {\left(\frac{k\_m}{t}\right)}^{2}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{t\_2}{t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}}\right)}^{3}\\
\end{array}
\end{array}
if t < 1.3e-62Initial program 48.9%
associate-/r*48.9%
unpow248.9%
sqr-neg48.9%
distribute-frac-neg248.9%
distribute-frac-neg248.9%
unpow248.9%
+-commutative48.9%
+-commutative48.9%
associate-/l/48.9%
associate-*l/49.2%
associate-/r/47.9%
Simplified47.9%
associate-*r*54.1%
*-un-lft-identity54.1%
times-frac54.6%
associate-/l/54.6%
Applied egg-rr54.6%
times-frac54.1%
*-commutative54.1%
times-frac54.6%
associate-*l/55.1%
associate-*l*52.3%
times-frac52.3%
/-rgt-identity52.3%
Simplified52.3%
Taylor expanded in t around 0 68.1%
times-frac68.3%
Simplified68.3%
if 1.3e-62 < t < 1.7e96Initial program 65.4%
associate-/r*65.4%
unpow265.4%
sqr-neg65.4%
distribute-frac-neg265.4%
distribute-frac-neg265.4%
unpow265.4%
+-commutative65.4%
+-commutative65.4%
associate-/l/65.4%
associate-*l/69.2%
associate-/r/68.8%
Simplified68.8%
associate-*r*76.6%
add-sqr-sqrt76.4%
times-frac80.5%
Applied egg-rr84.4%
associate-/l*84.3%
associate-*l*76.7%
Simplified76.7%
associate-*r/76.7%
frac-times76.7%
Applied egg-rr76.7%
associate-/l*76.7%
associate-/r*76.7%
times-frac76.8%
associate-/r*92.1%
Simplified92.1%
if 1.7e96 < t < 1.8000000000000001e216Initial program 44.4%
Simplified44.4%
add-cube-cbrt44.4%
pow344.4%
associate-/r*49.5%
*-commutative49.5%
cbrt-prod49.5%
associate-/r*44.4%
cbrt-div44.4%
rem-cbrt-cube74.8%
cbrt-prod91.3%
pow291.3%
Applied egg-rr91.3%
if 1.8000000000000001e216 < t Initial program 72.7%
associate-/r*72.7%
unpow272.7%
sqr-neg72.7%
distribute-frac-neg272.7%
distribute-frac-neg272.7%
unpow272.7%
+-commutative72.7%
+-commutative72.7%
associate-/l/72.7%
associate-*l/72.7%
associate-/r/72.7%
Simplified72.7%
associate-*r*82.3%
*-un-lft-identity82.3%
times-frac82.3%
associate-/l/82.3%
Applied egg-rr82.3%
times-frac82.3%
*-commutative82.3%
times-frac82.3%
associate-*l/82.3%
associate-*l*73.0%
times-frac72.7%
/-rgt-identity72.7%
Simplified72.7%
Taylor expanded in k around 0 73.0%
add-cube-cbrt73.0%
pow373.0%
associate-*l/63.6%
cbrt-div63.6%
cbrt-prod73.0%
unpow273.0%
*-commutative73.0%
cbrt-prod73.0%
unpow373.0%
add-cbrt-cube82.4%
unpow282.4%
cbrt-prod99.2%
pow299.2%
Applied egg-rr99.2%
Final simplification74.0%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(let* ((t_1 (pow (cbrt l) 2.0)))
(if (<= k_m 1.26e-15)
(pow (/ t_1 (* t (pow (cbrt k_m) 2.0))) 3.0)
(if (<= k_m 1.6e+154)
(*
l
(*
2.0
(/ (* l (cos k_m)) (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))))))
(/
2.0
(pow
(*
(/ t t_1)
(cbrt (* (sin k_m) (* (tan k_m) (+ 2.0 (pow (/ k_m t) 2.0))))))
3.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double t_1 = pow(cbrt(l), 2.0);
double tmp;
if (k_m <= 1.26e-15) {
tmp = pow((t_1 / (t * pow(cbrt(k_m), 2.0))), 3.0);
} else if (k_m <= 1.6e+154) {
tmp = l * (2.0 * ((l * cos(k_m)) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0)))));
} else {
tmp = 2.0 / pow(((t / t_1) * cbrt((sin(k_m) * (tan(k_m) * (2.0 + pow((k_m / t), 2.0)))))), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double t_1 = Math.pow(Math.cbrt(l), 2.0);
double tmp;
if (k_m <= 1.26e-15) {
tmp = Math.pow((t_1 / (t * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
} else if (k_m <= 1.6e+154) {
tmp = l * (2.0 * ((l * Math.cos(k_m)) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0)))));
} else {
tmp = 2.0 / Math.pow(((t / t_1) * Math.cbrt((Math.sin(k_m) * (Math.tan(k_m) * (2.0 + Math.pow((k_m / t), 2.0)))))), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) t_1 = cbrt(l) ^ 2.0 tmp = 0.0 if (k_m <= 1.26e-15) tmp = Float64(t_1 / Float64(t * (cbrt(k_m) ^ 2.0))) ^ 3.0; elseif (k_m <= 1.6e+154) tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k_m)) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0)))))); else tmp = Float64(2.0 / (Float64(Float64(t / t_1) * cbrt(Float64(sin(k_m) * Float64(tan(k_m) * Float64(2.0 + (Float64(k_m / t) ^ 2.0)))))) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k$95$m, 1.26e-15], N[Power[N[(t$95$1 / N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], If[LessEqual[k$95$m, 1.6e+154], N[(l * N[(2.0 * N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t / t$95$1), $MachinePrecision] * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[(2.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2}\\
\mathbf{if}\;k\_m \leq 1.26 \cdot 10^{-15}:\\
\;\;\;\;{\left(\frac{t\_1}{t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}}\right)}^{3}\\
\mathbf{elif}\;k\_m \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t}{t\_1} \cdot \sqrt[3]{\sin k\_m \cdot \left(\tan k\_m \cdot \left(2 + {\left(\frac{k\_m}{t}\right)}^{2}\right)\right)}\right)}^{3}}\\
\end{array}
\end{array}
if k < 1.26e-15Initial program 57.1%
associate-/r*57.1%
unpow257.1%
sqr-neg57.1%
distribute-frac-neg257.1%
distribute-frac-neg257.1%
unpow257.1%
+-commutative57.1%
+-commutative57.1%
associate-/l/57.1%
associate-*l/58.0%
associate-/r/56.5%
Simplified56.5%
associate-*r*64.4%
*-un-lft-identity64.4%
times-frac65.0%
associate-/l/65.0%
Applied egg-rr65.0%
times-frac64.5%
*-commutative64.5%
times-frac65.0%
associate-*l/65.5%
associate-*l*60.1%
times-frac60.0%
/-rgt-identity60.0%
Simplified60.0%
Taylor expanded in k around 0 58.8%
add-cube-cbrt58.7%
pow358.7%
associate-*l/51.8%
cbrt-div51.8%
cbrt-prod58.7%
unpow258.7%
*-commutative58.7%
cbrt-prod59.2%
unpow359.2%
add-cbrt-cube71.2%
unpow271.2%
cbrt-prod82.6%
pow282.6%
Applied egg-rr82.6%
if 1.26e-15 < k < 1.6e154Initial program 39.0%
associate-/r*39.0%
unpow239.0%
sqr-neg39.0%
distribute-frac-neg239.0%
distribute-frac-neg239.0%
unpow239.0%
+-commutative39.0%
+-commutative39.0%
associate-/l/39.0%
associate-*l/39.1%
associate-/r/39.0%
Simplified39.0%
associate-*r*39.3%
*-un-lft-identity39.3%
times-frac41.8%
associate-/l/41.8%
Applied egg-rr41.8%
times-frac39.3%
*-commutative39.3%
times-frac41.8%
associate-*l/41.8%
associate-*l*41.9%
times-frac41.9%
/-rgt-identity41.9%
Simplified41.9%
Taylor expanded in t around 0 86.4%
if 1.6e154 < k Initial program 36.1%
Simplified36.1%
associate-*l*36.1%
associate-/r*41.3%
associate-+r+41.3%
metadata-eval41.3%
associate-*l*41.3%
add-cube-cbrt41.3%
pow341.3%
Applied egg-rr71.7%
Final simplification81.3%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.25e-15)
(pow (/ (pow (cbrt l) 2.0) (* t (pow (cbrt k_m) 2.0))) 3.0)
(*
l
(* 2.0 (/ (* l (cos k_m)) (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.25e-15) {
tmp = pow((pow(cbrt(l), 2.0) / (t * pow(cbrt(k_m), 2.0))), 3.0);
} else {
tmp = l * (2.0 * ((l * cos(k_m)) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0)))));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.25e-15) {
tmp = Math.pow((Math.pow(Math.cbrt(l), 2.0) / (t * Math.pow(Math.cbrt(k_m), 2.0))), 3.0);
} else {
tmp = l * (2.0 * ((l * Math.cos(k_m)) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0)))));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.25e-15) tmp = Float64((cbrt(l) ^ 2.0) / Float64(t * (cbrt(k_m) ^ 2.0))) ^ 3.0; else tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k_m)) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0)))))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.25e-15], N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(l * N[(2.0 * N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.25 \cdot 10^{-15}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\right)\\
\end{array}
\end{array}
if k < 1.25e-15Initial program 57.1%
associate-/r*57.1%
unpow257.1%
sqr-neg57.1%
distribute-frac-neg257.1%
distribute-frac-neg257.1%
unpow257.1%
+-commutative57.1%
+-commutative57.1%
associate-/l/57.1%
associate-*l/58.0%
associate-/r/56.5%
Simplified56.5%
associate-*r*64.4%
*-un-lft-identity64.4%
times-frac65.0%
associate-/l/65.0%
Applied egg-rr65.0%
times-frac64.5%
*-commutative64.5%
times-frac65.0%
associate-*l/65.5%
associate-*l*60.1%
times-frac60.0%
/-rgt-identity60.0%
Simplified60.0%
Taylor expanded in k around 0 58.8%
add-cube-cbrt58.7%
pow358.7%
associate-*l/51.8%
cbrt-div51.8%
cbrt-prod58.7%
unpow258.7%
*-commutative58.7%
cbrt-prod59.2%
unpow359.2%
add-cbrt-cube71.2%
unpow271.2%
cbrt-prod82.6%
pow282.6%
Applied egg-rr82.6%
if 1.25e-15 < k Initial program 37.5%
associate-/r*37.5%
unpow237.5%
sqr-neg37.5%
distribute-frac-neg237.5%
distribute-frac-neg237.5%
unpow237.5%
+-commutative37.5%
+-commutative37.5%
associate-/l/37.5%
associate-*l/37.5%
associate-/r/37.5%
Simplified37.5%
associate-*r*40.4%
*-un-lft-identity40.4%
times-frac41.6%
associate-/l/41.6%
Applied egg-rr41.6%
times-frac40.4%
*-commutative40.4%
times-frac41.6%
associate-*l/41.6%
associate-*l*41.6%
times-frac41.6%
/-rgt-identity41.6%
Simplified41.6%
Taylor expanded in t around 0 72.7%
Final simplification79.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.16e-15)
(/ 2.0 (* (pow (* (cbrt k_m) (/ t (pow (cbrt l) 2.0))) 3.0) (* 2.0 k_m)))
(*
l
(* 2.0 (/ (* l (cos k_m)) (* (pow k_m 2.0) (* t (pow (sin k_m) 2.0))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.16e-15) {
tmp = 2.0 / (pow((cbrt(k_m) * (t / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else {
tmp = l * (2.0 * ((l * cos(k_m)) / (pow(k_m, 2.0) * (t * pow(sin(k_m), 2.0)))));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.16e-15) {
tmp = 2.0 / (Math.pow((Math.cbrt(k_m) * (t / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else {
tmp = l * (2.0 * ((l * Math.cos(k_m)) / (Math.pow(k_m, 2.0) * (t * Math.pow(Math.sin(k_m), 2.0)))));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.16e-15) tmp = Float64(2.0 / Float64((Float64(cbrt(k_m) * Float64(t / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k_m))); else tmp = Float64(l * Float64(2.0 * Float64(Float64(l * cos(k_m)) / Float64((k_m ^ 2.0) * Float64(t * (sin(k_m) ^ 2.0)))))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.16e-15], N[(2.0 / N[(N[Power[N[(N[Power[k$95$m, 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 * N[(N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.16 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{k\_m} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\ell \cdot \cos k\_m}{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}\right)\\
\end{array}
\end{array}
if k < 1.1599999999999999e-15Initial program 57.1%
Simplified57.1%
add-cube-cbrt57.1%
pow357.1%
associate-/r*62.8%
*-commutative62.8%
cbrt-prod62.7%
associate-/r*57.1%
cbrt-div57.9%
rem-cbrt-cube69.2%
cbrt-prod81.5%
pow281.5%
Applied egg-rr81.5%
Taylor expanded in k around 0 75.9%
Taylor expanded in k around 0 77.2%
if 1.1599999999999999e-15 < k Initial program 37.5%
associate-/r*37.5%
unpow237.5%
sqr-neg37.5%
distribute-frac-neg237.5%
distribute-frac-neg237.5%
unpow237.5%
+-commutative37.5%
+-commutative37.5%
associate-/l/37.5%
associate-*l/37.5%
associate-/r/37.5%
Simplified37.5%
associate-*r*40.4%
*-un-lft-identity40.4%
times-frac41.6%
associate-/l/41.6%
Applied egg-rr41.6%
times-frac40.4%
*-commutative40.4%
times-frac41.6%
associate-*l/41.6%
associate-*l*41.6%
times-frac41.6%
/-rgt-identity41.6%
Simplified41.6%
Taylor expanded in t around 0 72.7%
Final simplification75.8%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.08e-15)
(/ 2.0 (* (pow (* (cbrt k_m) (/ t (pow (cbrt l) 2.0))) 3.0) (* 2.0 k_m)))
(*
l
(* 2.0 (* (/ l (pow k_m 2.0)) (/ (cos k_m) (* t (pow (sin k_m) 2.0))))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.08e-15) {
tmp = 2.0 / (pow((cbrt(k_m) * (t / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else {
tmp = l * (2.0 * ((l / pow(k_m, 2.0)) * (cos(k_m) / (t * pow(sin(k_m), 2.0)))));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.08e-15) {
tmp = 2.0 / (Math.pow((Math.cbrt(k_m) * (t / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else {
tmp = l * (2.0 * ((l / Math.pow(k_m, 2.0)) * (Math.cos(k_m) / (t * Math.pow(Math.sin(k_m), 2.0)))));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.08e-15) tmp = Float64(2.0 / Float64((Float64(cbrt(k_m) * Float64(t / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k_m))); else tmp = Float64(l * Float64(2.0 * Float64(Float64(l / (k_m ^ 2.0)) * Float64(cos(k_m) / Float64(t * (sin(k_m) ^ 2.0)))))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.08e-15], N[(2.0 / N[(N[Power[N[(N[Power[k$95$m, 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 * N[(N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k$95$m], $MachinePrecision] / N[(t * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.08 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{k\_m} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{{k\_m}^{2}} \cdot \frac{\cos k\_m}{t \cdot {\sin k\_m}^{2}}\right)\right)\\
\end{array}
\end{array}
if k < 1.08e-15Initial program 57.1%
Simplified57.1%
add-cube-cbrt57.1%
pow357.1%
associate-/r*62.8%
*-commutative62.8%
cbrt-prod62.7%
associate-/r*57.1%
cbrt-div57.9%
rem-cbrt-cube69.2%
cbrt-prod81.5%
pow281.5%
Applied egg-rr81.5%
Taylor expanded in k around 0 75.9%
Taylor expanded in k around 0 77.2%
if 1.08e-15 < k Initial program 37.5%
associate-/r*37.5%
unpow237.5%
sqr-neg37.5%
distribute-frac-neg237.5%
distribute-frac-neg237.5%
unpow237.5%
+-commutative37.5%
+-commutative37.5%
associate-/l/37.5%
associate-*l/37.5%
associate-/r/37.5%
Simplified37.5%
associate-*r*40.4%
*-un-lft-identity40.4%
times-frac41.6%
associate-/l/41.6%
Applied egg-rr41.6%
times-frac40.4%
*-commutative40.4%
times-frac41.6%
associate-*l/41.6%
associate-*l*41.6%
times-frac41.6%
/-rgt-identity41.6%
Simplified41.6%
Taylor expanded in t around 0 72.7%
times-frac72.0%
Simplified72.0%
Final simplification75.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 0.32)
(/ 2.0 (* (pow (* (cbrt k_m) (/ t (pow (cbrt l) 2.0))) 3.0) (* 2.0 k_m)))
(if (<= k_m 1.08e+105)
(/ 2.0 (* (* (sin k_m) (/ (pow t 3.0) (* l l))) (* 2.0 (tan k_m))))
(* l (pow (/ (cbrt (/ l (pow k_m 2.0))) t) 3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.32) {
tmp = 2.0 / (pow((cbrt(k_m) * (t / pow(cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else if (k_m <= 1.08e+105) {
tmp = 2.0 / ((sin(k_m) * (pow(t, 3.0) / (l * l))) * (2.0 * tan(k_m)));
} else {
tmp = l * pow((cbrt((l / pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.32) {
tmp = 2.0 / (Math.pow((Math.cbrt(k_m) * (t / Math.pow(Math.cbrt(l), 2.0))), 3.0) * (2.0 * k_m));
} else if (k_m <= 1.08e+105) {
tmp = 2.0 / ((Math.sin(k_m) * (Math.pow(t, 3.0) / (l * l))) * (2.0 * Math.tan(k_m)));
} else {
tmp = l * Math.pow((Math.cbrt((l / Math.pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 0.32) tmp = Float64(2.0 / Float64((Float64(cbrt(k_m) * Float64(t / (cbrt(l) ^ 2.0))) ^ 3.0) * Float64(2.0 * k_m))); elseif (k_m <= 1.08e+105) tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64((t ^ 3.0) / Float64(l * l))) * Float64(2.0 * tan(k_m)))); else tmp = Float64(l * (Float64(cbrt(Float64(l / (k_m ^ 2.0))) / t) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 0.32], N[(2.0 / N[(N[Power[N[(N[Power[k$95$m, 1/3], $MachinePrecision] * N[(t / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.08e+105], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[Power[N[(N[Power[N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 0.32:\\
\;\;\;\;\frac{2}{{\left(\sqrt[3]{k\_m} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\_m\right)}\\
\mathbf{elif}\;k\_m \leq 1.08 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right) \cdot \left(2 \cdot \tan k\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot {\left(\frac{\sqrt[3]{\frac{\ell}{{k\_m}^{2}}}}{t}\right)}^{3}\\
\end{array}
\end{array}
if k < 0.320000000000000007Initial program 56.5%
Simplified56.5%
add-cube-cbrt56.4%
pow356.4%
associate-/r*62.1%
*-commutative62.1%
cbrt-prod62.0%
associate-/r*56.4%
cbrt-div57.3%
rem-cbrt-cube68.5%
cbrt-prod80.6%
pow280.6%
Applied egg-rr80.6%
Taylor expanded in k around 0 75.6%
Taylor expanded in k around 0 76.9%
if 0.320000000000000007 < k < 1.07999999999999994e105Initial program 35.0%
Simplified35.0%
Taylor expanded in k around 0 49.2%
if 1.07999999999999994e105 < k Initial program 40.0%
associate-/r*40.0%
unpow240.0%
sqr-neg40.0%
distribute-frac-neg240.0%
distribute-frac-neg240.0%
unpow240.0%
+-commutative40.0%
+-commutative40.0%
associate-/l/40.0%
associate-*l/40.0%
associate-/r/40.0%
Simplified40.0%
associate-*r*44.1%
*-un-lft-identity44.1%
times-frac44.3%
associate-/l/44.3%
Applied egg-rr44.3%
times-frac44.1%
*-commutative44.1%
times-frac44.3%
associate-*l/44.2%
associate-*l*44.2%
times-frac44.2%
/-rgt-identity44.2%
Simplified44.2%
Taylor expanded in k around 0 46.3%
add-cube-cbrt46.3%
pow346.3%
associate-/r*46.2%
cbrt-div46.2%
unpow346.2%
add-cbrt-cube63.5%
Applied egg-rr63.5%
Final simplification71.6%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 0.42)
(* l (/ l (pow (* t (pow (cbrt k_m) 2.0)) 3.0)))
(if (<= k_m 1.8e+105)
(/ 2.0 (* (* (sin k_m) (/ (pow t 3.0) (* l l))) (* 2.0 (tan k_m))))
(* l (pow (/ (cbrt (/ l (pow k_m 2.0))) t) 3.0)))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.42) {
tmp = l * (l / pow((t * pow(cbrt(k_m), 2.0)), 3.0));
} else if (k_m <= 1.8e+105) {
tmp = 2.0 / ((sin(k_m) * (pow(t, 3.0) / (l * l))) * (2.0 * tan(k_m)));
} else {
tmp = l * pow((cbrt((l / pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 0.42) {
tmp = l * (l / Math.pow((t * Math.pow(Math.cbrt(k_m), 2.0)), 3.0));
} else if (k_m <= 1.8e+105) {
tmp = 2.0 / ((Math.sin(k_m) * (Math.pow(t, 3.0) / (l * l))) * (2.0 * Math.tan(k_m)));
} else {
tmp = l * Math.pow((Math.cbrt((l / Math.pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 0.42) tmp = Float64(l * Float64(l / (Float64(t * (cbrt(k_m) ^ 2.0)) ^ 3.0))); elseif (k_m <= 1.8e+105) tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64((t ^ 3.0) / Float64(l * l))) * Float64(2.0 * tan(k_m)))); else tmp = Float64(l * (Float64(cbrt(Float64(l / (k_m ^ 2.0))) / t) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 0.42], N[(l * N[(l / N[Power[N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.8e+105], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[Power[N[(N[Power[N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 0.42:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}\right)}^{3}}\\
\mathbf{elif}\;k\_m \leq 1.8 \cdot 10^{+105}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right) \cdot \left(2 \cdot \tan k\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot {\left(\frac{\sqrt[3]{\frac{\ell}{{k\_m}^{2}}}}{t}\right)}^{3}\\
\end{array}
\end{array}
if k < 0.419999999999999984Initial program 56.2%
associate-/r*56.2%
unpow256.2%
sqr-neg56.2%
distribute-frac-neg256.2%
distribute-frac-neg256.2%
unpow256.2%
+-commutative56.2%
+-commutative56.2%
associate-/l/56.2%
associate-*l/57.1%
associate-/r/55.7%
Simplified55.7%
associate-*r*63.4%
*-un-lft-identity63.4%
times-frac64.5%
associate-/l/64.5%
Applied egg-rr64.5%
times-frac63.4%
*-commutative63.4%
times-frac64.5%
associate-*l/65.0%
associate-*l*59.7%
times-frac59.6%
/-rgt-identity59.6%
Simplified59.6%
Taylor expanded in k around 0 58.4%
add-cube-cbrt58.4%
pow358.4%
*-commutative58.4%
cbrt-prod58.3%
unpow358.3%
add-cbrt-cube67.4%
unpow267.4%
cbrt-prod75.2%
pow275.2%
Applied egg-rr75.2%
if 0.419999999999999984 < k < 1.7999999999999999e105Initial program 36.2%
Simplified36.2%
Taylor expanded in k around 0 51.1%
if 1.7999999999999999e105 < k Initial program 40.0%
associate-/r*40.0%
unpow240.0%
sqr-neg40.0%
distribute-frac-neg240.0%
distribute-frac-neg240.0%
unpow240.0%
+-commutative40.0%
+-commutative40.0%
associate-/l/40.0%
associate-*l/40.0%
associate-/r/40.0%
Simplified40.0%
associate-*r*44.1%
*-un-lft-identity44.1%
times-frac44.3%
associate-/l/44.3%
Applied egg-rr44.3%
times-frac44.1%
*-commutative44.1%
times-frac44.3%
associate-*l/44.2%
associate-*l*44.2%
times-frac44.2%
/-rgt-identity44.2%
Simplified44.2%
Taylor expanded in k around 0 46.3%
add-cube-cbrt46.3%
pow346.3%
associate-/r*46.2%
cbrt-div46.2%
unpow346.2%
add-cbrt-cube63.5%
Applied egg-rr63.5%
Final simplification70.7%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= k_m 1.5e-123) (* l (/ l (pow (* t (pow (cbrt k_m) 2.0)) 3.0))) (* l (pow (/ (cbrt (/ l (pow k_m 2.0))) t) 3.0))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.5e-123) {
tmp = l * (l / pow((t * pow(cbrt(k_m), 2.0)), 3.0));
} else {
tmp = l * pow((cbrt((l / pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.5e-123) {
tmp = l * (l / Math.pow((t * Math.pow(Math.cbrt(k_m), 2.0)), 3.0));
} else {
tmp = l * Math.pow((Math.cbrt((l / Math.pow(k_m, 2.0))) / t), 3.0);
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.5e-123) tmp = Float64(l * Float64(l / (Float64(t * (cbrt(k_m) ^ 2.0)) ^ 3.0))); else tmp = Float64(l * (Float64(cbrt(Float64(l / (k_m ^ 2.0))) / t) ^ 3.0)); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.5e-123], N[(l * N[(l / N[Power[N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[Power[N[(N[Power[N[(l / N[Power[k$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / t), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.5 \cdot 10^{-123}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot {\left(\frac{\sqrt[3]{\frac{\ell}{{k\_m}^{2}}}}{t}\right)}^{3}\\
\end{array}
\end{array}
if k < 1.49999999999999992e-123Initial program 55.8%
associate-/r*55.8%
unpow255.8%
sqr-neg55.8%
distribute-frac-neg255.8%
distribute-frac-neg255.8%
unpow255.8%
+-commutative55.8%
+-commutative55.8%
associate-/l/55.8%
associate-*l/56.8%
associate-/r/55.8%
Simplified55.8%
associate-*r*64.4%
*-un-lft-identity64.4%
times-frac65.0%
associate-/l/65.0%
Applied egg-rr65.0%
times-frac64.4%
*-commutative64.4%
times-frac65.0%
associate-*l/65.1%
associate-*l*59.2%
times-frac59.0%
/-rgt-identity59.0%
Simplified59.0%
Taylor expanded in k around 0 56.5%
add-cube-cbrt56.5%
pow356.5%
*-commutative56.5%
cbrt-prod56.4%
unpow356.4%
add-cbrt-cube65.9%
unpow265.9%
cbrt-prod74.5%
pow274.5%
Applied egg-rr74.5%
if 1.49999999999999992e-123 < k Initial program 42.7%
associate-/r*42.7%
unpow242.7%
sqr-neg42.7%
distribute-frac-neg242.7%
distribute-frac-neg242.7%
unpow242.7%
+-commutative42.7%
+-commutative42.7%
associate-/l/42.7%
associate-*l/42.7%
associate-/r/41.7%
Simplified41.7%
associate-*r*44.2%
*-un-lft-identity44.2%
times-frac45.2%
associate-/l/45.2%
Applied egg-rr45.2%
times-frac44.2%
*-commutative44.2%
times-frac45.2%
associate-*l/46.1%
associate-*l*46.1%
times-frac46.3%
/-rgt-identity46.3%
Simplified46.3%
Taylor expanded in k around 0 45.7%
add-cube-cbrt45.7%
pow345.7%
associate-/r*45.8%
cbrt-div45.8%
unpow345.8%
add-cbrt-cube57.8%
Applied egg-rr57.8%
Final simplification68.5%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= t 2.2e-88) (/ 2.0 (* (pow k_m 4.0) (/ t (pow l 2.0)))) (* l (/ l (pow (* t (pow (cbrt k_m) 2.0)) 3.0)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 2.2e-88) {
tmp = 2.0 / (pow(k_m, 4.0) * (t / pow(l, 2.0)));
} else {
tmp = l * (l / pow((t * pow(cbrt(k_m), 2.0)), 3.0));
}
return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 2.2e-88) {
tmp = 2.0 / (Math.pow(k_m, 4.0) * (t / Math.pow(l, 2.0)));
} else {
tmp = l * (l / Math.pow((t * Math.pow(Math.cbrt(k_m), 2.0)), 3.0));
}
return tmp;
}
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 2.2e-88) tmp = Float64(2.0 / Float64((k_m ^ 4.0) * Float64(t / (l ^ 2.0)))); else tmp = Float64(l * Float64(l / (Float64(t * (cbrt(k_m) ^ 2.0)) ^ 3.0))); end return tmp end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 2.2e-88], N[(2.0 / N[(N[Power[k$95$m, 4.0], $MachinePrecision] * N[(t / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[Power[N[(t * N[Power[N[Power[k$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.2 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{{k\_m}^{4} \cdot \frac{t}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{\left(t \cdot {\left(\sqrt[3]{k\_m}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
if t < 2.20000000000000005e-88Initial program 47.8%
Simplified47.8%
Taylor expanded in k around inf 23.1%
unpow223.1%
unpow223.1%
times-frac37.2%
unpow237.2%
Simplified37.2%
Taylor expanded in k around 0 50.1%
associate-/l*50.5%
Simplified50.5%
if 2.20000000000000005e-88 < t Initial program 60.8%
associate-/r*60.9%
unpow260.9%
sqr-neg60.9%
distribute-frac-neg260.9%
distribute-frac-neg260.9%
unpow260.9%
+-commutative60.9%
+-commutative60.9%
associate-/l/60.9%
associate-*l/62.3%
associate-/r/62.2%
Simplified62.2%
associate-*r*68.6%
*-un-lft-identity68.6%
times-frac70.1%
associate-/l/70.2%
Applied egg-rr70.2%
times-frac68.7%
*-commutative68.7%
times-frac70.2%
associate-*l/70.2%
associate-*l*63.8%
times-frac63.7%
/-rgt-identity63.7%
Simplified63.7%
Taylor expanded in k around 0 56.6%
add-cube-cbrt56.5%
pow356.6%
*-commutative56.6%
cbrt-prod56.5%
unpow356.5%
add-cbrt-cube66.3%
unpow266.3%
cbrt-prod77.6%
pow277.6%
Applied egg-rr77.6%
Final simplification57.4%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.7e-162)
(/ 2.0 (* (* 2.0 k_m) (/ (* k_m (pow t 3.0)) (pow l 2.0))))
(if (<= k_m 9.8e-16)
(* l (/ 1.0 (* (pow k_m 2.0) (/ (pow t 3.0) l))))
(/ 2.0 (/ (* t (pow k_m 4.0)) (pow l 2.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.7e-162) {
tmp = 2.0 / ((2.0 * k_m) * ((k_m * pow(t, 3.0)) / pow(l, 2.0)));
} else if (k_m <= 9.8e-16) {
tmp = l * (1.0 / (pow(k_m, 2.0) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * pow(k_m, 4.0)) / pow(l, 2.0));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 1.7d-162) then
tmp = 2.0d0 / ((2.0d0 * k_m) * ((k_m * (t ** 3.0d0)) / (l ** 2.0d0)))
else if (k_m <= 9.8d-16) then
tmp = l * (1.0d0 / ((k_m ** 2.0d0) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 / ((t * (k_m ** 4.0d0)) / (l ** 2.0d0))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.7e-162) {
tmp = 2.0 / ((2.0 * k_m) * ((k_m * Math.pow(t, 3.0)) / Math.pow(l, 2.0)));
} else if (k_m <= 9.8e-16) {
tmp = l * (1.0 / (Math.pow(k_m, 2.0) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * Math.pow(k_m, 4.0)) / Math.pow(l, 2.0));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 1.7e-162: tmp = 2.0 / ((2.0 * k_m) * ((k_m * math.pow(t, 3.0)) / math.pow(l, 2.0))) elif k_m <= 9.8e-16: tmp = l * (1.0 / (math.pow(k_m, 2.0) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 / ((t * math.pow(k_m, 4.0)) / math.pow(l, 2.0)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.7e-162) tmp = Float64(2.0 / Float64(Float64(2.0 * k_m) * Float64(Float64(k_m * (t ^ 3.0)) / (l ^ 2.0)))); elseif (k_m <= 9.8e-16) tmp = Float64(l * Float64(1.0 / Float64((k_m ^ 2.0) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 / Float64(Float64(t * (k_m ^ 4.0)) / (l ^ 2.0))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 1.7e-162) tmp = 2.0 / ((2.0 * k_m) * ((k_m * (t ^ 3.0)) / (l ^ 2.0))); elseif (k_m <= 9.8e-16) tmp = l * (1.0 / ((k_m ^ 2.0) * ((t ^ 3.0) / l))); else tmp = 2.0 / ((t * (k_m ^ 4.0)) / (l ^ 2.0)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.7e-162], N[(2.0 / N[(N[(2.0 * k$95$m), $MachinePrecision] * N[(N[(k$95$m * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 9.8e-16], N[(l * N[(1.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.7 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\_m\right) \cdot \frac{k\_m \cdot {t}^{3}}{{\ell}^{2}}}\\
\mathbf{elif}\;k\_m \leq 9.8 \cdot 10^{-16}:\\
\;\;\;\;\ell \cdot \frac{1}{{k\_m}^{2} \cdot \frac{{t}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t \cdot {k\_m}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.7e-162Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.2%
pow354.2%
associate-/r*61.2%
*-commutative61.2%
cbrt-prod61.1%
associate-/r*54.2%
cbrt-div55.3%
rem-cbrt-cube66.9%
cbrt-prod80.5%
pow280.5%
Applied egg-rr80.5%
Taylor expanded in k around 0 73.1%
Taylor expanded in k around 0 53.7%
if 1.7e-162 < k < 9.7999999999999995e-16Initial program 71.1%
associate-/r*71.1%
unpow271.1%
sqr-neg71.1%
distribute-frac-neg271.1%
distribute-frac-neg271.1%
unpow271.1%
+-commutative71.1%
+-commutative71.1%
associate-/l/71.1%
associate-*l/71.0%
associate-/r/68.0%
Simplified68.0%
associate-*r*77.4%
*-un-lft-identity77.4%
times-frac77.4%
associate-/l/77.4%
Applied egg-rr77.4%
times-frac77.4%
*-commutative77.4%
times-frac77.4%
associate-*l/80.2%
associate-*l*80.1%
times-frac80.4%
/-rgt-identity80.4%
Simplified80.4%
Taylor expanded in k around 0 86.8%
clear-num86.8%
inv-pow86.8%
Applied egg-rr86.8%
unpow-186.8%
associate-/l*87.2%
Simplified87.2%
if 9.7999999999999995e-16 < k Initial program 37.5%
Simplified37.5%
Taylor expanded in k around inf 22.3%
unpow222.3%
unpow222.3%
times-frac33.8%
unpow233.8%
Simplified33.8%
Taylor expanded in k around 0 47.6%
Final simplification55.8%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 3.2e-162)
(/ 2.0 (* (* 2.0 k_m) (* (* k_m (pow t 3.0)) (pow l -2.0))))
(if (<= k_m 1.08e-15)
(* l (/ 1.0 (* (pow k_m 2.0) (/ (pow t 3.0) l))))
(/ 2.0 (/ (* t (pow k_m 4.0)) (pow l 2.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 3.2e-162) {
tmp = 2.0 / ((2.0 * k_m) * ((k_m * pow(t, 3.0)) * pow(l, -2.0)));
} else if (k_m <= 1.08e-15) {
tmp = l * (1.0 / (pow(k_m, 2.0) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * pow(k_m, 4.0)) / pow(l, 2.0));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 3.2d-162) then
tmp = 2.0d0 / ((2.0d0 * k_m) * ((k_m * (t ** 3.0d0)) * (l ** (-2.0d0))))
else if (k_m <= 1.08d-15) then
tmp = l * (1.0d0 / ((k_m ** 2.0d0) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 / ((t * (k_m ** 4.0d0)) / (l ** 2.0d0))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 3.2e-162) {
tmp = 2.0 / ((2.0 * k_m) * ((k_m * Math.pow(t, 3.0)) * Math.pow(l, -2.0)));
} else if (k_m <= 1.08e-15) {
tmp = l * (1.0 / (Math.pow(k_m, 2.0) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * Math.pow(k_m, 4.0)) / Math.pow(l, 2.0));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 3.2e-162: tmp = 2.0 / ((2.0 * k_m) * ((k_m * math.pow(t, 3.0)) * math.pow(l, -2.0))) elif k_m <= 1.08e-15: tmp = l * (1.0 / (math.pow(k_m, 2.0) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 / ((t * math.pow(k_m, 4.0)) / math.pow(l, 2.0)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 3.2e-162) tmp = Float64(2.0 / Float64(Float64(2.0 * k_m) * Float64(Float64(k_m * (t ^ 3.0)) * (l ^ -2.0)))); elseif (k_m <= 1.08e-15) tmp = Float64(l * Float64(1.0 / Float64((k_m ^ 2.0) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 / Float64(Float64(t * (k_m ^ 4.0)) / (l ^ 2.0))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 3.2e-162) tmp = 2.0 / ((2.0 * k_m) * ((k_m * (t ^ 3.0)) * (l ^ -2.0))); elseif (k_m <= 1.08e-15) tmp = l * (1.0 / ((k_m ^ 2.0) * ((t ^ 3.0) / l))); else tmp = 2.0 / ((t * (k_m ^ 4.0)) / (l ^ 2.0)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 3.2e-162], N[(2.0 / N[(N[(2.0 * k$95$m), $MachinePrecision] * N[(N[(k$95$m * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.08e-15], N[(l * N[(1.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 3.2 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\_m\right) \cdot \left(\left(k\_m \cdot {t}^{3}\right) \cdot {\ell}^{-2}\right)}\\
\mathbf{elif}\;k\_m \leq 1.08 \cdot 10^{-15}:\\
\;\;\;\;\ell \cdot \frac{1}{{k\_m}^{2} \cdot \frac{{t}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t \cdot {k\_m}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 3.19999999999999975e-162Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.2%
pow354.2%
associate-/r*61.2%
*-commutative61.2%
cbrt-prod61.1%
associate-/r*54.2%
cbrt-div55.3%
rem-cbrt-cube66.9%
cbrt-prod80.5%
pow280.5%
Applied egg-rr80.5%
Taylor expanded in k around 0 73.1%
Taylor expanded in k around 0 65.0%
div-inv65.0%
*-commutative65.0%
unpow-prod-down53.5%
pow1/326.1%
pow226.1%
pow-pow53.6%
metadata-eval53.6%
pow153.6%
div-inv53.0%
pow253.0%
pow-flip53.1%
metadata-eval53.1%
Applied egg-rr53.1%
associate-*r/53.1%
metadata-eval53.1%
associate-*r*53.2%
*-commutative53.2%
Simplified53.2%
if 3.19999999999999975e-162 < k < 1.08e-15Initial program 71.1%
associate-/r*71.1%
unpow271.1%
sqr-neg71.1%
distribute-frac-neg271.1%
distribute-frac-neg271.1%
unpow271.1%
+-commutative71.1%
+-commutative71.1%
associate-/l/71.1%
associate-*l/71.0%
associate-/r/68.0%
Simplified68.0%
associate-*r*77.4%
*-un-lft-identity77.4%
times-frac77.4%
associate-/l/77.4%
Applied egg-rr77.4%
times-frac77.4%
*-commutative77.4%
times-frac77.4%
associate-*l/80.2%
associate-*l*80.1%
times-frac80.4%
/-rgt-identity80.4%
Simplified80.4%
Taylor expanded in k around 0 86.8%
clear-num86.8%
inv-pow86.8%
Applied egg-rr86.8%
unpow-186.8%
associate-/l*87.2%
Simplified87.2%
if 1.08e-15 < k Initial program 37.5%
Simplified37.5%
Taylor expanded in k around inf 22.3%
unpow222.3%
unpow222.3%
times-frac33.8%
unpow233.8%
Simplified33.8%
Taylor expanded in k around 0 47.6%
Final simplification55.5%
k_m = (fabs.f64 k)
(FPCore (t l k_m)
:precision binary64
(if (<= k_m 1.3e-162)
(/ 2.0 (* (* 2.0 k_m) (* k_m (/ (pow t 3.0) (pow l 2.0)))))
(if (<= k_m 1.16e-15)
(* l (/ 1.0 (* (pow k_m 2.0) (/ (pow t 3.0) l))))
(/ 2.0 (/ (* t (pow k_m 4.0)) (pow l 2.0))))))k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.3e-162) {
tmp = 2.0 / ((2.0 * k_m) * (k_m * (pow(t, 3.0) / pow(l, 2.0))));
} else if (k_m <= 1.16e-15) {
tmp = l * (1.0 / (pow(k_m, 2.0) * (pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * pow(k_m, 4.0)) / pow(l, 2.0));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (k_m <= 1.3d-162) then
tmp = 2.0d0 / ((2.0d0 * k_m) * (k_m * ((t ** 3.0d0) / (l ** 2.0d0))))
else if (k_m <= 1.16d-15) then
tmp = l * (1.0d0 / ((k_m ** 2.0d0) * ((t ** 3.0d0) / l)))
else
tmp = 2.0d0 / ((t * (k_m ** 4.0d0)) / (l ** 2.0d0))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (k_m <= 1.3e-162) {
tmp = 2.0 / ((2.0 * k_m) * (k_m * (Math.pow(t, 3.0) / Math.pow(l, 2.0))));
} else if (k_m <= 1.16e-15) {
tmp = l * (1.0 / (Math.pow(k_m, 2.0) * (Math.pow(t, 3.0) / l)));
} else {
tmp = 2.0 / ((t * Math.pow(k_m, 4.0)) / Math.pow(l, 2.0));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if k_m <= 1.3e-162: tmp = 2.0 / ((2.0 * k_m) * (k_m * (math.pow(t, 3.0) / math.pow(l, 2.0)))) elif k_m <= 1.16e-15: tmp = l * (1.0 / (math.pow(k_m, 2.0) * (math.pow(t, 3.0) / l))) else: tmp = 2.0 / ((t * math.pow(k_m, 4.0)) / math.pow(l, 2.0)) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (k_m <= 1.3e-162) tmp = Float64(2.0 / Float64(Float64(2.0 * k_m) * Float64(k_m * Float64((t ^ 3.0) / (l ^ 2.0))))); elseif (k_m <= 1.16e-15) tmp = Float64(l * Float64(1.0 / Float64((k_m ^ 2.0) * Float64((t ^ 3.0) / l)))); else tmp = Float64(2.0 / Float64(Float64(t * (k_m ^ 4.0)) / (l ^ 2.0))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (k_m <= 1.3e-162) tmp = 2.0 / ((2.0 * k_m) * (k_m * ((t ^ 3.0) / (l ^ 2.0)))); elseif (k_m <= 1.16e-15) tmp = l * (1.0 / ((k_m ^ 2.0) * ((t ^ 3.0) / l))); else tmp = 2.0 / ((t * (k_m ^ 4.0)) / (l ^ 2.0)); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 1.3e-162], N[(2.0 / N[(N[(2.0 * k$95$m), $MachinePrecision] * N[(k$95$m * N[(N[Power[t, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.16e-15], N[(l * N[(1.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 1.3 \cdot 10^{-162}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\_m\right) \cdot \left(k\_m \cdot \frac{{t}^{3}}{{\ell}^{2}}\right)}\\
\mathbf{elif}\;k\_m \leq 1.16 \cdot 10^{-15}:\\
\;\;\;\;\ell \cdot \frac{1}{{k\_m}^{2} \cdot \frac{{t}^{3}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{t \cdot {k\_m}^{4}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if k < 1.3e-162Initial program 54.3%
Simplified54.3%
add-cube-cbrt54.2%
pow354.2%
associate-/r*61.2%
*-commutative61.2%
cbrt-prod61.1%
associate-/r*54.2%
cbrt-div55.3%
rem-cbrt-cube66.9%
cbrt-prod80.5%
pow280.5%
Applied egg-rr80.5%
Taylor expanded in k around 0 73.1%
Taylor expanded in k around 0 53.7%
associate-/l*52.6%
Simplified52.6%
if 1.3e-162 < k < 1.1599999999999999e-15Initial program 71.1%
associate-/r*71.1%
unpow271.1%
sqr-neg71.1%
distribute-frac-neg271.1%
distribute-frac-neg271.1%
unpow271.1%
+-commutative71.1%
+-commutative71.1%
associate-/l/71.1%
associate-*l/71.0%
associate-/r/68.0%
Simplified68.0%
associate-*r*77.4%
*-un-lft-identity77.4%
times-frac77.4%
associate-/l/77.4%
Applied egg-rr77.4%
times-frac77.4%
*-commutative77.4%
times-frac77.4%
associate-*l/80.2%
associate-*l*80.1%
times-frac80.4%
/-rgt-identity80.4%
Simplified80.4%
Taylor expanded in k around 0 86.8%
clear-num86.8%
inv-pow86.8%
Applied egg-rr86.8%
unpow-186.8%
associate-/l*87.2%
Simplified87.2%
if 1.1599999999999999e-15 < k Initial program 37.5%
Simplified37.5%
Taylor expanded in k around inf 22.3%
unpow222.3%
unpow222.3%
times-frac33.8%
unpow233.8%
Simplified33.8%
Taylor expanded in k around 0 47.6%
Final simplification55.1%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= t 3.7e-88) (/ 2.0 (* (pow k_m 4.0) (/ t (pow l 2.0)))) (* l (/ 1.0 (* (pow k_m 2.0) (/ (pow t 3.0) l))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.7e-88) {
tmp = 2.0 / (pow(k_m, 4.0) * (t / pow(l, 2.0)));
} else {
tmp = l * (1.0 / (pow(k_m, 2.0) * (pow(t, 3.0) / l)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 3.7d-88) then
tmp = 2.0d0 / ((k_m ** 4.0d0) * (t / (l ** 2.0d0)))
else
tmp = l * (1.0d0 / ((k_m ** 2.0d0) * ((t ** 3.0d0) / l)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 3.7e-88) {
tmp = 2.0 / (Math.pow(k_m, 4.0) * (t / Math.pow(l, 2.0)));
} else {
tmp = l * (1.0 / (Math.pow(k_m, 2.0) * (Math.pow(t, 3.0) / l)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 3.7e-88: tmp = 2.0 / (math.pow(k_m, 4.0) * (t / math.pow(l, 2.0))) else: tmp = l * (1.0 / (math.pow(k_m, 2.0) * (math.pow(t, 3.0) / l))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 3.7e-88) tmp = Float64(2.0 / Float64((k_m ^ 4.0) * Float64(t / (l ^ 2.0)))); else tmp = Float64(l * Float64(1.0 / Float64((k_m ^ 2.0) * Float64((t ^ 3.0) / l)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 3.7e-88) tmp = 2.0 / ((k_m ^ 4.0) * (t / (l ^ 2.0))); else tmp = l * (1.0 / ((k_m ^ 2.0) * ((t ^ 3.0) / l))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 3.7e-88], N[(2.0 / N[(N[Power[k$95$m, 4.0], $MachinePrecision] * N[(t / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(1.0 / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(N[Power[t, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.7 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{{k\_m}^{4} \cdot \frac{t}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{1}{{k\_m}^{2} \cdot \frac{{t}^{3}}{\ell}}\\
\end{array}
\end{array}
if t < 3.6999999999999997e-88Initial program 47.8%
Simplified47.8%
Taylor expanded in k around inf 23.1%
unpow223.1%
unpow223.1%
times-frac37.2%
unpow237.2%
Simplified37.2%
Taylor expanded in k around 0 50.1%
associate-/l*50.5%
Simplified50.5%
if 3.6999999999999997e-88 < t Initial program 60.8%
associate-/r*60.9%
unpow260.9%
sqr-neg60.9%
distribute-frac-neg260.9%
distribute-frac-neg260.9%
unpow260.9%
+-commutative60.9%
+-commutative60.9%
associate-/l/60.9%
associate-*l/62.3%
associate-/r/62.2%
Simplified62.2%
associate-*r*68.6%
*-un-lft-identity68.6%
times-frac70.1%
associate-/l/70.2%
Applied egg-rr70.2%
times-frac68.7%
*-commutative68.7%
times-frac70.2%
associate-*l/70.2%
associate-*l*63.8%
times-frac63.7%
/-rgt-identity63.7%
Simplified63.7%
Taylor expanded in k around 0 56.6%
clear-num56.6%
inv-pow56.6%
Applied egg-rr56.6%
unpow-156.6%
associate-/l*55.1%
Simplified55.1%
Final simplification51.7%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (if (<= t 9.5e-88) (/ 2.0 (* (pow k_m 4.0) (/ t (pow l 2.0)))) (* l (/ l (* (pow t 3.0) (* k_m k_m))))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
double tmp;
if (t <= 9.5e-88) {
tmp = 2.0 / (pow(k_m, 4.0) * (t / pow(l, 2.0)));
} else {
tmp = l * (l / (pow(t, 3.0) * (k_m * k_m)));
}
return tmp;
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
real(8) :: tmp
if (t <= 9.5d-88) then
tmp = 2.0d0 / ((k_m ** 4.0d0) * (t / (l ** 2.0d0)))
else
tmp = l * (l / ((t ** 3.0d0) * (k_m * k_m)))
end if
code = tmp
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
double tmp;
if (t <= 9.5e-88) {
tmp = 2.0 / (Math.pow(k_m, 4.0) * (t / Math.pow(l, 2.0)));
} else {
tmp = l * (l / (Math.pow(t, 3.0) * (k_m * k_m)));
}
return tmp;
}
k_m = math.fabs(k) def code(t, l, k_m): tmp = 0 if t <= 9.5e-88: tmp = 2.0 / (math.pow(k_m, 4.0) * (t / math.pow(l, 2.0))) else: tmp = l * (l / (math.pow(t, 3.0) * (k_m * k_m))) return tmp
k_m = abs(k) function code(t, l, k_m) tmp = 0.0 if (t <= 9.5e-88) tmp = Float64(2.0 / Float64((k_m ^ 4.0) * Float64(t / (l ^ 2.0)))); else tmp = Float64(l * Float64(l / Float64((t ^ 3.0) * Float64(k_m * k_m)))); end return tmp end
k_m = abs(k); function tmp_2 = code(t, l, k_m) tmp = 0.0; if (t <= 9.5e-88) tmp = 2.0 / ((k_m ^ 4.0) * (t / (l ^ 2.0))); else tmp = l * (l / ((t ^ 3.0) * (k_m * k_m))); end tmp_2 = tmp; end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := If[LessEqual[t, 9.5e-88], N[(2.0 / N[(N[Power[k$95$m, 4.0], $MachinePrecision] * N[(t / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{2}{{k\_m}^{4} \cdot \frac{t}{{\ell}^{2}}}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k\_m \cdot k\_m\right)}\\
\end{array}
\end{array}
if t < 9.5e-88Initial program 47.8%
Simplified47.8%
Taylor expanded in k around inf 23.1%
unpow223.1%
unpow223.1%
times-frac37.2%
unpow237.2%
Simplified37.2%
Taylor expanded in k around 0 50.1%
associate-/l*50.5%
Simplified50.5%
if 9.5e-88 < t Initial program 60.8%
associate-/r*60.9%
unpow260.9%
sqr-neg60.9%
distribute-frac-neg260.9%
distribute-frac-neg260.9%
unpow260.9%
+-commutative60.9%
+-commutative60.9%
associate-/l/60.9%
associate-*l/62.3%
associate-/r/62.2%
Simplified62.2%
associate-*r*68.6%
*-un-lft-identity68.6%
times-frac70.1%
associate-/l/70.2%
Applied egg-rr70.2%
times-frac68.7%
*-commutative68.7%
times-frac70.2%
associate-*l/70.2%
associate-*l*63.8%
times-frac63.7%
/-rgt-identity63.7%
Simplified63.7%
Taylor expanded in k around 0 56.6%
unpow256.6%
Applied egg-rr56.6%
Final simplification52.1%
k_m = (fabs.f64 k) (FPCore (t l k_m) :precision binary64 (* l (/ l (* (pow t 3.0) (* k_m k_m)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
return l * (l / (pow(t, 3.0) * (k_m * k_m)));
}
k_m = abs(k)
real(8) function code(t, l, k_m)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k_m
code = l * (l / ((t ** 3.0d0) * (k_m * k_m)))
end function
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
return l * (l / (Math.pow(t, 3.0) * (k_m * k_m)));
}
k_m = math.fabs(k) def code(t, l, k_m): return l * (l / (math.pow(t, 3.0) * (k_m * k_m)))
k_m = abs(k) function code(t, l, k_m) return Float64(l * Float64(l / Float64((t ^ 3.0) * Float64(k_m * k_m)))) end
k_m = abs(k); function tmp = code(t, l, k_m) tmp = l * (l / ((t ^ 3.0) * (k_m * k_m))); end
k_m = N[Abs[k], $MachinePrecision] code[t_, l_, k$95$m_] := N[(l * N[(l / N[(N[Power[t, 3.0], $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
\ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k\_m \cdot k\_m\right)}
\end{array}
Initial program 51.1%
associate-/r*51.1%
unpow251.1%
sqr-neg51.1%
distribute-frac-neg251.1%
distribute-frac-neg251.1%
unpow251.1%
+-commutative51.1%
+-commutative51.1%
associate-/l/51.1%
associate-*l/51.8%
associate-/r/50.7%
Simplified50.7%
associate-*r*57.1%
*-un-lft-identity57.1%
times-frac57.9%
associate-/l/57.9%
Applied egg-rr57.9%
times-frac57.1%
*-commutative57.1%
times-frac57.9%
associate-*l/58.3%
associate-*l*54.5%
times-frac54.4%
/-rgt-identity54.4%
Simplified54.4%
Taylor expanded in k around 0 52.7%
unpow252.7%
Applied egg-rr52.7%
Final simplification52.7%
herbie shell --seed 2024151
(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))))