
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (t l k) :precision binary64 (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k): return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0))) end
function tmp = code(t, l, k) tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0)); end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}
\end{array}
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 3.3e-11)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(*
(pow (/ (cbrt (* l 2.0)) (* t_m (* (cbrt (tan k)) (cbrt (sin k))))) 3.0)
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-11) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else {
tmp = pow((cbrt((l * 2.0)) / (t_m * (cbrt(tan(k)) * cbrt(sin(k))))), 3.0) * (l / (2.0 + pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 3.3e-11) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else {
tmp = Math.pow((Math.cbrt((l * 2.0)) / (t_m * (Math.cbrt(Math.tan(k)) * Math.cbrt(Math.sin(k))))), 3.0) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 3.3e-11) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); else tmp = Float64((Float64(cbrt(Float64(l * 2.0)) / Float64(t_m * Float64(cbrt(tan(k)) * cbrt(sin(k))))) ^ 3.0) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3e-11], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[Power[N[(l * 2.0), $MachinePrecision], 1/3], $MachinePrecision] / N[(t$95$m * N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 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 3.3 \cdot 10^{-11}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{\ell \cdot 2}}{t\_m \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{\sin k}\right)}\right)}^{3} \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.3000000000000002e-11Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 3.3000000000000002e-11 < t Initial program 74.0%
Simplified66.9%
associate-*r*72.6%
*-un-lft-identity72.6%
times-frac72.6%
associate-*r*81.1%
Applied egg-rr81.1%
/-rgt-identity81.1%
*-commutative81.1%
*-commutative81.1%
Simplified81.1%
add-cube-cbrt81.0%
pow381.1%
associate-*r/81.1%
cbrt-div81.1%
*-commutative81.1%
associate-*l*72.7%
cbrt-prod72.6%
unpow372.6%
add-cbrt-cube81.7%
Applied egg-rr81.7%
*-commutative81.7%
cbrt-prod95.0%
Applied egg-rr95.0%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (pow (/ k t_m) 2.0)))
(*
t_s
(if (<=
(/
2.0
(*
(* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))
(+ 1.0 (+ t_2 1.0))))
2e+270)
(* (/ l (+ 2.0 t_2)) (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))))
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))))))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 ((2.0 / ((tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+270) {
tmp = (l / (2.0 + t_2)) * (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))));
} else {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
}
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 ((2.0d0 / ((tan(k) * (sin(k) * ((t_m ** 3.0d0) / (l * l)))) * (1.0d0 + (t_2 + 1.0d0)))) <= 2d+270) then
tmp = (l / (2.0d0 + t_2)) * (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))))
else
tmp = ((l * (sqrt(2.0d0) / (k * sin(k)))) ** 2.0d0) * (cos(k) / t_m)
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 ((2.0 / ((Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+270) {
tmp = (l / (2.0 + t_2)) * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))));
} else {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
}
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 (2.0 / ((math.tan(k) * (math.sin(k) * (math.pow(t_m, 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+270: tmp = (l / (2.0 + t_2)) * (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) else: tmp = math.pow((l * (math.sqrt(2.0) / (k * math.sin(k)))), 2.0) * (math.cos(k) / t_m) 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(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l)))) * Float64(1.0 + Float64(t_2 + 1.0)))) <= 2e+270) tmp = Float64(Float64(l / Float64(2.0 + t_2)) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))))); else tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); 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 ((2.0 / ((tan(k) * (sin(k) * ((t_m ^ 3.0) / (l * l)))) * (1.0 + (t_2 + 1.0)))) <= 2e+270) tmp = (l / (2.0 + t_2)) * (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))); else tmp = ((l * (sqrt(2.0) / (k * sin(k)))) ^ 2.0) * (cos(k) / t_m); 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[(2.0 / N[(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] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+270], N[(N[(l / N[(2.0 + t$95$2), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $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}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(t\_2 + 1\right)\right)} \leq 2 \cdot 10^{+270}:\\
\;\;\;\;\frac{\ell}{2 + t\_2} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\end{array}
\end{array}
\end{array}
if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 2.0000000000000001e270Initial program 82.2%
Simplified74.9%
associate-*r*75.7%
*-un-lft-identity75.7%
times-frac77.2%
associate-*r*85.1%
Applied egg-rr85.1%
/-rgt-identity85.1%
*-commutative85.1%
*-commutative85.1%
Simplified85.1%
if 2.0000000000000001e270 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) Initial program 24.6%
Simplified24.6%
add-sqr-sqrt24.6%
pow224.6%
Applied egg-rr37.2%
Taylor expanded in t around 0 60.5%
unpow-prod-down58.3%
times-frac58.3%
pow258.3%
add-sqr-sqrt80.7%
Applied egg-rr80.7%
Taylor expanded in l around 0 80.7%
associate-/l*80.7%
Simplified80.7%
Final simplification82.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
(*
t_s
(if (<= t_m 1.6e-10)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(if (<= t_m 5.6e+102)
(* (/ l t_2) (* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))))
(/
2.0
(*
(pow (/ t_m (pow (cbrt l) 2.0)) 3.0)
(* (sin k) (* (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 = 2.0 + pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.6e-10) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = (l / t_2) * (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (sin(k) * (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 = 2.0 + Math.pow((k / t_m), 2.0);
double tmp;
if (t_m <= 1.6e-10) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = (l / t_2) * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (Math.sin(k) * (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(2.0 + (Float64(k / t_m) ^ 2.0)) tmp = 0.0 if (t_m <= 1.6e-10) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l / t_2) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(sin(k) * 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[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.6e-10], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l / t$95$2), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-10}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{t\_2} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(\sin k \cdot \left(\tan k \cdot t\_2\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 1.5999999999999999e-10Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 1.5999999999999999e-10 < t < 5.60000000000000037e102Initial program 88.4%
Simplified84.4%
associate-*r*88.2%
*-un-lft-identity88.2%
times-frac88.2%
associate-*r*95.8%
Applied egg-rr95.8%
/-rgt-identity95.8%
*-commutative95.8%
*-commutative95.8%
Simplified95.8%
if 5.60000000000000037e102 < t Initial program 66.3%
Simplified64.4%
unpow264.4%
clear-num64.4%
un-div-inv64.4%
Applied egg-rr64.4%
add-cube-cbrt64.4%
pow364.4%
Applied egg-rr84.8%
cube-prod84.6%
rem-cube-cbrt84.6%
associate-*l*84.6%
Simplified84.6%
Final simplification82.4%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(let* ((t_2 (/ t_m (cbrt l))))
(*
t_s
(if (<= t_m 5.6e-11)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(if (<= t_m 5.6e+102)
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))))
(/
2.0
(*
(* (pow t_2 2.0) (/ t_2 l))
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m 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 = t_m / cbrt(l);
double tmp;
if (t_m <= 5.6e-11) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / ((pow(t_2, 2.0) * (t_2 / l)) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / 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 t_2 = t_m / Math.cbrt(l);
double tmp;
if (t_m <= 5.6e-11) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else if (t_m <= 5.6e+102) {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / ((Math.pow(t_2, 2.0) * (t_2 / l)) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / 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 / cbrt(l)) tmp = 0.0 if (t_m <= 5.6e-11) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); elseif (t_m <= 5.6e+102) tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64(Float64((t_2 ^ 2.0) * Float64(t_2 / l)) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / 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_] := Block[{t$95$2 = N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.6e-11], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e+102], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[t$95$2, 2.0], $MachinePrecision] * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $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 := \frac{t\_m}{\sqrt[3]{\ell}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-11}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left({t\_2}^{2} \cdot \frac{t\_2}{\ell}\right) \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)}\\
\end{array}
\end{array}
\end{array}
if t < 5.6e-11Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 5.6e-11 < t < 5.60000000000000037e102Initial program 88.4%
Simplified84.4%
associate-*r*88.2%
*-un-lft-identity88.2%
times-frac88.2%
associate-*r*95.8%
Applied egg-rr95.8%
/-rgt-identity95.8%
*-commutative95.8%
*-commutative95.8%
Simplified95.8%
if 5.60000000000000037e102 < t Initial program 66.3%
Simplified64.4%
unpow264.4%
clear-num64.4%
un-div-inv64.4%
Applied egg-rr64.4%
add-cube-cbrt64.4%
*-un-lft-identity64.4%
times-frac64.4%
pow264.4%
cbrt-div64.4%
rem-cbrt-cube64.4%
cbrt-div64.4%
rem-cbrt-cube80.8%
Applied egg-rr80.8%
Final simplification81.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.6e-11)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (pow (* t_m (cbrt (sin k))) 3.0))))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-11) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * pow((t_m * cbrt(sin(k))), 3.0))));
}
return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.6e-11) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * Math.pow((t_m * Math.cbrt(Math.sin(k))), 3.0))));
}
return t_s * tmp;
}
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.6e-11) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); else tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * (Float64(t_m * cbrt(sin(k))) ^ 3.0))))); end return Float64(t_s * tmp) end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.6e-11], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.6 \cdot 10^{-11}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot {\left(t\_m \cdot \sqrt[3]{\sin k}\right)}^{3}}\right)\\
\end{array}
\end{array}
if t < 5.6e-11Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 5.6e-11 < t Initial program 74.0%
Simplified66.9%
associate-*r*72.6%
*-un-lft-identity72.6%
times-frac72.6%
associate-*r*81.1%
Applied egg-rr81.1%
/-rgt-identity81.1%
*-commutative81.1%
*-commutative81.1%
Simplified81.1%
*-commutative81.1%
add-cube-cbrt81.0%
pow381.0%
cbrt-prod80.9%
unpow381.0%
add-cbrt-cube86.4%
Applied egg-rr86.4%
Final simplification81.9%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4e-11)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(if (or (<= t_m 5.6e+102) (not (<= t_m 3.2e+205)))
(*
(/ l (+ 2.0 (pow (/ k t_m) 2.0)))
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0))))))
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m 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 tmp;
if (t_m <= 4e-11) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else if ((t_m <= 5.6e+102) || !(t_m <= 3.2e+205)) {
tmp = (l / (2.0 + pow((k / t_m), 2.0))) * (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / 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) :: tmp
if (t_m <= 4d-11) then
tmp = ((l * (sqrt(2.0d0) / (k * sin(k)))) ** 2.0d0) * (cos(k) / t_m)
else if ((t_m <= 5.6d+102) .or. (.not. (t_m <= 3.2d+205))) then
tmp = (l / (2.0d0 + ((k / t_m) ** 2.0d0))) * (l * (2.0d0 / (tan(k) * (sin(k) * (t_m ** 3.0d0)))))
else
tmp = 2.0d0 / (((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) / (t_m / 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 tmp;
if (t_m <= 4e-11) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else if ((t_m <= 5.6e+102) || !(t_m <= 3.2e+205)) {
tmp = (l / (2.0 + Math.pow((k / t_m), 2.0))) * (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0)))));
} else {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / 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): tmp = 0 if t_m <= 4e-11: tmp = math.pow((l * (math.sqrt(2.0) / (k * math.sin(k)))), 2.0) * (math.cos(k) / t_m) elif (t_m <= 5.6e+102) or not (t_m <= 3.2e+205): tmp = (l / (2.0 + math.pow((k / t_m), 2.0))) * (l * (2.0 / (math.tan(k) * (math.sin(k) * math.pow(t_m, 3.0))))) else: tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) / (t_m / 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) tmp = 0.0 if (t_m <= 4e-11) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); elseif ((t_m <= 5.6e+102) || !(t_m <= 3.2e+205)) tmp = Float64(Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0)))))); else tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / 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) tmp = 0.0; if (t_m <= 4e-11) tmp = ((l * (sqrt(2.0) / (k * sin(k)))) ^ 2.0) * (cos(k) / t_m); elseif ((t_m <= 5.6e+102) || ~((t_m <= 3.2e+205))) tmp = (l / (2.0 + ((k / t_m) ^ 2.0))) * (l * (2.0 / (tan(k) * (sin(k) * (t_m ^ 3.0))))); else tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / 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_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-11], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$m, 5.6e+102], N[Not[LessEqual[t$95$m, 3.2e+205]], $MachinePrecision]], N[(N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4 \cdot 10^{-11}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{+102} \lor \neg \left(t\_m \leq 3.2 \cdot 10^{+205}\right):\\
\;\;\;\;\frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}} \cdot \left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t\_m}^{3}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}\\
\end{array}
\end{array}
if t < 3.99999999999999976e-11Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 3.99999999999999976e-11 < t < 5.60000000000000037e102 or 3.19999999999999996e205 < t Initial program 75.9%
Simplified66.2%
associate-*r*74.0%
*-un-lft-identity74.0%
times-frac74.0%
associate-*r*85.3%
Applied egg-rr85.3%
/-rgt-identity85.3%
*-commutative85.3%
*-commutative85.3%
Simplified85.3%
if 5.60000000000000037e102 < t < 3.19999999999999996e205Initial program 68.7%
Simplified68.9%
unpow268.9%
clear-num68.9%
un-div-inv68.9%
Applied egg-rr68.9%
add-sqr-sqrt68.9%
pow268.9%
associate-/r*68.7%
sqrt-div68.7%
sqrt-pow194.9%
metadata-eval94.9%
sqrt-prod68.1%
add-sqr-sqrt100.0%
Applied egg-rr100.0%
Final simplification82.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.3e-10)
(* (pow (* l (/ (sqrt 2.0) (* k (sin k)))) 2.0) (/ (cos k) t_m))
(if (<= t_m 7.2e+164)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k 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 (t_m <= 1.3e-10) {
tmp = pow((l * (sqrt(2.0) / (k * sin(k)))), 2.0) * (cos(k) / t_m);
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.3e-10) {
tmp = Math.pow((l * (Math.sqrt(2.0) / (k * Math.sin(k)))), 2.0) * (Math.cos(k) / t_m);
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.3e-10) tmp = Float64((Float64(l * Float64(sqrt(2.0) / Float64(k * sin(k)))) ^ 2.0) * Float64(cos(k) / t_m)); elseif (t_m <= 7.2e+164) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * 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[t$95$m, 1.3e-10], N[(N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+164], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.3 \cdot 10^{-10}:\\
\;\;\;\;{\left(\ell \cdot \frac{\sqrt{2}}{k \cdot \sin k}\right)}^{2} \cdot \frac{\cos k}{t\_m}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.29999999999999991e-10Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
unpow-prod-down38.5%
times-frac38.5%
pow238.5%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in l around 0 80.0%
associate-/l*80.1%
Simplified80.1%
if 1.29999999999999991e-10 < t < 7.19999999999999981e164Initial program 76.9%
Simplified76.7%
unpow276.7%
clear-num76.7%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/r*73.9%
unpow373.9%
times-frac88.4%
pow288.4%
Applied egg-rr88.4%
if 7.19999999999999981e164 < t Initial program 71.4%
Simplified68.9%
Taylor expanded in k around 0 68.9%
unpow268.9%
Applied egg-rr68.9%
associate-/r*60.5%
unpow360.5%
times-frac68.9%
pow268.9%
Applied egg-rr68.9%
add-cube-cbrt68.9%
pow368.9%
frac-times60.5%
unpow260.5%
unpow360.5%
cbrt-div60.5%
unpow360.5%
add-cbrt-cube63.4%
cbrt-prod76.4%
pow276.4%
Applied egg-rr76.4%
Final simplification80.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.32e-10)
(* (/ (cos k) t_m) (pow (/ (* (sqrt 2.0) (/ l k)) (sin k)) 2.0))
(if (<= t_m 7.2e+164)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k 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 (t_m <= 1.32e-10) {
tmp = (cos(k) / t_m) * pow(((sqrt(2.0) * (l / k)) / sin(k)), 2.0);
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.32e-10) {
tmp = (Math.cos(k) / t_m) * Math.pow(((Math.sqrt(2.0) * (l / k)) / Math.sin(k)), 2.0);
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.32e-10) tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(sqrt(2.0) * Float64(l / k)) / sin(k)) ^ 2.0)); elseif (t_m <= 7.2e+164) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * 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[t$95$m, 1.32e-10], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+164], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.32 \cdot 10^{-10}:\\
\;\;\;\;\frac{\cos k}{t\_m} \cdot {\left(\frac{\sqrt{2} \cdot \frac{\ell}{k}}{\sin k}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.3200000000000001e-10Initial program 45.6%
Simplified43.3%
add-sqr-sqrt27.9%
pow227.9%
Applied egg-rr33.3%
Taylor expanded in t around 0 40.0%
*-un-lft-identity40.0%
*-commutative40.0%
unpow-prod-down38.5%
pow238.5%
add-sqr-sqrt80.0%
times-frac80.0%
Applied egg-rr80.0%
*-lft-identity80.0%
associate-*r/80.0%
Simplified80.0%
if 1.3200000000000001e-10 < t < 7.19999999999999981e164Initial program 76.9%
Simplified76.7%
unpow276.7%
clear-num76.7%
un-div-inv76.8%
Applied egg-rr76.8%
associate-/r*73.9%
unpow373.9%
times-frac88.4%
pow288.4%
Applied egg-rr88.4%
if 7.19999999999999981e164 < t Initial program 71.4%
Simplified68.9%
Taylor expanded in k around 0 68.9%
unpow268.9%
Applied egg-rr68.9%
associate-/r*60.5%
unpow360.5%
times-frac68.9%
pow268.9%
Applied egg-rr68.9%
add-cube-cbrt68.9%
pow368.9%
frac-times60.5%
unpow260.5%
unpow360.5%
cbrt-div60.5%
unpow360.5%
add-cbrt-cube63.4%
cbrt-prod76.4%
pow276.4%
Applied egg-rr76.4%
Final simplification80.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.9e-31)
(* (/ (cos k) t_m) (pow (* l (/ (sqrt 2.0) (pow k 2.0))) 2.0))
(if (<= t_m 1.68e+81)
(/ 2.0 (* (/ (* k (pow t_m 3.0)) (pow l 2.0)) (* 2.0 k)))
(if (<= t_m 7.2e+164)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k 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 (t_m <= 1.9e-31) {
tmp = (cos(k) / t_m) * pow((l * (sqrt(2.0) / pow(k, 2.0))), 2.0);
} else if (t_m <= 1.68e+81) {
tmp = 2.0 / (((k * pow(t_m, 3.0)) / pow(l, 2.0)) * (2.0 * k));
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.9e-31) {
tmp = (Math.cos(k) / t_m) * Math.pow((l * (Math.sqrt(2.0) / Math.pow(k, 2.0))), 2.0);
} else if (t_m <= 1.68e+81) {
tmp = 2.0 / (((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)) * (2.0 * k));
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 1.9e-31) tmp = Float64(Float64(cos(k) / t_m) * (Float64(l * Float64(sqrt(2.0) / (k ^ 2.0))) ^ 2.0)); elseif (t_m <= 1.68e+81) tmp = Float64(2.0 / Float64(Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)) * Float64(2.0 * k))); elseif (t_m <= 7.2e+164) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * 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[t$95$m, 1.9e-31], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(l * N[(N[Sqrt[2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.68e+81], N[(2.0 / N[(N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+164], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.9 \cdot 10^{-31}:\\
\;\;\;\;\frac{\cos k}{t\_m} \cdot {\left(\ell \cdot \frac{\sqrt{2}}{{k}^{2}}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 1.68 \cdot 10^{+81}:\\
\;\;\;\;\frac{2}{\frac{k \cdot {t\_m}^{3}}{{\ell}^{2}} \cdot \left(2 \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 1.9e-31Initial program 45.5%
Simplified43.1%
add-sqr-sqrt27.4%
pow227.4%
Applied egg-rr31.8%
Taylor expanded in t around 0 38.7%
unpow-prod-down37.2%
times-frac37.1%
pow237.1%
add-sqr-sqrt79.6%
Applied egg-rr79.6%
Taylor expanded in k around 0 62.2%
associate-/l*62.3%
Simplified62.3%
if 1.9e-31 < t < 1.68000000000000001e81Initial program 78.0%
Simplified78.0%
Taylor expanded in k around 0 77.6%
Taylor expanded in k around 0 82.4%
if 1.68000000000000001e81 < t < 7.19999999999999981e164Initial program 69.1%
Simplified63.4%
unpow263.4%
clear-num63.4%
un-div-inv63.4%
Applied egg-rr63.4%
associate-/r*63.2%
unpow363.1%
times-frac88.1%
pow288.1%
Applied egg-rr88.1%
if 7.19999999999999981e164 < t Initial program 71.4%
Simplified68.9%
Taylor expanded in k around 0 68.9%
unpow268.9%
Applied egg-rr68.9%
associate-/r*60.5%
unpow360.5%
times-frac68.9%
pow268.9%
Applied egg-rr68.9%
add-cube-cbrt68.9%
pow368.9%
frac-times60.5%
unpow260.5%
unpow360.5%
cbrt-div60.5%
unpow360.5%
add-cbrt-cube63.4%
cbrt-prod76.4%
pow276.4%
Applied egg-rr76.4%
Final simplification67.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.6e-27)
(* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) k)) 2.0))
(if (<= t_m 1.95e+80)
(/ 2.0 (* (/ (* k (pow t_m 3.0)) (pow l 2.0)) (* 2.0 k)))
(if (<= t_m 7.2e+164)
(/
2.0
(*
(* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))
(* (/ (pow t_m 2.0) l) (/ t_m l))))
(/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k 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 (t_m <= 2.6e-27) {
tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / k)), 2.0);
} else if (t_m <= 1.95e+80) {
tmp = 2.0 / (((k * pow(t_m, 3.0)) / pow(l, 2.0)) * (2.0 * k));
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 2.6e-27) {
tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / k)), 2.0);
} else if (t_m <= 1.95e+80) {
tmp = 2.0 / (((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)) * (2.0 * k));
} else if (t_m <= 7.2e+164) {
tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))) * ((Math.pow(t_m, 2.0) / l) * (t_m / l)));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 2.6e-27) tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / k)) ^ 2.0)); elseif (t_m <= 1.95e+80) tmp = Float64(2.0 / Float64(Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)) * Float64(2.0 * k))); elseif (t_m <= 7.2e+164) tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k)))) * Float64(Float64((t_m ^ 2.0) / l) * Float64(t_m / l)))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * 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[t$95$m, 2.6e-27], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e+80], N[(2.0 / N[(N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.2e+164], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-27}:\\
\;\;\;\;\frac{\cos k}{t\_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{+80}:\\
\;\;\;\;\frac{2}{\frac{k \cdot {t\_m}^{3}}{{\ell}^{2}} \cdot \left(2 \cdot k\right)}\\
\mathbf{elif}\;t\_m \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right) \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 2.60000000000000017e-27Initial program 45.5%
Simplified43.1%
add-sqr-sqrt27.4%
pow227.4%
Applied egg-rr31.8%
Taylor expanded in t around 0 38.7%
unpow-prod-down37.2%
times-frac37.1%
pow237.1%
add-sqr-sqrt79.6%
Applied egg-rr79.6%
Taylor expanded in k around 0 62.2%
if 2.60000000000000017e-27 < t < 1.94999999999999999e80Initial program 78.0%
Simplified78.0%
Taylor expanded in k around 0 77.6%
Taylor expanded in k around 0 82.4%
if 1.94999999999999999e80 < t < 7.19999999999999981e164Initial program 69.1%
Simplified63.4%
unpow263.4%
clear-num63.4%
un-div-inv63.4%
Applied egg-rr63.4%
associate-/r*63.2%
unpow363.1%
times-frac88.1%
pow288.1%
Applied egg-rr88.1%
if 7.19999999999999981e164 < t Initial program 71.4%
Simplified68.9%
Taylor expanded in k around 0 68.9%
unpow268.9%
Applied egg-rr68.9%
associate-/r*60.5%
unpow360.5%
times-frac68.9%
pow268.9%
Applied egg-rr68.9%
add-cube-cbrt68.9%
pow368.9%
frac-times60.5%
unpow260.5%
unpow360.5%
cbrt-div60.5%
unpow360.5%
add-cbrt-cube63.4%
cbrt-prod76.4%
pow276.4%
Applied egg-rr76.4%
Final simplification67.7%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.7e-32)
(* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) k)) 2.0))
(if (<= t_m 2.4e+102)
(/ 2.0 (* (/ (* k (pow t_m 3.0)) (pow l 2.0)) (* 2.0 k)))
(/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (* k 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 (t_m <= 2.7e-32) {
tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / k)), 2.0);
} else if (t_m <= 2.4e+102) {
tmp = 2.0 / (((k * pow(t_m, 3.0)) / pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 2.7e-32) {
tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / k)), 2.0);
} else if (t_m <= 2.4e+102) {
tmp = 2.0 / (((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * (k * 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 (t_m <= 2.7e-32) tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / k)) ^ 2.0)); elseif (t_m <= 2.4e+102) tmp = Float64(2.0 / Float64(Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * Float64(k * 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[t$95$m, 2.7e-32], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.4e+102], N[(2.0 / N[(N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-32}:\\
\;\;\;\;\frac{\cos k}{t\_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 2.4 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{k \cdot {t\_m}^{3}}{{\ell}^{2}} \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 2.69999999999999981e-32Initial program 45.5%
Simplified43.1%
add-sqr-sqrt27.4%
pow227.4%
Applied egg-rr31.8%
Taylor expanded in t around 0 38.7%
unpow-prod-down37.2%
times-frac37.1%
pow237.1%
add-sqr-sqrt79.6%
Applied egg-rr79.6%
Taylor expanded in k around 0 62.2%
if 2.69999999999999981e-32 < t < 2.39999999999999994e102Initial program 83.3%
Simplified83.3%
Taylor expanded in k around 0 79.9%
Taylor expanded in k around 0 83.5%
if 2.39999999999999994e102 < t Initial program 66.3%
Simplified64.4%
Taylor expanded in k around 0 64.4%
unpow264.4%
Applied egg-rr64.4%
associate-/r*57.6%
unpow357.6%
times-frac72.8%
pow272.8%
Applied egg-rr70.7%
add-cube-cbrt70.7%
pow370.7%
frac-times57.6%
unpow257.6%
unpow357.6%
cbrt-div57.6%
unpow357.6%
add-cbrt-cube66.3%
cbrt-prod76.8%
pow276.8%
Applied egg-rr76.8%
Final simplification67.3%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2.35e-32)
(* (/ (cos k) t_m) (pow (* (/ l k) (/ (sqrt 2.0) k)) 2.0))
(if (<= t_m 3.55e+102)
(/ 2.0 (* (/ (* k (pow t_m 3.0)) (pow l 2.0)) (* 2.0 k)))
(/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k 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 (t_m <= 2.35e-32) {
tmp = (cos(k) / t_m) * pow(((l / k) * (sqrt(2.0) / k)), 2.0);
} else if (t_m <= 3.55e+102) {
tmp = 2.0 / (((k * pow(t_m, 3.0)) / pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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 (t_m <= 2.35d-32) then
tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0d0) / k)) ** 2.0d0)
else if (t_m <= 3.55d+102) then
tmp = 2.0d0 / (((k * (t_m ** 3.0d0)) / (l ** 2.0d0)) * (2.0d0 * k))
else
tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * 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 (t_m <= 2.35e-32) {
tmp = (Math.cos(k) / t_m) * Math.pow(((l / k) * (Math.sqrt(2.0) / k)), 2.0);
} else if (t_m <= 3.55e+102) {
tmp = 2.0 / (((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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 t_m <= 2.35e-32: tmp = (math.cos(k) / t_m) * math.pow(((l / k) * (math.sqrt(2.0) / k)), 2.0) elif t_m <= 3.55e+102: tmp = 2.0 / (((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0)) * (2.0 * k)) else: tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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 (t_m <= 2.35e-32) tmp = Float64(Float64(cos(k) / t_m) * (Float64(Float64(l / k) * Float64(sqrt(2.0) / k)) ^ 2.0)); elseif (t_m <= 3.55e+102) tmp = Float64(2.0 / Float64(Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * 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 (t_m <= 2.35e-32) tmp = (cos(k) / t_m) * (((l / k) * (sqrt(2.0) / k)) ^ 2.0); elseif (t_m <= 3.55e+102) tmp = 2.0 / (((k * (t_m ^ 3.0)) / (l ^ 2.0)) * (2.0 * k)); else tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * 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[t$95$m, 2.35e-32], N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.55e+102], N[(2.0 / N[(N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.35 \cdot 10^{-32}:\\
\;\;\;\;\frac{\cos k}{t\_m} \cdot {\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)}^{2}\\
\mathbf{elif}\;t\_m \leq 3.55 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{k \cdot {t\_m}^{3}}{{\ell}^{2}} \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\
\end{array}
\end{array}
if t < 2.3500000000000001e-32Initial program 45.5%
Simplified43.1%
add-sqr-sqrt27.4%
pow227.4%
Applied egg-rr31.8%
Taylor expanded in t around 0 38.7%
unpow-prod-down37.2%
times-frac37.1%
pow237.1%
add-sqr-sqrt79.6%
Applied egg-rr79.6%
Taylor expanded in k around 0 62.2%
if 2.3500000000000001e-32 < t < 3.5499999999999999e102Initial program 83.3%
Simplified83.3%
Taylor expanded in k around 0 79.9%
Taylor expanded in k around 0 83.5%
if 3.5499999999999999e102 < t Initial program 66.3%
Simplified64.4%
Taylor expanded in k around 0 64.4%
unpow264.4%
Applied egg-rr64.4%
add-sqr-sqrt64.4%
pow264.4%
associate-/r*57.6%
sqrt-div57.6%
sqrt-pow168.2%
metadata-eval68.2%
sqrt-prod46.7%
add-sqr-sqrt76.9%
Applied egg-rr72.8%
Final simplification66.6%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 2e-36)
(/ 2.0 (* (pow k 4.0) (/ t_m (pow l 2.0))))
(if (<= t_m 3.25e+102)
(/ 2.0 (* (/ (* k (pow t_m 3.0)) (pow l 2.0)) (* 2.0 k)))
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (pow t_m 2.0) (/ t_m l)) l)))))))t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-36) {
tmp = 2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0)));
} else if (t_m <= 3.25e+102) {
tmp = 2.0 / (((k * pow(t_m, 3.0)) / pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (t_m / l)) / l));
}
return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 2d-36) then
tmp = 2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0)))
else if (t_m <= 3.25d+102) then
tmp = 2.0d0 / (((k * (t_m ** 3.0d0)) / (l ** 2.0d0)) * (2.0d0 * k))
else
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (t_m / l)) / l))
end if
code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 2e-36) {
tmp = 2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0)));
} else if (t_m <= 3.25e+102) {
tmp = 2.0 / (((k * Math.pow(t_m, 3.0)) / Math.pow(l, 2.0)) * (2.0 * k));
} else {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (t_m / l)) / l));
}
return t_s * tmp;
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 2e-36: tmp = 2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 2.0))) elif t_m <= 3.25e+102: tmp = 2.0 / (((k * math.pow(t_m, 3.0)) / math.pow(l, 2.0)) * (2.0 * k)) else: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (t_m / l)) / 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 <= 2e-36) tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))); elseif (t_m <= 3.25e+102) tmp = Float64(2.0 / Float64(Float64(Float64(k * (t_m ^ 3.0)) / (l ^ 2.0)) * Float64(2.0 * k))); else tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l))); end return Float64(t_s * tmp) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 2e-36) tmp = 2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))); elseif (t_m <= 3.25e+102) tmp = 2.0 / (((k * (t_m ^ 3.0)) / (l ^ 2.0)) * (2.0 * k)); else tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (t_m / l)) / l)); end tmp_2 = t_s * tmp; end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e-36], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.25e+102], N[(2.0 / N[(N[(N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2 \cdot 10^{-36}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}\\
\mathbf{elif}\;t\_m \leq 3.25 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\frac{k \cdot {t\_m}^{3}}{{\ell}^{2}} \cdot \left(2 \cdot k\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\end{array}
\end{array}
if t < 1.9999999999999999e-36Initial program 45.5%
Simplified45.5%
Taylor expanded in t around 0 66.0%
associate-*r*66.0%
Simplified66.0%
Taylor expanded in k around 0 52.8%
associate-/l*54.2%
Simplified54.2%
if 1.9999999999999999e-36 < t < 3.2500000000000002e102Initial program 81.2%
Simplified81.2%
Taylor expanded in k around 0 77.9%
Taylor expanded in k around 0 81.4%
if 3.2500000000000002e102 < t Initial program 66.3%
Simplified64.4%
Taylor expanded in k around 0 64.4%
unpow264.4%
Applied egg-rr64.4%
associate-/r*57.6%
unpow357.6%
times-frac72.8%
pow272.8%
Applied egg-rr70.7%
associate-*l/70.7%
Applied egg-rr70.7%
Final simplification60.5%
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 8e+159)
(/ 2.0 (* (* 2.0 (* k k)) (/ (* (pow t_m 2.0) (/ t_m l)) l)))
(* (/ (pow l 2.0) (pow k 4.0)) (/ 2.0 t_m)))))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 <= 8e+159) {
tmp = 2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (t_m / l)) / l));
} else {
tmp = (pow(l, 2.0) / pow(k, 4.0)) * (2.0 / t_m);
}
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 <= 8d+159) then
tmp = 2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (t_m / l)) / l))
else
tmp = ((l ** 2.0d0) / (k ** 4.0d0)) * (2.0d0 / t_m)
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 <= 8e+159) {
tmp = 2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (t_m / l)) / l));
} else {
tmp = (Math.pow(l, 2.0) / Math.pow(k, 4.0)) * (2.0 / t_m);
}
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 <= 8e+159: tmp = 2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (t_m / l)) / l)) else: tmp = (math.pow(l, 2.0) / math.pow(k, 4.0)) * (2.0 / t_m) 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 <= 8e+159) tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l))); else tmp = Float64(Float64((l ^ 2.0) / (k ^ 4.0)) * Float64(2.0 / t_m)); 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 <= 8e+159) tmp = 2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (t_m / l)) / l)); else tmp = ((l ^ 2.0) / (k ^ 4.0)) * (2.0 / t_m); 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, 8e+159], N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / t$95$m), $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 8 \cdot 10^{+159}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{k}^{4}} \cdot \frac{2}{t\_m}\\
\end{array}
\end{array}
if k < 7.9999999999999994e159Initial program 53.1%
Simplified53.2%
Taylor expanded in k around 0 57.6%
unpow257.6%
Applied egg-rr57.6%
associate-/r*48.4%
unpow348.4%
times-frac59.0%
pow259.0%
Applied egg-rr60.7%
associate-*l/60.8%
Applied egg-rr60.8%
if 7.9999999999999994e159 < k Initial program 57.1%
Simplified57.1%
add-sqr-sqrt57.1%
pow257.1%
Applied egg-rr49.1%
Taylor expanded in t around 0 48.3%
unpow-prod-down45.8%
times-frac45.8%
pow245.8%
add-sqr-sqrt91.2%
Applied egg-rr91.2%
Taylor expanded in k around 0 77.0%
times-frac77.0%
unpow277.0%
rem-square-sqrt77.0%
Simplified77.0%
Final simplification63.0%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k 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 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k * 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 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k * 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((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k * 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 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k * 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[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k * 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}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Initial program 53.6%
Simplified53.8%
Taylor expanded in k around 0 57.5%
unpow257.5%
Applied egg-rr57.5%
add-sqr-sqrt29.5%
pow229.5%
associate-/r*27.1%
sqrt-div27.1%
sqrt-pow130.6%
metadata-eval30.6%
sqrt-prod19.1%
add-sqr-sqrt33.8%
Applied egg-rr33.9%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (/ (* (pow t_m 2.0) (/ t_m l)) l)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((pow(t_m, 2.0) * (t_m / l)) / l)));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * (((t_m ** 2.0d0) * (t_m / l)) / l)))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((Math.pow(t_m, 2.0) * (t_m / l)) / l)));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((math.pow(t_m, 2.0) * (t_m / l)) / l)))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l)))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * (((t_m ^ 2.0) * (t_m / l)) / l))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell}}
\end{array}
Initial program 53.6%
Simplified53.8%
Taylor expanded in k around 0 57.5%
unpow257.5%
Applied egg-rr57.5%
associate-/r*49.6%
unpow349.6%
times-frac59.9%
pow259.9%
Applied egg-rr61.1%
associate-*l/61.1%
Applied egg-rr61.1%
Final simplification61.1%
t\_m = (fabs.f64 t) t\_s = (copysign.f64 #s(literal 1 binary64) t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (/ 2.0 (* (* 2.0 (* k k)) (* (/ t_m l) (/ (* t_m t_m) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 / ((2.0d0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))));
}
t\_m = math.fabs(t) t\_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l))))
t\_m = abs(t) t\_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k * k)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))))) end
t\_m = abs(t); t\_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 / ((2.0 * (k * k)) * ((t_m / l) * ((t_m * t_m) / l)))); end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Initial program 53.6%
Simplified53.8%
Taylor expanded in k around 0 57.5%
unpow257.5%
Applied egg-rr57.5%
associate-/r*49.6%
unpow349.6%
times-frac59.9%
pow259.9%
Applied egg-rr61.1%
unpow261.1%
Applied egg-rr61.1%
Final simplification61.1%
herbie shell --seed 2024136
(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))))