
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))) (t_3 (/ t_m (cbrt l))))
(*
t_s
(if (<= t_m 1.38e-70)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 3.3e+96)
(/ 2.0 (* (* (/ (/ (pow t_m 3.0) l) (/ l (sin k))) (tan k)) t_2))
(/
2.0
(*
(* (sin k) (* (pow t_3 2.0) (* t_3 (/ 1.0 l))))
(* (tan k) t_2))))))))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 = 1.0 + (1.0 + pow((k / t_m), 2.0));
double t_3 = t_m / cbrt(l);
double tmp;
if (t_m <= 1.38e-70) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 3.3e+96) {
tmp = 2.0 / ((((pow(t_m, 3.0) / l) / (l / sin(k))) * tan(k)) * t_2);
} else {
tmp = 2.0 / ((sin(k) * (pow(t_3, 2.0) * (t_3 * (1.0 / l)))) * (tan(k) * t_2));
}
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 = 1.0 + (1.0 + Math.pow((k / t_m), 2.0));
double t_3 = t_m / Math.cbrt(l);
double tmp;
if (t_m <= 1.38e-70) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 3.3e+96) {
tmp = 2.0 / ((((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))) * Math.tan(k)) * t_2);
} else {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_3, 2.0) * (t_3 * (1.0 / l)))) * (Math.tan(k) * t_2));
}
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(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) t_3 = Float64(t_m / cbrt(l)) tmp = 0.0 if (t_m <= 1.38e-70) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 3.3e+96) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))) * tan(k)) * t_2)); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_3 ^ 2.0) * Float64(t_3 * Float64(1.0 / l)))) * Float64(tan(k) * t_2))); 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[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.38e-70], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.3e+96], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$3, 2.0], $MachinePrecision] * N[(t$95$3 * N[(1.0 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$2), $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 := 1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_3 := \frac{t_m}{\sqrt[3]{\ell}}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.38 \cdot 10^{-70}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 3.3 \cdot 10^{+96}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left({t_3}^{2} \cdot \left(t_3 \cdot \frac{1}{\ell}\right)\right)\right) \cdot \left(\tan k \cdot t_2\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.3800000000000001e-70Initial program 49.2%
associate-/r*48.6%
sqr-neg48.6%
associate-*l*45.9%
sqr-neg45.9%
associate-/r*51.6%
associate-+l+51.6%
unpow251.6%
times-frac38.6%
sqr-neg38.6%
times-frac51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*r*68.9%
times-frac69.8%
Simplified69.8%
if 1.3800000000000001e-70 < t < 3.29999999999999984e96Initial program 67.2%
associate-/r*89.6%
associate-*l/92.9%
Applied egg-rr92.9%
associate-/l*92.9%
Simplified92.9%
if 3.29999999999999984e96 < t Initial program 65.1%
*-commutative65.1%
sqr-neg65.1%
*-commutative65.1%
associate-*l*65.1%
*-commutative65.1%
sqr-neg65.1%
Simplified65.1%
associate-/r*71.2%
div-inv71.2%
add-cube-cbrt71.2%
associate-*l*71.2%
pow271.2%
cbrt-div71.2%
rem-cbrt-cube71.2%
cbrt-div71.2%
rem-cbrt-cube93.5%
Applied egg-rr93.5%
Final simplification75.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(*
(+ 1.0 (+ 1.0 t_2))
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l)))))
5e+263)
(/ 2.0 (* (* (sin k) (/ (/ (pow t_m 3.0) l) l)) (* (tan k) (+ 2.0 t_2))))
(/
2.0
(pow
(*
(/ (pow t_m 1.5) l)
(* (sqrt 2.0) (+ k (* (pow k 3.0) -0.08333333333333333))))
2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow((k / t_m), 2.0);
double tmp;
if (((1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l))))) <= 5e+263) {
tmp = 2.0 / ((sin(k) * ((pow(t_m, 3.0) / l) / l)) * (tan(k) * (2.0 + t_2)));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(2.0) * (k + (pow(k, 3.0) * -0.08333333333333333)))), 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) :: t_2
real(8) :: tmp
t_2 = (k / t_m) ** 2.0d0
if (((1.0d0 + (1.0d0 + t_2)) * (tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l))))) <= 5d+263) then
tmp = 2.0d0 / ((sin(k) * (((t_m ** 3.0d0) / l) / l)) * (tan(k) * (2.0d0 + t_2)))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (sqrt(2.0d0) * (k + ((k ** 3.0d0) * (-0.08333333333333333d0))))) ** 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 t_2 = Math.pow((k / t_m), 2.0);
double tmp;
if (((1.0 + (1.0 + t_2)) * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))))) <= 5e+263) {
tmp = 2.0 / ((Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l)) * (Math.tan(k) * (2.0 + t_2)));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(2.0) * (k + (Math.pow(k, 3.0) * -0.08333333333333333)))), 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): t_2 = math.pow((k / t_m), 2.0) tmp = 0 if ((1.0 + (1.0 + t_2)) * (math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l))))) <= 5e+263: tmp = 2.0 / ((math.sin(k) * ((math.pow(t_m, 3.0) / l) / l)) * (math.tan(k) * (2.0 + t_2))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (math.sqrt(2.0) * (k + (math.pow(k, 3.0) * -0.08333333333333333)))), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(k / t_m) ^ 2.0 tmp = 0.0 if (Float64(Float64(1.0 + Float64(1.0 + t_2)) * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))) <= 5e+263) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l)) * Float64(tan(k) * Float64(2.0 + t_2)))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(2.0) * Float64(k + Float64((k ^ 3.0) * -0.08333333333333333)))) ^ 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) t_2 = (k / t_m) ^ 2.0; tmp = 0.0; if (((1.0 + (1.0 + t_2)) * (tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l))))) <= 5e+263) tmp = 2.0 / ((sin(k) * (((t_m ^ 3.0) / l) / l)) * (tan(k) * (2.0 + t_2))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (sqrt(2.0) * (k + ((k ^ 3.0) * -0.08333333333333333)))) ^ 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(N[(1.0 + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+263], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(k + N[(N[Power[k, 3.0], $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left(\frac{k}{t_m}\right)}^{2}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\left(1 + \left(1 + t_2\right)\right) \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right)\right) \leq 5 \cdot 10^{+263}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right) \cdot \left(\tan k \cdot \left(2 + t_2\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot \left(k + {k}^{3} \cdot -0.08333333333333333\right)\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < 5.00000000000000022e263Initial program 83.7%
associate-*l*83.7%
sqr-neg83.7%
sqr-neg83.7%
associate-/r*91.5%
distribute-rgt-in91.5%
unpow291.5%
times-frac74.1%
sqr-neg74.1%
times-frac91.5%
unpow291.5%
distribute-rgt-in91.5%
Simplified91.5%
if 5.00000000000000022e263 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) Initial program 26.2%
*-commutative26.2%
sqr-neg26.2%
*-commutative26.2%
associate-*l*26.2%
*-commutative26.2%
sqr-neg26.2%
Simplified26.2%
Taylor expanded in k around 0 32.0%
add-sqr-sqrt24.6%
pow224.6%
Applied egg-rr16.7%
*-commutative16.7%
Simplified16.7%
Taylor expanded in k around 0 28.6%
+-commutative28.6%
associate-*r*28.6%
distribute-rgt-out28.6%
*-commutative28.6%
Simplified28.6%
Final simplification58.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(*
t_s
(if (<= t_m 1.08e-70)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 5e+86)
(/ 2.0 (* (* (/ (/ (pow t_m 3.0) l) (/ l (sin k))) (tan k)) t_2))
(/
2.0
(* t_2 (* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) l) 2.0))))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 + (1.0 + pow((k / t_m), 2.0));
double tmp;
if (t_m <= 1.08e-70) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 5e+86) {
tmp = 2.0 / ((((pow(t_m, 3.0) / l) / (l / sin(k))) * tan(k)) * t_2);
} else {
tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * pow((pow(t_m, 1.5) / l), 2.0))));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))
if (t_m <= 1.08d-70) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else if (t_m <= 5d+86) then
tmp = 2.0d0 / (((((t_m ** 3.0d0) / l) / (l / sin(k))) * tan(k)) * t_2)
else
tmp = 2.0d0 / (t_2 * (tan(k) * (sin(k) * (((t_m ** 1.5d0) / l) ** 2.0d0))))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = 1.0 + (1.0 + Math.pow((k / t_m), 2.0));
double tmp;
if (t_m <= 1.08e-70) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 5e+86) {
tmp = 2.0 / ((((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))) * Math.tan(k)) * t_2);
} else {
tmp = 2.0 / (t_2 * (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 2.0))));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = 1.0 + (1.0 + math.pow((k / t_m), 2.0)) tmp = 0 if t_m <= 1.08e-70: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) elif t_m <= 5e+86: tmp = 2.0 / ((((math.pow(t_m, 3.0) / l) / (l / math.sin(k))) * math.tan(k)) * t_2) else: tmp = 2.0 / (t_2 * (math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.0)))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))) tmp = 0.0 if (t_m <= 1.08e-70) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 5e+86) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))) * tan(k)) * t_2)); else tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 2.0))))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = 1.0 + (1.0 + ((k / t_m) ^ 2.0)); tmp = 0.0; if (t_m <= 1.08e-70) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); elseif (t_m <= 5e+86) tmp = 2.0 / (((((t_m ^ 3.0) / l) / (l / sin(k))) * tan(k)) * t_2); else tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * (((t_m ^ 1.5) / l) ^ 2.0)))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.08e-70], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5e+86], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.08 \cdot 10^{-70}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 5 \cdot 10^{+86}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot t_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{t_2 \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t_m}^{1.5}}{\ell}\right)}^{2}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.0800000000000001e-70Initial program 49.2%
associate-/r*48.6%
sqr-neg48.6%
associate-*l*45.9%
sqr-neg45.9%
associate-/r*51.6%
associate-+l+51.6%
unpow251.6%
times-frac38.6%
sqr-neg38.6%
times-frac51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*r*68.9%
times-frac69.8%
Simplified69.8%
if 1.0800000000000001e-70 < t < 4.9999999999999998e86Initial program 74.3%
associate-/r*92.3%
associate-*l/96.0%
Applied egg-rr96.0%
associate-/l*96.0%
Simplified96.0%
if 4.9999999999999998e86 < t Initial program 60.3%
add-sqr-sqrt60.3%
pow260.3%
sqrt-div60.3%
sqrt-pow160.9%
metadata-eval60.9%
sqrt-prod38.0%
add-sqr-sqrt86.4%
Applied egg-rr86.4%
Final simplification74.9%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (pow t_m 1.5) l)))
(*
t_s
(if (<= t_m 4.1e-70)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 5.5e+86)
(/
2.0
(*
(* (/ (/ (pow t_m 3.0) l) (/ l (sin k))) (tan k))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(/ 2.0 (* (* (sin k) (* t_2 t_2)) (/ (* 2.0 (sin k)) (cos k)))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(t_m, 1.5) / l;
double tmp;
if (t_m <= 4.1e-70) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 5.5e+86) {
tmp = 2.0 / ((((pow(t_m, 3.0) / l) / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / ((sin(k) * (t_2 * t_2)) * ((2.0 * sin(k)) / cos(k)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m ** 1.5d0) / l
if (t_m <= 4.1d-70) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else if (t_m <= 5.5d+86) then
tmp = 2.0d0 / (((((t_m ** 3.0d0) / l) / (l / sin(k))) * tan(k)) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))))
else
tmp = 2.0d0 / ((sin(k) * (t_2 * t_2)) * ((2.0d0 * sin(k)) / cos(k)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(t_m, 1.5) / l;
double tmp;
if (t_m <= 4.1e-70) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 5.5e+86) {
tmp = 2.0 / ((((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))) * Math.tan(k)) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / ((Math.sin(k) * (t_2 * t_2)) * ((2.0 * Math.sin(k)) / Math.cos(k)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(t_m, 1.5) / l tmp = 0 if t_m <= 4.1e-70: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) elif t_m <= 5.5e+86: tmp = 2.0 / ((((math.pow(t_m, 3.0) / l) / (l / math.sin(k))) * math.tan(k)) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) else: tmp = 2.0 / ((math.sin(k) * (t_2 * t_2)) * ((2.0 * math.sin(k)) / math.cos(k))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64((t_m ^ 1.5) / l) tmp = 0.0 if (t_m <= 4.1e-70) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 5.5e+86) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))) * tan(k)) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(t_2 * t_2)) * Float64(Float64(2.0 * sin(k)) / cos(k)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m ^ 1.5) / l; tmp = 0.0; if (t_m <= 4.1e-70) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); elseif (t_m <= 5.5e+86) tmp = 2.0 / (((((t_m ^ 3.0) / l) / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))); else tmp = 2.0 / ((sin(k) * (t_2 * t_2)) * ((2.0 * sin(k)) / cos(k))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.1e-70], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+86], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t_m}^{1.5}}{\ell}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 4.1 \cdot 10^{-70}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+86}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \left(t_2 \cdot t_2\right)\right) \cdot \frac{2 \cdot \sin k}{\cos k}}\\
\end{array}
\end{array}
\end{array}
if t < 4.09999999999999977e-70Initial program 49.2%
associate-/r*48.6%
sqr-neg48.6%
associate-*l*45.9%
sqr-neg45.9%
associate-/r*51.6%
associate-+l+51.6%
unpow251.6%
times-frac38.6%
sqr-neg38.6%
times-frac51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*r*68.9%
times-frac69.8%
Simplified69.8%
if 4.09999999999999977e-70 < t < 5.5000000000000002e86Initial program 74.3%
associate-/r*92.3%
associate-*l/96.0%
Applied egg-rr96.0%
associate-/l*96.0%
Simplified96.0%
if 5.5000000000000002e86 < t Initial program 60.3%
associate-*l*60.3%
sqr-neg60.3%
sqr-neg60.3%
associate-/r*70.8%
distribute-rgt-in70.8%
unpow270.8%
times-frac62.7%
sqr-neg62.7%
times-frac70.8%
unpow270.8%
distribute-rgt-in70.8%
Simplified70.8%
cube-mult70.9%
*-un-lft-identity70.9%
times-frac73.5%
pow273.5%
Applied egg-rr73.5%
Taylor expanded in t around inf 73.5%
associate-*r/73.5%
Simplified73.5%
/-rgt-identity73.5%
associate-*r/70.8%
unpow270.8%
cube-mult70.8%
associate-/r*60.3%
add-sqr-sqrt60.3%
sqrt-div60.3%
sqrt-pow160.3%
metadata-eval60.3%
sqrt-prod24.5%
add-sqr-sqrt59.8%
sqrt-div59.8%
sqrt-pow160.2%
metadata-eval60.2%
sqrt-prod35.7%
add-sqr-sqrt83.9%
Applied egg-rr83.9%
Final simplification74.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 3.4e-70)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 3.8e+94)
(/
2.0
(*
(* (/ (/ (pow t_m 3.0) l) (/ l (sin k))) (tan k))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(/
2.0
(*
(/ (* 2.0 (sin k)) (cos k))
(* (sin k) (/ (pow (/ t_m (cbrt l)) 3.0) l))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-70) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 3.8e+94) {
tmp = 2.0 / ((((pow(t_m, 3.0) / l) / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / (((2.0 * sin(k)) / cos(k)) * (sin(k) * (pow((t_m / cbrt(l)), 3.0) / l)));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.4e-70) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 3.8e+94) {
tmp = 2.0 / ((((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))) * Math.tan(k)) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / (((2.0 * Math.sin(k)) / Math.cos(k)) * (Math.sin(k) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l)));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.4e-70) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 3.8e+94) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))) * tan(k)) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * sin(k)) / cos(k)) * Float64(sin(k) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.4e-70], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.8e+94], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.4 \cdot 10^{-70}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 3.8 \cdot 10^{+94}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{2 \cdot \sin k}{\cos k} \cdot \left(\sin k \cdot \frac{{\left(\frac{t_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}\right)}\\
\end{array}
\end{array}
if t < 3.39999999999999995e-70Initial program 49.2%
associate-/r*48.6%
sqr-neg48.6%
associate-*l*45.9%
sqr-neg45.9%
associate-/r*51.6%
associate-+l+51.6%
unpow251.6%
times-frac38.6%
sqr-neg38.6%
times-frac51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*r*68.9%
times-frac69.8%
Simplified69.8%
if 3.39999999999999995e-70 < t < 3.7999999999999996e94Initial program 69.4%
associate-/r*89.3%
associate-*l/92.7%
Applied egg-rr92.7%
associate-/l*92.7%
Simplified92.7%
if 3.7999999999999996e94 < t Initial program 63.4%
associate-*l*63.4%
sqr-neg63.4%
sqr-neg63.4%
associate-/r*72.0%
distribute-rgt-in72.0%
unpow272.0%
times-frac63.4%
sqr-neg63.4%
times-frac72.0%
unpow272.0%
distribute-rgt-in72.0%
Simplified72.0%
add-cube-cbrt72.0%
pow372.0%
cbrt-div72.0%
rem-cbrt-cube85.6%
Applied egg-rr85.6%
Taylor expanded in t around inf 83.1%
associate-*r/74.8%
Simplified83.1%
Final simplification74.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 1.08e-70)
(*
2.0
(* (/ (cos k) (* t_m (pow k 2.0))) (/ (pow l 2.0) (pow (sin k) 2.0))))
(if (<= t_m 7.4e+124)
(/
2.0
(*
(* (/ (/ (pow t_m 3.0) l) (/ l (sin k))) (tan k))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.08e-70) {
tmp = 2.0 * ((cos(k) / (t_m * pow(k, 2.0))) * (pow(l, 2.0) / pow(sin(k), 2.0)));
} else if (t_m <= 7.4e+124) {
tmp = 2.0 / ((((pow(t_m, 3.0) / l) / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.08d-70) then
tmp = 2.0d0 * ((cos(k) / (t_m * (k ** 2.0d0))) * ((l ** 2.0d0) / (sin(k) ** 2.0d0)))
else if (t_m <= 7.4d+124) then
tmp = 2.0d0 / (((((t_m ** 3.0d0) / l) / (l / sin(k))) * tan(k)) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.08e-70) {
tmp = 2.0 * ((Math.cos(k) / (t_m * Math.pow(k, 2.0))) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k), 2.0)));
} else if (t_m <= 7.4e+124) {
tmp = 2.0 / ((((Math.pow(t_m, 3.0) / l) / (l / Math.sin(k))) * Math.tan(k)) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.08e-70: tmp = 2.0 * ((math.cos(k) / (t_m * math.pow(k, 2.0))) * (math.pow(l, 2.0) / math.pow(math.sin(k), 2.0))) elif t_m <= 7.4e+124: tmp = 2.0 / ((((math.pow(t_m, 3.0) / l) / (l / math.sin(k))) * math.tan(k)) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.08e-70) tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64(t_m * (k ^ 2.0))) * Float64((l ^ 2.0) / (sin(k) ^ 2.0)))); elseif (t_m <= 7.4e+124) tmp = Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / l) / Float64(l / sin(k))) * tan(k)) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.08e-70) tmp = 2.0 * ((cos(k) / (t_m * (k ^ 2.0))) * ((l ^ 2.0) / (sin(k) ^ 2.0))); elseif (t_m <= 7.4e+124) tmp = 2.0 / (((((t_m ^ 3.0) / l) / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.08e-70], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.4e+124], N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.08 \cdot 10^{-70}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{t_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2}}{{\sin k}^{2}}\right)\\
\mathbf{elif}\;t_m \leq 7.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 1.0800000000000001e-70Initial program 49.2%
associate-/r*48.6%
sqr-neg48.6%
associate-*l*45.9%
sqr-neg45.9%
associate-/r*51.6%
associate-+l+51.6%
unpow251.6%
times-frac38.6%
sqr-neg38.6%
times-frac51.6%
unpow251.6%
Simplified51.6%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*r*68.9%
times-frac69.8%
Simplified69.8%
if 1.0800000000000001e-70 < t < 7.40000000000000016e124Initial program 68.2%
associate-/r*87.9%
associate-*l/90.8%
Applied egg-rr90.8%
associate-/l*90.8%
Simplified90.8%
if 7.40000000000000016e124 < t Initial program 63.7%
*-commutative63.7%
sqr-neg63.7%
*-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
sqr-neg63.7%
Simplified63.7%
Taylor expanded in k around 0 63.7%
add-sqr-sqrt50.4%
pow250.4%
Applied egg-rr43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in k around 0 74.1%
Final simplification73.0%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ (pow t_m 3.0) l)))
(*
t_s
(if (<= t_m 3.5e-216)
(/ 2.0 (/ (* (* 2.0 (sin k)) (* (sin k) (/ t_2 l))) (cos k)))
(if (<= t_m 1.6e-87)
(/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (/ (sin k) (/ (cos k) t_m))))
(if (<= t_m 7.4e+124)
(/
2.0
(*
(* (/ t_2 (/ l (sin k))) (tan k))
(+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double t_2 = pow(t_m, 3.0) / l;
double tmp;
if (t_m <= 3.5e-216) {
tmp = 2.0 / (((2.0 * sin(k)) * (sin(k) * (t_2 / l))) / cos(k));
} else if (t_m <= 1.6e-87) {
tmp = 2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (sin(k) / (cos(k) / t_m)));
} else if (t_m <= 7.4e+124) {
tmp = 2.0 / (((t_2 / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = (t_m ** 3.0d0) / l
if (t_m <= 3.5d-216) then
tmp = 2.0d0 / (((2.0d0 * sin(k)) * (sin(k) * (t_2 / l))) / cos(k))
else if (t_m <= 1.6d-87) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (sin(k) / (cos(k) / t_m)))
else if (t_m <= 7.4d+124) then
tmp = 2.0d0 / (((t_2 / (l / sin(k))) * tan(k)) * (1.0d0 + (1.0d0 + ((k / t_m) ** 2.0d0))))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double t_2 = Math.pow(t_m, 3.0) / l;
double tmp;
if (t_m <= 3.5e-216) {
tmp = 2.0 / (((2.0 * Math.sin(k)) * (Math.sin(k) * (t_2 / l))) / Math.cos(k));
} else if (t_m <= 1.6e-87) {
tmp = 2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (Math.sin(k) / (Math.cos(k) / t_m)));
} else if (t_m <= 7.4e+124) {
tmp = 2.0 / (((t_2 / (l / Math.sin(k))) * Math.tan(k)) * (1.0 + (1.0 + Math.pow((k / t_m), 2.0))));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): t_2 = math.pow(t_m, 3.0) / l tmp = 0 if t_m <= 3.5e-216: tmp = 2.0 / (((2.0 * math.sin(k)) * (math.sin(k) * (t_2 / l))) / math.cos(k)) elif t_m <= 1.6e-87: tmp = 2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (math.sin(k) / (math.cos(k) / t_m))) elif t_m <= 7.4e+124: tmp = 2.0 / (((t_2 / (l / math.sin(k))) * math.tan(k)) * (1.0 + (1.0 + math.pow((k / t_m), 2.0)))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) t_2 = Float64((t_m ^ 3.0) / l) tmp = 0.0 if (t_m <= 3.5e-216) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * sin(k)) * Float64(sin(k) * Float64(t_2 / l))) / cos(k))); elseif (t_m <= 1.6e-87) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(sin(k) / Float64(cos(k) / t_m)))); elseif (t_m <= 7.4e+124) tmp = Float64(2.0 / Float64(Float64(Float64(t_2 / Float64(l / sin(k))) * tan(k)) * Float64(1.0 + Float64(1.0 + (Float64(k / t_m) ^ 2.0))))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) t_2 = (t_m ^ 3.0) / l; tmp = 0.0; if (t_m <= 3.5e-216) tmp = 2.0 / (((2.0 * sin(k)) * (sin(k) * (t_2 / l))) / cos(k)); elseif (t_m <= 1.6e-87) tmp = 2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (sin(k) / (cos(k) / t_m))); elseif (t_m <= 7.4e+124) tmp = 2.0 / (((t_2 / (l / sin(k))) * tan(k)) * (1.0 + (1.0 + ((k / t_m) ^ 2.0)))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.5e-216], N[(2.0 / N[(N[(N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.6e-87], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.4e+124], N[(2.0 / N[(N[(N[(t$95$2 / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{{t_m}^{3}}{\ell}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 3.5 \cdot 10^{-216}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot \sin k\right) \cdot \left(\sin k \cdot \frac{t_2}{\ell}\right)}{\cos k}}\\
\mathbf{elif}\;t_m \leq 1.6 \cdot 10^{-87}:\\
\;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{\sin k}{\frac{\cos k}{t_m}}}\\
\mathbf{elif}\;t_m \leq 7.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{2}{\left(\frac{t_2}{\frac{\ell}{\sin k}} \cdot \tan k\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
\end{array}
if t < 3.49999999999999982e-216Initial program 49.0%
associate-*l*49.0%
sqr-neg49.0%
sqr-neg49.0%
associate-/r*55.3%
distribute-rgt-in55.3%
unpow255.3%
times-frac42.2%
sqr-neg42.2%
times-frac55.3%
unpow255.3%
distribute-rgt-in55.3%
Simplified55.3%
cube-mult55.3%
*-un-lft-identity55.3%
times-frac61.6%
pow261.6%
Applied egg-rr61.6%
Taylor expanded in t around inf 56.3%
associate-*r/56.3%
Simplified56.3%
associate-*r/56.3%
frac-times54.9%
unpow254.9%
cube-mult54.9%
*-un-lft-identity54.9%
Applied egg-rr54.9%
if 3.49999999999999982e-216 < t < 1.59999999999999989e-87Initial program 49.9%
*-commutative49.9%
sqr-neg49.9%
*-commutative49.9%
associate-*l*49.9%
*-commutative49.9%
sqr-neg49.9%
Simplified49.9%
Taylor expanded in k around 0 46.5%
Taylor expanded in k around inf 68.5%
times-frac68.6%
*-commutative68.6%
associate-/l*68.6%
Simplified68.6%
if 1.59999999999999989e-87 < t < 7.40000000000000016e124Initial program 66.4%
associate-/r*84.0%
associate-*l/89.2%
Applied egg-rr89.2%
associate-/l*89.2%
Simplified89.2%
if 7.40000000000000016e124 < t Initial program 63.7%
*-commutative63.7%
sqr-neg63.7%
*-commutative63.7%
associate-*l*63.7%
*-commutative63.7%
sqr-neg63.7%
Simplified63.7%
Taylor expanded in k around 0 63.7%
add-sqr-sqrt50.4%
pow250.4%
Applied egg-rr43.0%
*-commutative43.0%
Simplified43.0%
Taylor expanded in k around 0 74.1%
Final simplification63.6%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 8.5e-58)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(if (<= k 4.9e+147)
(/
2.0
(/ (* (* 2.0 (sin k)) (* (sin k) (/ (/ (pow t_m 3.0) l) l))) (cos k)))
(pow (/ 1.0 (* t_m (cbrt (* (pow k 2.0) (pow 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 tmp;
if (k <= 8.5e-58) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else if (k <= 4.9e+147) {
tmp = 2.0 / (((2.0 * sin(k)) * (sin(k) * ((pow(t_m, 3.0) / l) / l))) / cos(k));
} else {
tmp = pow((1.0 / (t_m * cbrt((pow(k, 2.0) * pow(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 tmp;
if (k <= 8.5e-58) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else if (k <= 4.9e+147) {
tmp = 2.0 / (((2.0 * Math.sin(k)) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l))) / Math.cos(k));
} else {
tmp = Math.pow((1.0 / (t_m * Math.cbrt((Math.pow(k, 2.0) * Math.pow(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) tmp = 0.0 if (k <= 8.5e-58) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); elseif (k <= 4.9e+147) tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * sin(k)) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l))) / cos(k))); else tmp = Float64(1.0 / Float64(t_m * cbrt(Float64((k ^ 2.0) * (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_] := N[(t$95$s * If[LessEqual[k, 8.5e-58], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.9e+147], N[(2.0 / N[(N[(N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(1.0 / N[(t$95$m * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $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}\;k \leq 8.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{elif}\;k \leq 4.9 \cdot 10^{+147}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot \sin k\right) \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)}{\cos k}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{1}{t_m \cdot \sqrt[3]{{k}^{2} \cdot {\ell}^{-2}}}\right)}^{3}\\
\end{array}
\end{array}
if k < 8.5000000000000004e-58Initial program 54.5%
*-commutative54.5%
sqr-neg54.5%
*-commutative54.5%
associate-*l*54.5%
*-commutative54.5%
sqr-neg54.5%
Simplified54.5%
Taylor expanded in k around 0 54.2%
add-sqr-sqrt26.7%
pow226.7%
Applied egg-rr23.0%
*-commutative23.0%
Simplified23.0%
Taylor expanded in k around 0 29.1%
if 8.5000000000000004e-58 < k < 4.8999999999999998e147Initial program 56.6%
associate-*l*56.7%
sqr-neg56.7%
sqr-neg56.7%
associate-/r*66.3%
distribute-rgt-in66.3%
unpow266.3%
times-frac66.3%
sqr-neg66.3%
times-frac66.3%
unpow266.3%
distribute-rgt-in66.3%
Simplified66.3%
cube-mult66.3%
*-un-lft-identity66.3%
times-frac73.5%
pow273.5%
Applied egg-rr73.5%
Taylor expanded in t around inf 62.6%
associate-*r/62.6%
Simplified62.6%
associate-*r/62.6%
frac-times60.0%
unpow260.0%
cube-mult60.0%
*-un-lft-identity60.0%
Applied egg-rr60.0%
if 4.8999999999999998e147 < k Initial program 45.3%
*-commutative45.3%
sqr-neg45.3%
*-commutative45.3%
associate-*l*45.3%
*-commutative45.3%
sqr-neg45.3%
Simplified45.3%
associate-/r*45.3%
div-inv45.3%
add-cube-cbrt45.3%
associate-*l*45.3%
pow245.3%
cbrt-div45.3%
rem-cbrt-cube45.3%
cbrt-div45.3%
rem-cbrt-cube67.0%
Applied egg-rr67.0%
Taylor expanded in k around 0 45.2%
associate-/l*45.2%
associate-/r/45.2%
Simplified45.2%
add-cube-cbrt45.2%
pow345.2%
Applied egg-rr69.5%
Final simplification40.7%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= l 1.5e+80)
(/
2.0
(pow
(*
(/ (pow t_m 1.5) l)
(* (sqrt 2.0) (+ k (* (pow k 3.0) -0.08333333333333333))))
2.0))
(/
2.0
(/ (* (* 2.0 (sin k)) (* (sin k) (/ (/ (pow t_m 3.0) l) l))) (cos k))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 1.5e+80) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (sqrt(2.0) * (k + (pow(k, 3.0) * -0.08333333333333333)))), 2.0);
} else {
tmp = 2.0 / (((2.0 * sin(k)) * (sin(k) * ((pow(t_m, 3.0) / l) / l))) / cos(k));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 1.5d+80) then
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (sqrt(2.0d0) * (k + ((k ** 3.0d0) * (-0.08333333333333333d0))))) ** 2.0d0)
else
tmp = 2.0d0 / (((2.0d0 * sin(k)) * (sin(k) * (((t_m ** 3.0d0) / l) / l))) / cos(k))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (l <= 1.5e+80) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.sqrt(2.0) * (k + (Math.pow(k, 3.0) * -0.08333333333333333)))), 2.0);
} else {
tmp = 2.0 / (((2.0 * Math.sin(k)) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l))) / Math.cos(k));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if l <= 1.5e+80: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (math.sqrt(2.0) * (k + (math.pow(k, 3.0) * -0.08333333333333333)))), 2.0) else: tmp = 2.0 / (((2.0 * math.sin(k)) * (math.sin(k) * ((math.pow(t_m, 3.0) / l) / l))) / math.cos(k)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (l <= 1.5e+80) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(sqrt(2.0) * Float64(k + Float64((k ^ 3.0) * -0.08333333333333333)))) ^ 2.0)); else tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * sin(k)) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l))) / cos(k))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (l <= 1.5e+80) tmp = 2.0 / ((((t_m ^ 1.5) / l) * (sqrt(2.0) * (k + ((k ^ 3.0) * -0.08333333333333333)))) ^ 2.0); else tmp = 2.0 / (((2.0 * sin(k)) * (sin(k) * (((t_m ^ 3.0) / l) / l))) / cos(k)); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 1.5e+80], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] * N[(k + N[(N[Power[k, 3.0], $MachinePrecision] * -0.08333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $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}\;\ell \leq 1.5 \cdot 10^{+80}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(\sqrt{2} \cdot \left(k + {k}^{3} \cdot -0.08333333333333333\right)\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left(2 \cdot \sin k\right) \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)}{\cos k}}\\
\end{array}
\end{array}
if l < 1.49999999999999993e80Initial program 58.0%
*-commutative58.0%
sqr-neg58.0%
*-commutative58.0%
associate-*l*58.0%
*-commutative58.0%
sqr-neg58.0%
Simplified58.0%
Taylor expanded in k around 0 56.1%
add-sqr-sqrt31.3%
pow231.3%
Applied egg-rr21.7%
*-commutative21.7%
Simplified21.7%
Taylor expanded in k around 0 31.7%
+-commutative31.7%
associate-*r*31.7%
distribute-rgt-out31.7%
*-commutative31.7%
Simplified31.7%
if 1.49999999999999993e80 < l Initial program 36.1%
associate-*l*36.2%
sqr-neg36.2%
sqr-neg36.2%
associate-/r*45.7%
distribute-rgt-in45.7%
unpow245.7%
times-frac34.6%
sqr-neg34.6%
times-frac45.7%
unpow245.7%
distribute-rgt-in45.7%
Simplified45.7%
cube-mult45.7%
*-un-lft-identity45.7%
times-frac51.2%
pow251.2%
Applied egg-rr51.2%
Taylor expanded in t around inf 48.6%
associate-*r/48.6%
Simplified48.6%
associate-*r/48.6%
frac-times44.8%
unpow244.8%
cube-mult44.8%
*-un-lft-identity44.8%
Applied egg-rr44.8%
Final simplification34.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 6.9e-65)
(/ 2.0 (* (/ (pow k 3.0) (pow l 2.0)) (/ (sin k) (/ (cos k) t_m))))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.9e-65) {
tmp = 2.0 / ((pow(k, 3.0) / pow(l, 2.0)) * (sin(k) / (cos(k) / t_m)));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.9d-65) then
tmp = 2.0d0 / (((k ** 3.0d0) / (l ** 2.0d0)) * (sin(k) / (cos(k) / t_m)))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.9e-65) {
tmp = 2.0 / ((Math.pow(k, 3.0) / Math.pow(l, 2.0)) * (Math.sin(k) / (Math.cos(k) / t_m)));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.9e-65: tmp = 2.0 / ((math.pow(k, 3.0) / math.pow(l, 2.0)) * (math.sin(k) / (math.cos(k) / t_m))) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.9e-65) tmp = Float64(2.0 / Float64(Float64((k ^ 3.0) / (l ^ 2.0)) * Float64(sin(k) / Float64(cos(k) / t_m)))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.9e-65) tmp = 2.0 / (((k ^ 3.0) / (l ^ 2.0)) * (sin(k) / (cos(k) / t_m))); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.9e-65], N[(2.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 6.9 \cdot 10^{-65}:\\
\;\;\;\;\frac{2}{\frac{{k}^{3}}{{\ell}^{2}} \cdot \frac{\sin k}{\frac{\cos k}{t_m}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.89999999999999991e-65Initial program 49.2%
*-commutative49.2%
sqr-neg49.2%
*-commutative49.2%
associate-*l*49.2%
*-commutative49.2%
sqr-neg49.2%
Simplified49.2%
Taylor expanded in k around 0 44.8%
Taylor expanded in k around inf 56.5%
times-frac57.9%
*-commutative57.9%
associate-/l*57.9%
Simplified57.9%
if 6.89999999999999991e-65 < t Initial program 66.1%
*-commutative66.1%
sqr-neg66.1%
*-commutative66.1%
associate-*l*66.0%
*-commutative66.0%
sqr-neg66.0%
Simplified66.0%
Taylor expanded in k around 0 61.3%
add-sqr-sqrt51.8%
pow251.8%
Applied egg-rr53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in k around 0 73.1%
Final simplification61.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.45e+27)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(pow (/ 1.0 (* t_m (cbrt (* (pow k 2.0) (pow 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 tmp;
if (k <= 1.45e+27) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = pow((1.0 / (t_m * cbrt((pow(k, 2.0) * pow(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 tmp;
if (k <= 1.45e+27) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = Math.pow((1.0 / (t_m * Math.cbrt((Math.pow(k, 2.0) * Math.pow(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) tmp = 0.0 if (k <= 1.45e+27) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(1.0 / Float64(t_m * cbrt(Float64((k ^ 2.0) * (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_] := N[(t$95$s * If[LessEqual[k, 1.45e+27], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(1.0 / N[(t$95$m * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $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}\;k \leq 1.45 \cdot 10^{+27}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{1}{t_m \cdot \sqrt[3]{{k}^{2} \cdot {\ell}^{-2}}}\right)}^{3}\\
\end{array}
\end{array}
if k < 1.4500000000000001e27Initial program 55.8%
*-commutative55.8%
sqr-neg55.8%
*-commutative55.8%
associate-*l*55.8%
*-commutative55.8%
sqr-neg55.8%
Simplified55.8%
Taylor expanded in k around 0 55.2%
add-sqr-sqrt26.8%
pow226.8%
Applied egg-rr22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in k around 0 28.5%
if 1.4500000000000001e27 < k Initial program 46.7%
*-commutative46.7%
sqr-neg46.7%
*-commutative46.7%
associate-*l*46.8%
*-commutative46.8%
sqr-neg46.8%
Simplified46.8%
associate-/r*51.1%
div-inv51.1%
add-cube-cbrt50.9%
associate-*l*51.0%
pow251.0%
cbrt-div51.0%
rem-cbrt-cube51.0%
cbrt-div51.0%
rem-cbrt-cube71.0%
Applied egg-rr71.0%
Taylor expanded in k around 0 39.7%
associate-/l*41.2%
associate-/r/41.3%
Simplified41.3%
add-cube-cbrt41.3%
pow341.3%
Applied egg-rr57.6%
Final simplification36.4%
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.16e+27)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(/ 2.0 (* (pow (* t_m (cbrt (/ k (pow l 2.0)))) 3.0) (* 2.0 k))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.16e+27) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (pow((t_m * cbrt((k / pow(l, 2.0)))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.16e+27) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = 2.0 / (Math.pow((t_m * Math.cbrt((k / Math.pow(l, 2.0)))), 3.0) * (2.0 * k));
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.16e+27) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(2.0 / Float64((Float64(t_m * cbrt(Float64(k / (l ^ 2.0)))) ^ 3.0) * Float64(2.0 * k))); end return Float64(t_s * tmp) end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.16e+27], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * k), $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.16 \cdot 10^{+27}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(t_m \cdot \sqrt[3]{\frac{k}{{\ell}^{2}}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\
\end{array}
\end{array}
if k < 1.16e27Initial program 55.8%
*-commutative55.8%
sqr-neg55.8%
*-commutative55.8%
associate-*l*55.8%
*-commutative55.8%
sqr-neg55.8%
Simplified55.8%
Taylor expanded in k around 0 55.2%
add-sqr-sqrt26.8%
pow226.8%
Applied egg-rr22.9%
*-commutative22.9%
Simplified22.9%
Taylor expanded in k around 0 28.5%
if 1.16e27 < k Initial program 46.7%
*-commutative46.7%
sqr-neg46.7%
*-commutative46.7%
associate-*l*46.8%
*-commutative46.8%
sqr-neg46.8%
Simplified46.8%
Taylor expanded in k around 0 38.8%
Taylor expanded in k around 0 43.2%
associate-/l*43.2%
Simplified43.2%
add-cube-cbrt43.2%
pow343.2%
associate-/r/43.2%
cbrt-prod43.2%
unpow343.2%
add-cbrt-cube59.3%
Applied egg-rr59.3%
Final simplification36.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 6.4e-242)
(/ 2.0 (* (* 2.0 k) (/ (* (sin k) (/ (pow t_m 3.0) l)) l)))
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.4e-242) {
tmp = 2.0 / ((2.0 * k) * ((sin(k) * (pow(t_m, 3.0) / l)) / l));
} else {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.4d-242) then
tmp = 2.0d0 / ((2.0d0 * k) * ((sin(k) * ((t_m ** 3.0d0) / l)) / l))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) * (k * sqrt(2.0d0))) ** 2.0d0)
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 6.4e-242) {
tmp = 2.0 / ((2.0 * k) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l));
} else {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 6.4e-242: tmp = 2.0 / ((2.0 * k) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)) else: tmp = 2.0 / math.pow(((math.pow(t_m, 1.5) / l) * (k * math.sqrt(2.0))), 2.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 6.4e-242) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))); else tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 6.4e-242) tmp = 2.0 / ((2.0 * k) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) * (k * sqrt(2.0))) ^ 2.0); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.4e-242], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 6.4 \cdot 10^{-242}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\end{array}
\end{array}
if t < 6.39999999999999997e-242Initial program 50.9%
*-commutative50.9%
sqr-neg50.9%
*-commutative50.9%
associate-*l*51.0%
*-commutative51.0%
sqr-neg51.0%
Simplified51.0%
Taylor expanded in k around 0 50.9%
associate-/r*56.8%
associate-*l/59.3%
Applied egg-rr59.4%
if 6.39999999999999997e-242 < t Initial program 57.0%
*-commutative57.0%
sqr-neg57.0%
*-commutative57.0%
associate-*l*57.0%
*-commutative57.0%
sqr-neg57.0%
Simplified57.0%
Taylor expanded in k around 0 50.6%
add-sqr-sqrt45.8%
pow245.8%
Applied egg-rr47.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in k around 0 64.1%
Final simplification61.3%
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 2.45e+32)
(/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
(/ (/ 1.0 k) (pow (* t_m (cbrt (* k (pow 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 tmp;
if (k <= 2.45e+32) {
tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
} else {
tmp = (1.0 / k) / pow((t_m * cbrt((k * pow(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 tmp;
if (k <= 2.45e+32) {
tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
} else {
tmp = (1.0 / k) / Math.pow((t_m * Math.cbrt((k * Math.pow(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) tmp = 0.0 if (k <= 2.45e+32) tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0)); else tmp = Float64(Float64(1.0 / k) / (Float64(t_m * cbrt(Float64(k * (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_] := N[(t$95$s * If[LessEqual[k, 2.45e+32], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / k), $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[(k * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 2.45 \cdot 10^{+32}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{k}}{{\left(t_m \cdot \sqrt[3]{k \cdot {\ell}^{-2}}\right)}^{3}}\\
\end{array}
\end{array}
if k < 2.4500000000000001e32Initial program 56.3%
*-commutative56.3%
sqr-neg56.3%
*-commutative56.3%
associate-*l*56.3%
*-commutative56.3%
sqr-neg56.3%
Simplified56.3%
Taylor expanded in k around 0 55.2%
add-sqr-sqrt27.1%
pow227.1%
Applied egg-rr23.2%
*-commutative23.2%
Simplified23.2%
Taylor expanded in k around 0 28.8%
if 2.4500000000000001e32 < k Initial program 45.1%
*-commutative45.1%
sqr-neg45.1%
*-commutative45.1%
associate-*l*45.2%
*-commutative45.2%
sqr-neg45.2%
Simplified45.2%
Taylor expanded in k around 0 38.4%
Taylor expanded in k around 0 42.9%
associate-/l*43.0%
Simplified43.0%
expm1-log1p-u39.7%
expm1-udef41.2%
associate-/r/41.1%
*-commutative41.1%
Applied egg-rr41.1%
expm1-def39.7%
expm1-log1p43.0%
*-commutative43.0%
associate-/r*43.0%
*-commutative43.0%
associate-/r*43.0%
metadata-eval43.0%
*-commutative43.0%
Simplified43.0%
add-cube-cbrt43.0%
pow343.0%
cbrt-prod43.0%
unpow343.0%
add-cbrt-cube59.5%
div-inv59.5%
pow-flip59.6%
metadata-eval59.6%
Applied egg-rr59.6%
Final simplification36.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 4.4e+148)
(/ 2.0 (* (* 2.0 k) (/ (* (sin k) (/ (pow t_m 3.0) l)) l)))
(/ 1.0 (* (pow t_m 3.0) (* (pow k 2.0) (pow l -2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e+148) {
tmp = 2.0 / ((2.0 * k) * ((sin(k) * (pow(t_m, 3.0) / l)) / l));
} else {
tmp = 1.0 / (pow(t_m, 3.0) * (pow(k, 2.0) * pow(l, -2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 4.4d+148) then
tmp = 2.0d0 / ((2.0d0 * k) * ((sin(k) * ((t_m ** 3.0d0) / l)) / l))
else
tmp = 1.0d0 / ((t_m ** 3.0d0) * ((k ** 2.0d0) * (l ** (-2.0d0))))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 4.4e+148) {
tmp = 2.0 / ((2.0 * k) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l));
} else {
tmp = 1.0 / (Math.pow(t_m, 3.0) * (Math.pow(k, 2.0) * Math.pow(l, -2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 4.4e+148: tmp = 2.0 / ((2.0 * k) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)) else: tmp = 1.0 / (math.pow(t_m, 3.0) * (math.pow(k, 2.0) * math.pow(l, -2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 4.4e+148) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))); else tmp = Float64(1.0 / Float64((t_m ^ 3.0) * Float64((k ^ 2.0) * (l ^ -2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 4.4e+148) tmp = 2.0 / ((2.0 * k) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)); else tmp = 1.0 / ((t_m ^ 3.0) * ((k ^ 2.0) * (l ^ -2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 4.4e+148], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 4.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{{t_m}^{3} \cdot \left({k}^{2} \cdot {\ell}^{-2}\right)}\\
\end{array}
\end{array}
if k < 4.3999999999999998e148Initial program 54.9%
*-commutative54.9%
sqr-neg54.9%
*-commutative54.9%
associate-*l*55.0%
*-commutative55.0%
sqr-neg55.0%
Simplified55.0%
Taylor expanded in k around 0 53.0%
associate-/r*64.1%
associate-*l/66.7%
Applied egg-rr63.1%
if 4.3999999999999998e148 < k Initial program 45.3%
*-commutative45.3%
sqr-neg45.3%
*-commutative45.3%
associate-*l*45.3%
*-commutative45.3%
sqr-neg45.3%
Simplified45.3%
associate-/r*45.3%
div-inv45.3%
add-cube-cbrt45.3%
associate-*l*45.3%
pow245.3%
cbrt-div45.3%
rem-cbrt-cube45.3%
cbrt-div45.3%
rem-cbrt-cube67.0%
Applied egg-rr67.0%
Taylor expanded in k around 0 45.2%
associate-/l*45.2%
associate-/r/45.2%
Simplified45.2%
expm1-log1p-u45.2%
expm1-udef45.2%
associate-/r*45.2%
metadata-eval45.2%
*-commutative45.2%
div-inv45.2%
pow-flip45.3%
metadata-eval45.3%
Applied egg-rr45.3%
expm1-def45.3%
expm1-log1p45.3%
Simplified45.3%
Final simplification60.2%
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 1e-244)
(/ 2.0 (* (* (sin k) (/ (pow t_m 3.0) (* l l))) (* 2.0 k)))
(/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-244) {
tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / (l * l))) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1d-244) then
tmp = 2.0d0 / ((sin(k) * ((t_m ** 3.0d0) / (l * l))) * (2.0d0 * k))
else
tmp = 2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (l ** 2.0d0)))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-244) {
tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1e-244: tmp = 2.0 / ((math.sin(k) * (math.pow(t_m, 3.0) / (l * l))) * (2.0 * k)) else: tmp = 2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-244) tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1e-244) tmp = 2.0 / ((sin(k) * ((t_m ^ 3.0) / (l * l))) * (2.0 * k)); else tmp = 2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (l ^ 2.0))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-244], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 10^{-244}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right) \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t_m}^{3}}{{\ell}^{2}}}\\
\end{array}
\end{array}
if t < 9.9999999999999993e-245Initial program 50.9%
*-commutative50.9%
sqr-neg50.9%
*-commutative50.9%
associate-*l*51.0%
*-commutative51.0%
sqr-neg51.0%
Simplified51.0%
Taylor expanded in k around 0 50.9%
if 9.9999999999999993e-245 < t Initial program 57.0%
*-commutative57.0%
sqr-neg57.0%
*-commutative57.0%
associate-*l*57.0%
*-commutative57.0%
sqr-neg57.0%
Simplified57.0%
Taylor expanded in k around 0 53.0%
Taylor expanded in k around 0 53.5%
Final simplification52.0%
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.45e+148)
(/ 2.0 (* (* 2.0 k) (/ (* (sin k) (/ (pow t_m 3.0) l)) l)))
(/ 1.0 (* k (* (pow t_m 3.0) (* k (pow l -2.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.45e+148) {
tmp = 2.0 / ((2.0 * k) * ((sin(k) * (pow(t_m, 3.0) / l)) / l));
} else {
tmp = 1.0 / (k * (pow(t_m, 3.0) * (k * pow(l, -2.0))));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.45d+148) then
tmp = 2.0d0 / ((2.0d0 * k) * ((sin(k) * ((t_m ** 3.0d0) / l)) / l))
else
tmp = 1.0d0 / (k * ((t_m ** 3.0d0) * (k * (l ** (-2.0d0)))))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.45e+148) {
tmp = 2.0 / ((2.0 * k) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) / l));
} else {
tmp = 1.0 / (k * (Math.pow(t_m, 3.0) * (k * Math.pow(l, -2.0))));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.45e+148: tmp = 2.0 / ((2.0 * k) * ((math.sin(k) * (math.pow(t_m, 3.0) / l)) / l)) else: tmp = 1.0 / (k * (math.pow(t_m, 3.0) * (k * math.pow(l, -2.0)))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.45e+148) tmp = Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) / l))); else tmp = Float64(1.0 / Float64(k * Float64((t_m ^ 3.0) * Float64(k * (l ^ -2.0))))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.45e+148) tmp = 2.0 / ((2.0 * k) * ((sin(k) * ((t_m ^ 3.0) / l)) / l)); else tmp = 1.0 / (k * ((t_m ^ 3.0) * (k * (l ^ -2.0)))); end tmp_2 = t_s * tmp; end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.45e+148], N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(k * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k * N[Power[l, -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 1.45 \cdot 10^{+148}:\\
\;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot \frac{\sin k \cdot \frac{{t_m}^{3}}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{k \cdot \left({t_m}^{3} \cdot \left(k \cdot {\ell}^{-2}\right)\right)}\\
\end{array}
\end{array}
if k < 1.45e148Initial program 54.9%
*-commutative54.9%
sqr-neg54.9%
*-commutative54.9%
associate-*l*55.0%
*-commutative55.0%
sqr-neg55.0%
Simplified55.0%
Taylor expanded in k around 0 53.0%
associate-/r*64.1%
associate-*l/66.7%
Applied egg-rr63.1%
if 1.45e148 < k Initial program 45.3%
*-commutative45.3%
sqr-neg45.3%
*-commutative45.3%
associate-*l*45.3%
*-commutative45.3%
sqr-neg45.3%
Simplified45.3%
Taylor expanded in k around 0 39.3%
Taylor expanded in k around 0 48.6%
associate-/l*48.6%
Simplified48.6%
expm1-log1p-u45.7%
expm1-udef48.0%
associate-/r/47.9%
*-commutative47.9%
Applied egg-rr47.9%
expm1-def45.7%
expm1-log1p48.4%
*-commutative48.4%
associate-/r*48.4%
*-commutative48.4%
associate-/r*48.4%
metadata-eval48.4%
*-commutative48.4%
Simplified48.4%
expm1-log1p-u45.7%
expm1-udef47.9%
div-inv47.9%
pow-flip48.0%
metadata-eval48.0%
Applied egg-rr48.0%
expm1-def45.8%
expm1-log1p48.5%
associate-/r*48.5%
Simplified48.5%
Final simplification60.7%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (/ k (pow l 2.0)) (* (pow t_m 3.0) (* 2.0 k))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((k / pow(l, 2.0)) * (pow(t_m, 3.0) * (2.0 * k))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((k / (l ** 2.0d0)) * ((t_m ** 3.0d0) * (2.0d0 * k))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((k / Math.pow(l, 2.0)) * (Math.pow(t_m, 3.0) * (2.0 * k))));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((k / math.pow(l, 2.0)) * (math.pow(t_m, 3.0) * (2.0 * k))))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(k / (l ^ 2.0)) * Float64((t_m ^ 3.0) * Float64(2.0 * k))))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((k / (l ^ 2.0)) * ((t_m ^ 3.0) * (2.0 * k)))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{\frac{k}{{\ell}^{2}} \cdot \left({t_m}^{3} \cdot \left(2 \cdot k\right)\right)}
\end{array}
Initial program 53.3%
*-commutative53.3%
sqr-neg53.3%
*-commutative53.3%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
Simplified53.4%
Taylor expanded in k around 0 50.8%
Taylor expanded in k around 0 51.3%
associate-/l*51.0%
Simplified51.0%
expm1-log1p-u37.9%
expm1-udef39.3%
associate-/r/39.2%
*-commutative39.2%
Applied egg-rr39.2%
expm1-def38.2%
expm1-log1p51.3%
associate-*l*51.2%
Simplified51.2%
Final simplification51.2%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * k) * ((k * pow(t_m, 3.0)) / pow(l, 2.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * k) * ((k * (t_m ** 3.0d0)) / (l ** 2.0d0))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * k) * ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0))));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * k) * ((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0))))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * k) * Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0))))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * k) * ((k * (t_m ^ 3.0)) / (l ^ 2.0)))); end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * k), $MachinePrecision] * N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{2}{\left(2 \cdot k\right) \cdot \frac{k \cdot {t_m}^{3}}{{\ell}^{2}}}
\end{array}
Initial program 53.3%
*-commutative53.3%
sqr-neg53.3%
*-commutative53.3%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
Simplified53.4%
Taylor expanded in k around 0 49.2%
Taylor expanded in k around 0 51.3%
Final simplification51.3%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 1.0 (* k (* (pow t_m 3.0) (* k (pow l -2.0)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (1.0 / (k * (pow(t_m, 3.0) * (k * pow(l, -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 * (1.0d0 / (k * ((t_m ** 3.0d0) * (k * (l ** (-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 * (1.0 / (k * (Math.pow(t_m, 3.0) * (k * Math.pow(l, -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 * (1.0 / (k * (math.pow(t_m, 3.0) * (k * math.pow(l, -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(1.0 / Float64(k * Float64((t_m ^ 3.0) * Float64(k * (l ^ -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 * (1.0 / (k * ((t_m ^ 3.0) * (k * (l ^ -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[(1.0 / N[(k * N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k * N[Power[l, -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 \frac{1}{k \cdot \left({t_m}^{3} \cdot \left(k \cdot {\ell}^{-2}\right)\right)}
\end{array}
Initial program 53.3%
*-commutative53.3%
sqr-neg53.3%
*-commutative53.3%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
Simplified53.4%
Taylor expanded in k around 0 50.8%
Taylor expanded in k around 0 51.3%
associate-/l*51.0%
Simplified51.0%
expm1-log1p-u37.9%
expm1-udef39.3%
associate-/r/39.2%
*-commutative39.2%
Applied egg-rr39.2%
expm1-def38.2%
expm1-log1p51.3%
*-commutative51.3%
associate-/r*51.0%
*-commutative51.0%
associate-/r*51.0%
metadata-eval51.0%
*-commutative51.0%
Simplified51.0%
expm1-log1p-u38.0%
expm1-udef39.2%
div-inv38.9%
pow-flip38.9%
metadata-eval38.9%
Applied egg-rr38.9%
expm1-def37.6%
expm1-log1p50.6%
associate-/r*50.9%
Simplified50.9%
Final simplification50.9%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (/ 1.0 k) (* (pow t_m 3.0) (/ k (pow l 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((1.0 / k) / (pow(t_m, 3.0) * (k / pow(l, 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 * ((1.0d0 / k) / ((t_m ** 3.0d0) * (k / (l ** 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 * ((1.0 / k) / (Math.pow(t_m, 3.0) * (k / Math.pow(l, 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 * ((1.0 / k) / (math.pow(t_m, 3.0) * (k / math.pow(l, 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(Float64(1.0 / k) / Float64((t_m ^ 3.0) * Float64(k / (l ^ 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 * ((1.0 / k) / ((t_m ^ 3.0) * (k / (l ^ 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[(N[(1.0 / k), $MachinePrecision] / N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(k / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{\frac{1}{k}}{{t_m}^{3} \cdot \frac{k}{{\ell}^{2}}}
\end{array}
Initial program 53.3%
*-commutative53.3%
sqr-neg53.3%
*-commutative53.3%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
Simplified53.4%
Taylor expanded in k around 0 50.8%
Taylor expanded in k around 0 51.3%
associate-/l*51.0%
Simplified51.0%
expm1-log1p-u37.9%
expm1-udef39.3%
associate-/r/39.2%
*-commutative39.2%
Applied egg-rr39.2%
expm1-def38.2%
expm1-log1p51.3%
*-commutative51.3%
associate-/r*51.0%
*-commutative51.0%
associate-/r*51.0%
metadata-eval51.0%
*-commutative51.0%
Simplified51.0%
Final simplification51.0%
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ (/ 1.0 k) (/ (* k (pow t_m 3.0)) (pow l 2.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * ((1.0 / k) / ((k * pow(t_m, 3.0)) / pow(l, 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 * ((1.0d0 / k) / ((k * (t_m ** 3.0d0)) / (l ** 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 * ((1.0 / k) / ((k * Math.pow(t_m, 3.0)) / Math.pow(l, 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 * ((1.0 / k) / ((k * math.pow(t_m, 3.0)) / math.pow(l, 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(Float64(1.0 / k) / Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 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 * ((1.0 / k) / ((k * (t_m ^ 3.0)) / (l ^ 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[(N[(1.0 / k), $MachinePrecision] / N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \frac{\frac{1}{k}}{\frac{k \cdot {t_m}^{3}}{{\ell}^{2}}}
\end{array}
Initial program 53.3%
*-commutative53.3%
sqr-neg53.3%
*-commutative53.3%
associate-*l*53.4%
*-commutative53.4%
sqr-neg53.4%
Simplified53.4%
Taylor expanded in k around 0 50.8%
Taylor expanded in k around 0 51.3%
associate-/l*51.0%
Simplified51.0%
expm1-log1p-u37.9%
expm1-udef39.3%
associate-/r/39.2%
*-commutative39.2%
Applied egg-rr39.2%
expm1-def38.2%
expm1-log1p51.3%
*-commutative51.3%
associate-/r*51.0%
*-commutative51.0%
associate-/r*51.0%
metadata-eval51.0%
*-commutative51.0%
Simplified51.0%
associate-*r/51.1%
Applied egg-rr51.1%
Final simplification51.1%
herbie shell --seed 2024011
(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))))